Changes in uspace/lib/c/generic/task.c [38d150e:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/task.c
r38d150e rb7fd2a0 69 69 * program. 70 70 * 71 * @return Zero on success or negativeerror code.72 */ 73 int task_set_name(const char *name)71 * @return Zero on success or an error code. 72 */ 73 errno_t task_set_name(const char *name) 74 74 { 75 75 assert(name); 76 76 77 return __SYSCALL2(SYS_TASK_SET_NAME, (sysarg_t) name, str_size(name));77 return (errno_t) __SYSCALL2(SYS_TASK_SET_NAME, (sysarg_t) name, str_size(name)); 78 78 } 79 79 … … 82 82 * @param task_id ID of task to kill. 83 83 * 84 * @return Zero on success or negativeerror code.85 */ 86 87 int task_kill(task_id_t task_id)88 { 89 return ( int) __SYSCALL1(SYS_TASK_KILL, (sysarg_t) &task_id);84 * @return Zero on success or an error code. 85 */ 86 87 errno_t task_kill(task_id_t task_id) 88 { 89 return (errno_t) __SYSCALL1(SYS_TASK_KILL, (sysarg_t) &task_id); 90 90 } 91 91 … … 101 101 * @param argv Command-line arguments. 102 102 * 103 * @return Zero on success or negativeerror code.104 * 105 */ 106 int task_spawnv(task_id_t *id, task_wait_t *wait, const char *path,103 * @return Zero on success or an error code. 104 * 105 */ 106 errno_t task_spawnv(task_id_t *id, task_wait_t *wait, const char *path, 107 107 const char *const args[]) 108 108 { … … 143 143 * @param std_err File to use as stderr. 144 144 * 145 * @return Zero on success or negativeerror code.146 * 147 */ 148 int task_spawnvf(task_id_t *id, task_wait_t *wait, const char *path,145 * @return Zero on success or an error code. 146 * 147 */ 148 errno_t task_spawnvf(task_id_t *id, task_wait_t *wait, const char *path, 149 149 const char *const args[], int fd_stdin, int fd_stdout, int fd_stderr) 150 150 { … … 158 158 /* Get task ID. */ 159 159 task_id_t task_id; 160 int rc = loader_get_task_id(ldr, &task_id);160 errno_t rc = loader_get_task_id(ldr, &task_id); 161 161 if (rc != EOK) 162 162 goto error; … … 249 249 * @param ap Command-line arguments. 250 250 * 251 * @return Zero on success or negativeerror code.252 * 253 */ 254 int task_spawn(task_id_t *task_id, task_wait_t *wait, const char *path,251 * @return Zero on success or an error code. 252 * 253 */ 254 errno_t task_spawn(task_id_t *task_id, task_wait_t *wait, const char *path, 255 255 int cnt, va_list ap) 256 256 { … … 269 269 270 270 /* Spawn task. */ 271 int rc = task_spawnv(task_id, wait, path, arglist);271 errno_t rc = task_spawnv(task_id, wait, path, arglist); 272 272 273 273 /* Free argument list. */ … … 287 287 * @param ... Command-line arguments. 288 288 * 289 * @return Zero on success or negativeerror code.290 * 291 */ 292 int task_spawnl(task_id_t *task_id, task_wait_t *wait, const char *path, ...)289 * @return Zero on success or an error code. 290 * 291 */ 292 errno_t task_spawnl(task_id_t *task_id, task_wait_t *wait, const char *path, ...) 293 293 { 294 294 /* Count the number of arguments. */ … … 306 306 307 307 va_start(ap, path); 308 int rc = task_spawn(task_id, wait, path, cnt, ap);308 errno_t rc = task_spawn(task_id, wait, path, cnt, ap); 309 309 va_end(ap); 310 310 … … 323 323 * @return EOK on success, else error code. 324 324 */ 325 int task_setup_wait(task_id_t id, task_wait_t *wait)325 errno_t task_setup_wait(task_id_t id, task_wait_t *wait) 326 326 { 327 327 async_sess_t *sess_ns = ns_session_get(); … … 364 364 * @return EOK on success, else error code. 365 365 */ 366 int task_wait(task_wait_t *wait, task_exit_t *texit, int *retval)366 errno_t task_wait(task_wait_t *wait, task_exit_t *texit, int *retval) 367 367 { 368 368 assert(texit); 369 369 assert(retval); 370 370 371 sysarg_t rc;371 errno_t rc; 372 372 async_wait_for(wait->aid, &rc); 373 373 … … 394 394 * @return EOK on success, else error code. 395 395 */ 396 int task_wait_task_id(task_id_t id, task_exit_t *texit, int *retval)396 errno_t task_wait_task_id(task_id_t id, task_exit_t *texit, int *retval) 397 397 { 398 398 task_wait_t wait; 399 int rc = task_setup_wait(id, &wait);399 errno_t rc = task_setup_wait(id, &wait); 400 400 if (rc != EOK) 401 401 return rc; … … 404 404 } 405 405 406 int task_retval(int val)406 errno_t task_retval(int val) 407 407 { 408 408 async_sess_t *sess_ns = ns_session_get(); … … 411 411 412 412 async_exch_t *exch = async_exchange_begin(sess_ns); 413 int rc = (int) async_req_1_0(exch, NS_RETVAL, val);413 errno_t rc = (errno_t) async_req_1_0(exch, NS_RETVAL, val); 414 414 async_exchange_end(exch); 415 415
Note:
See TracChangeset
for help on using the changeset viewer.