Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1427 → Rev 1426

/uspace/trunk/libc/generic/psthread.c
117,9 → 117,6
 
/** Schedule next userspace pseudo thread.
*
* If calling with PS_TO_MANAGER parameter, the async_futex should be
* held.
*
* @param tomanager If true, we are switching to next ready manager thread
* (if none is found, thread is exited)
* @param frommanager If true, we are switching from manager thread
139,11 → 136,8
goto ret_0;
}
/* If we are going to manager and none exists, create it */
while (ctype == PS_TO_MANAGER && list_empty(&manager_list)) {
futex_up(&psthread_futex);
if (ctype == PS_TO_MANAGER && list_empty(&manager_list))
async_create_manager();
futex_down(&psthread_futex);
}
 
pt = __tcb_get()->pst_data;
if (!context_save(&pt->ctx))
265,9 → 259,3
list_remove(manager_list.next);
futex_up(&psthread_futex);
}
 
/** Return thread id of current running thread */
pstid_t psthread_get_id(void)
{
return (pstid_t)__tcb_get()->pst_data;
}