Changeset eb522e8 in mainline for uspace/lib/c/generic/task.c


Ignore:
Timestamp:
2011-06-01T08:43:42Z (14 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d6c1f1
Parents:
9e2e715 (diff), e51a514 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Huuuuuge merge from development - all the work actually :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/task.c

    r9e2e715 reb522e8  
    4747task_id_t task_get_id(void)
    4848{
     49#ifdef __32_BITS__
    4950        task_id_t task_id;
    5051        (void) __SYSCALL1(SYS_TASK_GET_ID, (sysarg_t) &task_id);
    5152       
    5253        return task_id;
     54#endif  /* __32_BITS__ */
     55       
     56#ifdef __64_BITS__
     57        return (task_id_t) __SYSCALL0(SYS_TASK_GET_ID);
     58#endif  /* __64_BITS__ */
    5359}
    5460
     
    5965 *
    6066 * @return Zero on success or negative error code.
    61  *
    6267 */
    6368int task_set_name(const char *name)
    6469{
    6570        return __SYSCALL2(SYS_TASK_SET_NAME, (sysarg_t) name, str_size(name));
     71}
     72
     73/** Kill a task.
     74 *
     75 * @param task_id ID of task to kill.
     76 *
     77 * @return Zero on success or negative error code.
     78 */
     79
     80int task_kill(task_id_t task_id)
     81{
     82        return (int) __SYSCALL1(SYS_TASK_KILL, (sysarg_t) &task_id);
    6683}
    6784
     
    211228int task_wait(task_id_t id, task_exit_t *texit, int *retval)
    212229{
    213         ipcarg_t te, rv;
     230        sysarg_t te, rv;
    214231        int rc;
    215232
Note: See TracChangeset for help on using the changeset viewer.