Changeset ec55358 in mainline


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.

Location:
generic
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • generic/include/proc/task.h

    r1077d91 rec55358  
    6060extern task_t *task_run_program(void *program_addr, char *name);
    6161
     62extern __native sys_get_task_id(task_id_t *uspace_task_id);
     63
    6264#endif
  • generic/include/syscall/syscall.h

    r1077d91 rec55358  
    3939        SYS_MMAP,
    4040        SYS_MREMAP,
     41        SYS_GET_TASK_ID,
    4142        SYS_IPC_CALL_SYNC_FAST,
    4243        SYS_IPC_CALL_SYNC,
  • 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)
  • generic/src/syscall/syscall.c

    r1077d91 rec55358  
    8383        sys_mmap,
    8484        sys_mremap,
     85        sys_get_task_id,
    8586        sys_ipc_call_sync_fast,
    8687        sys_ipc_call_sync,
Note: See TracChangeset for help on using the changeset viewer.