Changeset 7114d83 in mainline for uspace/lib
- Timestamp:
- 2009-07-06T16:02:27Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5d96851b
- Parents:
- d68e4d5
- Location:
- uspace/lib/libc
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/libc.c
rd68e4d5 r7114d83 62 62 void __main(void *pcb_ptr) 63 63 { 64 int retval; 65 64 66 __heap_init(); 65 67 __async_init(); … … 83 85 } 84 86 85 main(argc, argv); 87 retval = main(argc, argv); 88 86 89 __stdio_done(); 90 (void) task_retval(retval); 87 91 } 88 92 -
uspace/lib/libc/generic/task.c
rd68e4d5 r7114d83 149 149 } 150 150 151 int task_wait(task_id_t id )151 int task_wait(task_id_t id, int *retval) 152 152 { 153 return (int) async_req_2_0(PHONE_NS, NS_TASK_WAIT, LOWER32(id), UPPER32(id)); 153 ipcarg_t rv; 154 int rc; 155 156 rc = (int) async_req_2_1(PHONE_NS, NS_TASK_WAIT, LOWER32(id), 157 UPPER32(id), &rv); 158 *retval = rv; 159 160 return rc; 161 } 162 163 int task_retval(int val) 164 { 165 task_id_t id; 166 167 id = task_get_id(); 168 return (int) async_req_3_0(PHONE_NS, NS_RETVAL, LOWER32(id), 169 UPPER32(id), val); 154 170 } 155 171 -
uspace/lib/libc/include/ipc/ns.h
rd68e4d5 r7114d83 40 40 typedef enum { 41 41 NS_PING = IPC_FIRST_USER_METHOD, 42 NS_TASK_WAIT 42 NS_TASK_WAIT, 43 NS_RETVAL 43 44 } ns_request_t; 44 45 -
uspace/lib/libc/include/task.h
rd68e4d5 r7114d83 43 43 extern int task_set_name(const char *name); 44 44 extern task_id_t task_spawn(const char *path, char *const argv[]); 45 extern int task_wait(task_id_t id); 45 extern int task_wait(task_id_t id, int *retval); 46 extern int task_retval(int val); 47 46 48 47 49 #endif
Note:
See TracChangeset
for help on using the changeset viewer.