Changeset 68091bd in mainline for generic/src/proc/thread.c
- Timestamp:
- 2006-04-21T12:55:55Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c7c0b89b
- Parents:
- 17b1b99
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/proc/thread.c
r17b1b99 r68091bd 454 454 __native sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name) 455 455 { 456 457 456 thread_t *t; 457 char namebuf[THREAD_NAME_BUFLEN]; 458 458 uspace_arg_t *kernel_uarg; 459 459 __u32 tid; 460 460 461 461 copy_from_uspace(namebuf, uspace_name, THREAD_NAME_BUFLEN); 462 462 463 463 kernel_uarg = (uspace_arg_t *) malloc(sizeof(uspace_arg_t), 0); 464 464 copy_from_uspace(kernel_uarg, uspace_uarg, sizeof(uspace_arg_t)); 465 465 466 466 if ((t = thread_create(uinit, kernel_uarg, TASK, 0, namebuf))) { 467 467 tid = t->tid; 468 468 thread_ready(t); 469 469 return (__native) tid; 470 470 } else { 471 471 free(kernel_uarg); 472 473 474 472 } 473 474 return (__native) -1; 475 475 } 476 476 … … 480 480 __native sys_thread_exit(int uspace_status) 481 481 { 482 483 484 485 } 482 thread_exit(); 483 /* Unreachable */ 484 return 0; 485 }
Note:
See TracChangeset
for help on using the changeset viewer.