Rev 4581 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4581 | Rev 4718 | ||
|---|---|---|---|
| Line 50... | Line 50... | ||
| 50 | #include <fcntl.h> |
50 | #include <fcntl.h> |
| 51 | #include <sys/types.h> |
51 | #include <sys/types.h> |
| 52 | #include <ipc/ipc.h> |
52 | #include <ipc/ipc.h> |
| 53 | #include <ipc/services.h> |
53 | #include <ipc/services.h> |
| 54 | #include <ipc/loader.h> |
54 | #include <ipc/loader.h> |
| - | 55 | #include <ipc/ns.h> |
|
| - | 56 | #include <macros.h> |
|
| 55 | #include <loader/pcb.h> |
57 | #include <loader/pcb.h> |
| 56 | #include <errno.h> |
58 | #include <errno.h> |
| 57 | #include <async.h> |
59 | #include <async.h> |
| 58 | #include <string.h> |
60 | #include <string.h> |
| 59 | #include <as.h> |
61 | #include <as.h> |
| Line 435... | Line 437... | ||
| 435 | /** Program loader main function. |
437 | /** Program loader main function. |
| 436 | */ |
438 | */ |
| 437 | int main(int argc, char *argv[]) |
439 | int main(int argc, char *argv[]) |
| 438 | { |
440 | { |
| 439 | ipcarg_t phonead; |
441 | ipcarg_t phonead; |
| - | 442 | task_id_t id; |
|
| - | 443 | int rc; |
|
| 440 | 444 | ||
| 441 | connected = false; |
445 | connected = false; |
| 442 | 446 | ||
| - | 447 | /* Introduce this task to the NS (give it our task ID). */ |
|
| - | 448 | id = task_get_id(); |
|
| - | 449 | rc = async_req_2_0(PHONE_NS, NS_ID_INTRO, LOWER32(id), UPPER32(id)); |
|
| - | 450 | if (rc != EOK) |
|
| - | 451 | return -1; |
|
| - | 452 | ||
| 443 | /* Set a handler of incomming connections. */ |
453 | /* Set a handler of incomming connections. */ |
| 444 | async_set_client_connection(ldr_connection); |
454 | async_set_client_connection(ldr_connection); |
| 445 | 455 | ||
| 446 | /* Register at naming service. */ |
456 | /* Register at naming service. */ |
| 447 | if (ipc_connect_to_me(PHONE_NS, SERVICE_LOAD, 0, 0, &phonead) != 0) |
457 | if (ipc_connect_to_me(PHONE_NS, SERVICE_LOAD, 0, 0, &phonead) != 0) |
| 448 | return -1; |
458 | return -2; |
| 449 | 459 | ||
| 450 | async_manager(); |
460 | async_manager(); |
| 451 | 461 | ||
| 452 | /* Never reached */ |
462 | /* Never reached */ |
| 453 | return 0; |
463 | return 0; |
| 454 | } |
464 | } |