Changeset e6a78b9 in mainline for kernel/generic/src/main/uinit.c


Ignore:
Timestamp:
2012-06-29T15:31:44Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9432f08
Parents:
34ab31c (diff), 0bbd13e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r34ab31c re6a78b9  
    5656void uinit(void *arg)
    5757{
    58         uspace_arg_t uarg;
    59        
    6058        /*
    6159         * So far, we don't have a use for joining userspace threads so we
     
    7270#endif
    7371       
    74         uarg.uspace_entry = ((uspace_arg_t *) arg)->uspace_entry;
    75         uarg.uspace_stack = ((uspace_arg_t *) arg)->uspace_stack;
    76         uarg.uspace_uarg = ((uspace_arg_t *) arg)->uspace_uarg;
    77         uarg.uspace_thread_function = NULL;
    78         uarg.uspace_thread_arg = NULL;
     72        uspace_arg_t *uarg = (uspace_arg_t *) arg;
     73        uspace_arg_t local_uarg;
    7974       
    80         free((uspace_arg_t *) arg);
     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 = NULL;
     80        local_uarg.uspace_thread_arg = NULL;
    8181       
    82         userspace(&uarg);
     82        free(uarg);
     83       
     84        userspace(&local_uarg);
    8385}
    8486
Note: See TracChangeset for help on using the changeset viewer.