Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/main/uinit.c

    r5a5269d r3fcea34  
    5656void uinit(void *arg)
    5757{
    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 
    6858#ifdef CONFIG_UDEBUG
    6959        udebug_stoppable_end();
    7060#endif
    7161
    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;
    8265        free(uarg);
    8366
    84         userspace(&local_uarg);
     67        userspace(pc, sp);
    8568}
    8669
Note: See TracChangeset for help on using the changeset viewer.