60,8 → 60,6 |
#include <mm/slab.h> |
#include <debug.h> |
#include <main/uinit.h> |
#include <syscall/copy.h> |
#include <errno.h> |
|
char *thread_states[] = {"Invalid", "Running", "Sleeping", "Ready", "Entering", "Exiting"}; /**< Thread states */ |
|
305,9 → 303,6 |
timeout_initialize(&t->sleep_timeout); |
t->sleep_queue = NULL; |
t->timeout_pending = 0; |
|
t->in_copy_from_uspace = false; |
t->in_copy_to_uspace = false; |
|
t->rwlock_holder_type = RWLOCK_NONE; |
|
467,18 → 462,11 |
char namebuf[THREAD_NAME_BUFLEN]; |
uspace_arg_t *kernel_uarg; |
__u32 tid; |
int rc; |
|
rc = copy_from_uspace(namebuf, uspace_name, THREAD_NAME_BUFLEN); |
if (rc != 0) |
return (__native) rc; |
copy_from_uspace(namebuf, uspace_name, THREAD_NAME_BUFLEN); |
|
kernel_uarg = (uspace_arg_t *) malloc(sizeof(uspace_arg_t), 0); |
rc = copy_from_uspace(kernel_uarg, uspace_uarg, sizeof(uspace_arg_t)); |
if (rc != 0) { |
free(kernel_uarg); |
return (__native) rc; |
} |
copy_from_uspace(kernel_uarg, uspace_uarg, sizeof(uspace_arg_t)); |
|
if ((t = thread_create(uinit, kernel_uarg, TASK, 0, namebuf))) { |
tid = t->tid; |
488,7 → 476,7 |
free(kernel_uarg); |
} |
|
return (__native) ENOMEM; |
return (__native) -1; |
} |
|
/** Process syscall to terminate thread. |