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