Subversion Repositories HelenOS

Rev

Rev 2436 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2436 Rev 2469
Line 104... Line 104...
104
 
104
 
105
    pt = psthread_setup();
105
    pt = psthread_setup();
106
    __tcb_set(pt->tcb);
106
    __tcb_set(pt->tcb);
107
   
107
   
108
    uarg->uspace_thread_function(uarg->uspace_thread_arg);
108
    uarg->uspace_thread_function(uarg->uspace_thread_arg);
-
 
109
    /* XXX: we cannot free the userspace stack while running on it */
109
    free(uarg->uspace_stack);
110
    free(uarg->uspace_stack);
110
    free(uarg);
111
    free(uarg);
111
 
112
 
112
    /* If there is a manager, destroy it */
113
    /* If there is a manager, destroy it */
113
    async_destroy_manager();
114
    async_destroy_manager();
Line 152... Line 153...
152
    uarg->uspace_uarg = uarg;
153
    uarg->uspace_uarg = uarg;
153
   
154
   
154
    rc = __SYSCALL3(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name,
155
    rc = __SYSCALL3(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name,
155
        (sysarg_t) tid);
156
        (sysarg_t) tid);
156
   
157
   
157
    if (!rc) {
158
    if (rc) {
158
        /*
159
        /*
159
         * Failed to create a new thread.
160
         * Failed to create a new thread.
160
         * Free up the allocated structures.
161
         * Free up the allocated structures.
161
         */
162
         */
162
        free(uarg);
163
        free(uarg);