{
struct thread *nh, *ct = current_thread;
- if (evloop.holder == ct) {
+ if (ct && evloop.holder == ct) {
nh = ct->nholder;
evloop.holder = nh;
if (nh)
if (evloop.holder)
return evloop.holder == ct;
+ if (!evloop.sdev)
+ return 0;
+
ct->nholder = NULL;
evloop.holder = ct;
return 1;
*/
static void thread_enter(volatile struct thread *me)
{
+ evloop_release();
/* initialize description of itself and link it in the list */
me->tid = pthread_self();
me->stop = 0;