Changeset e3c762cd in mainline for generic/src/proc/thread.c
- Timestamp:
- 2006-05-05T11:59:19Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- de07bcf
- Parents:
- 22cf454d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/proc/thread.c
r22cf454d re3c762cd 61 61 #include <debug.h> 62 62 #include <main/uinit.h> 63 #include <syscall/copy.h> 64 #include <errno.h> 63 65 64 66 char *thread_states[] = {"Invalid", "Running", "Sleeping", "Ready", "Entering", "Exiting"}; /**< Thread states */ … … 304 306 t->sleep_queue = NULL; 305 307 t->timeout_pending = 0; 308 309 t->in_copy_from_uspace = false; 310 t->in_copy_to_uspace = false; 306 311 307 312 t->rwlock_holder_type = RWLOCK_NONE; … … 463 468 uspace_arg_t *kernel_uarg; 464 469 __u32 tid; 465 466 copy_from_uspace(namebuf, uspace_name, THREAD_NAME_BUFLEN); 470 int rc; 471 472 rc = copy_from_uspace(namebuf, uspace_name, THREAD_NAME_BUFLEN); 473 if (rc != 0) 474 return (__native) rc; 467 475 468 476 kernel_uarg = (uspace_arg_t *) malloc(sizeof(uspace_arg_t), 0); 469 copy_from_uspace(kernel_uarg, uspace_uarg, sizeof(uspace_arg_t)); 477 rc = copy_from_uspace(kernel_uarg, uspace_uarg, sizeof(uspace_arg_t)); 478 if (rc != 0) { 479 free(kernel_uarg); 480 return (__native) rc; 481 } 470 482 471 483 if ((t = thread_create(uinit, kernel_uarg, TASK, 0, namebuf))) { … … 477 489 } 478 490 479 return (__native) -1;491 return (__native) ENOMEM; 480 492 } 481 493
Note:
See TracChangeset
for help on using the changeset viewer.