Changeset dd8d5a7 in mainline for kernel/generic/src/proc/task.c


Ignore:
Timestamp:
2010-12-14T15:44:23Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
228e490
Parents:
6b10dab
Message:

32/64 ABI split for SYS_TASK_GET_ID

File:
1 edited

Legend:

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

    r6b10dab rdd8d5a7  
    290290}
    291291
    292 /** Syscall for reading task ID from userspace.
    293  *
    294  * @param uspace_task_id Userspace address of 8-byte buffer
    295  *                       where to store current task ID.
     292#ifdef __32_BITS__
     293
     294/** Syscall for reading task ID from userspace (32 bits)
     295 *
     296 * @param uspace_taskid Pointer to user-space buffer
     297 *                      where to store current task ID.
    296298 *
    297299 * @return Zero on success or an error code from @ref errno.h.
    298300 *
    299301 */
    300 sysarg_t sys_task_get_id(task_id_t *uspace_task_id)
     302sysarg_t sys_task_get_id(sysarg64_t *uspace_taskid)
    301303{
    302304        /*
     
    304306         * the lifespan of the task.
    305307         */
    306         return (sysarg_t) copy_to_uspace(uspace_task_id, &TASK->taskid,
     308        return (sysarg_t) copy_to_uspace(uspace_taskid, &TASK->taskid,
    307309            sizeof(TASK->taskid));
    308310}
     311
     312#endif  /* __32_BITS__ */
     313
     314#ifdef __64_BITS__
     315
     316/** Syscall for reading task ID from userspace (64 bits)
     317 *
     318 * @return Current task ID.
     319 *
     320 */
     321sysarg_t sys_task_get_id(void)
     322{
     323        /*
     324         * No need to acquire lock on TASK because taskid remains constant for
     325         * the lifespan of the task.
     326         */
     327        return TASK->taskid;
     328}
     329
     330#endif  /* __64_BITS__ */
    309331
    310332/** Syscall for setting the task name.
Note: See TracChangeset for help on using the changeset viewer.