Changeset f6d2c81 in mainline for kernel/generic/src/proc/thread.c
- Timestamp:
- 2007-05-30T19:50:24Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c31e536
- Parents:
- 51ec40f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
r51ec40f rf6d2c81 300 300 task_destroy(t->task); 301 301 302 /* 303 * If the thread had a userspace context, free up its kernel_uarg 304 * structure. 305 */ 306 if (t->flags & THREAD_FLAG_USPACE) { 307 ASSERT(t->thread_arg); 308 free(t->thread_arg); 309 } 310 302 311 slab_free(thread_slab, t); 303 312 } … … 313 322 * @param name Symbolic name. 314 323 * @param uncounted Thread's accounting doesn't affect accumulated task 315 * accounting.324 * accounting. 316 325 * 317 326 * @return New thread's structure on success, NULL on failure. … … 319 328 */ 320 329 thread_t *thread_create(void (* func)(void *), void *arg, task_t *task, 321 330 int flags, char *name, bool uncounted) 322 331 { 323 332 thread_t *t; … … 638 647 * 639 648 */ 640 unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name, thread_id_t *uspace_thread_id) 649 unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name, 650 thread_id_t *uspace_thread_id) 641 651 { 642 652 thread_t *t; … … 661 671 thread_ready(t); 662 672 if (uspace_thread_id != NULL) 663 return (unative_t) copy_to_uspace(uspace_thread_id, &t->tid,664 sizeof(t->tid));673 return (unative_t) copy_to_uspace(uspace_thread_id, 674 &t->tid, sizeof(t->tid)); 665 675 else 666 676 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.