Changeset 4680ef5 in mainline
- Timestamp:
- 2007-06-13T21:36:59Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8b243f2
- Parents:
- 341140c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
r341140c r4680ef5 386 386 task_destroy(t->task); 387 387 388 /*389 * If the thread had a userspace context, free up its kernel_uarg390 * structure.391 */392 if (t->flags & THREAD_FLAG_USPACE) {393 ASSERT(t->thread_arg);394 free(t->thread_arg);395 }396 397 388 slab_free(thread_slab, t); 398 389 } … … 683 674 return (unative_t) rc; 684 675 685 kernel_uarg = (uspace_arg_t *) malloc(sizeof(uspace_arg_t), 0); 676 /* 677 * In case of failure, kernel_uarg will be deallocated in this function. 678 * In case of success, kernel_uarg will be freed in uinit(). 679 */ 680 kernel_uarg = (uspace_arg_t *) malloc(sizeof(uspace_arg_t), 0); 681 686 682 rc = copy_from_uspace(kernel_uarg, uspace_uarg, sizeof(uspace_arg_t)); 687 683 if (rc != 0) { -
uspace/libc/generic/thread.c
r341140c r4680ef5 108 108 uarg->uspace_thread_function(uarg->uspace_thread_arg); 109 109 /* XXX: we cannot free the userspace stack while running on it */ 110 free(uarg->uspace_stack);111 free(uarg);110 // free(uarg->uspace_stack); 111 // free(uarg); 112 112 113 113 /* If there is a manager, destroy it */
Note:
See TracChangeset
for help on using the changeset viewer.