/trunk/uspace/lib/libc/include/task.h |
---|
39,10 → 39,15 |
typedef uint64_t task_id_t; |
typedef enum { |
TASK_EXIT_NORMAL, |
TASK_EXIT_UNEXPECTED |
} task_exit_t; |
extern task_id_t task_get_id(void); |
extern int task_set_name(const char *name); |
extern task_id_t task_spawn(const char *path, char *const argv[]); |
extern int task_wait(task_id_t id, int *retval); |
extern int task_wait(task_id_t id, task_exit_t *texit, int *retval); |
extern int task_retval(int val); |
/trunk/uspace/lib/libc/generic/task.c |
---|
148,13 → 148,14 |
return 0; |
} |
int task_wait(task_id_t id, int *retval) |
int task_wait(task_id_t id, task_exit_t *texit, int *retval) |
{ |
ipcarg_t rv; |
ipcarg_t te, rv; |
int rc; |
rc = (int) async_req_2_1(PHONE_NS, NS_TASK_WAIT, LOWER32(id), |
UPPER32(id), &rv); |
rc = (int) async_req_2_2(PHONE_NS, NS_TASK_WAIT, LOWER32(id), |
UPPER32(id), &te, &rv); |
*texit = te; |
*retval = rv; |
return rc; |