Changeset bfd1546 in mainline for uspace/lib/libc/generic/loader.c
- Timestamp:
- 2009-02-15T00:01:06Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 08b777e
- Parents:
- 4cac212c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/loader.c
r4cac212c rbfd1546 35 35 #include <ipc/ipc.h> 36 36 #include <ipc/loader.h> 37 #include <ipc/services.h> 37 38 #include <libc.h> 38 39 #include <task.h> … … 51 52 * de-allocated using free() after use). 52 53 */ 53 loader_t *loader_spawn(const char *name) 54 { 55 int phone_id, rc; 54 int loader_spawn(const char *name) 55 { 56 return __SYSCALL2(SYS_PROGRAM_SPAWN_LOADER, 57 (sysarg_t) name, strlen(name)); 58 } 59 60 loader_t *loader_connect(void) 61 { 56 62 loader_t *ldr; 57 58 /* 59 * Ask kernel to spawn a new loader task. 60 */ 61 rc = __SYSCALL3(SYS_PROGRAM_SPAWN_LOADER, (sysarg_t) &phone_id, 62 (sysarg_t) name, strlen(name)); 63 if (rc != 0) 64 return NULL; 65 66 /* 67 * Say hello so that the loader knows the incoming connection's 68 * phone hash. 69 */ 70 rc = async_req_0_0(phone_id, LOADER_HELLO); 71 if (rc != EOK) 63 int phone_id; 64 65 phone_id = ipc_connect_me_to(PHONE_NS, SERVICE_LOAD, 0, 0); 66 if (phone_id < 0) 72 67 return NULL; 73 68 … … 77 72 78 73 ldr->phone_id = phone_id; 79 return ldr; 74 return ldr; 80 75 } 81 76
Note:
See TracChangeset
for help on using the changeset viewer.