124,11 → 124,10 |
* @param function Function implementing the thread. |
* @param arg Argument to be passed to thread. |
* @param name Symbolic name of the thread. |
* @param tid Thread ID of the newly created thread. |
* |
* @return Zero on success or a code from @ref errno.h on failure. |
* @return TID of the new thread on success or -1 on failure. |
*/ |
int thread_create(void (* function)(void *), void *arg, char *name, thread_id_t *tid) |
int thread_create(void (* function)(void *), void *arg, char *name) |
{ |
char *stack; |
uspace_arg_t *uarg; |
149,7 → 148,7 |
uarg->uspace_thread_arg = arg; |
uarg->uspace_uarg = uarg; |
|
return __SYSCALL3(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name, (sysarg_t) tid); |
return __SYSCALL2(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name); |
} |
|
/** Terminate current thread. |
167,7 → 166,7 |
* |
* @param thread TID. |
*/ |
void thread_detach(thread_id_t thread) |
void thread_detach(int thread) |
{ |
} |
|
179,7 → 178,7 |
* |
* @return Thread exit status. |
*/ |
int thread_join(thread_id_t thread) |
int thread_join(int thread) |
{ |
} |
|
187,13 → 186,9 |
* |
* @return Current thread ID. |
*/ |
thread_id_t thread_get_id(void) |
int thread_get_id(void) |
{ |
thread_id_t thread_id; |
|
(void) __SYSCALL1(SYS_THREAD_GET_ID, (sysarg_t) &thread_id); |
|
return thread_id; |
return __SYSCALL0(SYS_THREAD_GET_ID); |
} |
|
/** @} |