Subversion Repositories HelenOS

Rev

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

Rev 3604 Rev 3613
Line 67... Line 67...
67
{
67
{
68
    mutex_initialize(&ut->lock, MUTEX_PASSIVE);
68
    mutex_initialize(&ut->lock, MUTEX_PASSIVE);
69
    waitq_initialize(&ut->go_wq);
69
    waitq_initialize(&ut->go_wq);
70
 
70
 
71
    ut->go_call = NULL;
71
    ut->go_call = NULL;
-
 
72
    ut->uspace_state = NULL;
72
    ut->go = false;
73
    ut->go = false;
73
    ut->stoppable = true;
74
    ut->stoppable = true;
74
    ut->debug_active = false;
75
    ut->debug_active = false;
75
    ut->cur_event = 0; /* none */
76
    ut->cur_event = 0; /* none */
76
}
77
}
Line 229... Line 230...
229
    }
230
    }
230
}
231
}
231
 
232
 
232
/** Upon being scheduled to run, check if the current thread should stop.
233
/** Upon being scheduled to run, check if the current thread should stop.
233
 *
234
 *
234
 * This function is called from clock(). Preemption is enabled.
235
 * This function is called from clock().
235
 * interrupts are disabled, but since this is called after
-
 
236
 * being scheduled-in, we can enable them, if we're careful enough
-
 
237
 * not to allow arbitrary recursion or deadlock with the thread context.
-
 
238
 */
236
 */
239
void udebug_before_thread_runs(void)
237
void udebug_before_thread_runs(void)
240
{
238
{
241
    ipl_t ipl;
-
 
242
 
-
 
243
    return;
-
 
244
 
-
 
245
    ipl = interrupts_enable();
-
 
246
 
-
 
247
    /* Now we're free to do whatever we need (lock mutexes, sleep, etc.) */
-
 
248
 
-
 
249
    /* Check if we're supposed to stop */
239
    /* Check if we're supposed to stop */
250
    udebug_stoppable_begin();
240
    udebug_stoppable_begin();
251
    udebug_stoppable_end();
241
    udebug_stoppable_end();
252
 
-
 
253
    interrupts_restore(ipl);
-
 
254
}
242
}
255
 
243
 
256
/** Syscall event hook.
244
/** Syscall event hook.
257
 *
245
 *
258
 * Must be called before and after servicing a system call. This generates
246
 * Must be called before and after servicing a system call. This generates