Changeset ec55358 in mainline for generic/src/proc/task.c


Ignore:
Timestamp:
2006-04-12T11:59:36Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b7f364e
Parents:
1077d91
Message:

Kernel support for SYS_GET_TASK_ID syscall.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/proc/task.c

    r1077d91 rec55358  
    156156}
    157157
     158/** Syscall for reading task ID from userspace.
     159 *
     160 * @param uaddr Userspace address of 8-byte buffer where to store current task ID.
     161 *
     162 * @return Always returns 0.
     163 */
     164__native sys_get_task_id(task_id_t *uspace_task_id)
     165{
     166        /*
     167         * No need to acquire lock on TASK because taskid
     168         * remains constant for the lifespan of the task.
     169         */
     170        copy_to_uspace(uspace_task_id, &TASK->taskid, sizeof(TASK->taskid));
     171
     172        return 0;
     173}
     174
    158175/** Print task list */
    159176void task_print_list(void)
Note: See TracChangeset for help on using the changeset viewer.