Changes in kernel/generic/src/main/uinit.c [3fcea34:5a5269d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/main/uinit.c
r3fcea34 r5a5269d 56 56 void uinit(void *arg) 57 57 { 58 /* 59 * So far, we don't have a use for joining userspace threads so we 60 * immediately detach each uinit thread. If joining of userspace threads 61 * is required, some userspace API based on the kernel mechanism will 62 * have to be implemented. Moreover, garbage collecting of threads that 63 * didn't detach themselves and nobody else joined them will have to be 64 * deployed for the event of forceful task termination. 65 */ 66 thread_detach(THREAD); 67 58 68 #ifdef CONFIG_UDEBUG 59 69 udebug_stoppable_end(); 60 70 #endif 61 71 62 uinit_arg_t *uarg = arg; 63 sysarg_t pc = uarg->pc; 64 sysarg_t sp = uarg->sp; 72 uspace_arg_t *uarg = arg; 73 uspace_arg_t local_uarg; 74 75 local_uarg.uspace_entry = uarg->uspace_entry; 76 local_uarg.uspace_stack = uarg->uspace_stack; 77 local_uarg.uspace_stack_size = uarg->uspace_stack_size; 78 local_uarg.uspace_uarg = uarg->uspace_uarg; 79 local_uarg.uspace_thread_function = USPACE_NULL; 80 local_uarg.uspace_thread_arg = USPACE_NULL; 81 65 82 free(uarg); 66 83 67 userspace( pc, sp);84 userspace(&local_uarg); 68 85 } 69 86
Note:
See TracChangeset
for help on using the changeset viewer.