Subversion Repositories HelenOS-historic

Rev

Rev 1757 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1757 Rev 1780
Line 238... Line 238...
238
 *
238
 *
239
 * @param uspace_task_id Userspace address of 8-byte buffer where to store current task ID.
239
 * @param uspace_task_id Userspace address of 8-byte buffer where to store current task ID.
240
 *
240
 *
241
 * @return 0 on success or an error code from @ref errno.h.
241
 * @return 0 on success or an error code from @ref errno.h.
242
 */
242
 */
243
__native sys_task_get_id(task_id_t *uspace_task_id)
243
unative_t sys_task_get_id(task_id_t *uspace_task_id)
244
{
244
{
245
    /*
245
    /*
246
     * No need to acquire lock on TASK because taskid
246
     * No need to acquire lock on TASK because taskid
247
     * remains constant for the lifespan of the task.
247
     * remains constant for the lifespan of the task.
248
     */
248
     */
249
    return (__native) copy_to_uspace(uspace_task_id, &TASK->taskid, sizeof(TASK->taskid));
249
    return (unative_t) copy_to_uspace(uspace_task_id, &TASK->taskid, sizeof(TASK->taskid));
250
}
250
}
251
 
251
 
252
/** Find task structure corresponding to task ID.
252
/** Find task structure corresponding to task ID.
253
 *
253
 *
254
 * The tasks_lock must be already held by the caller of this function
254
 * The tasks_lock must be already held by the caller of this function