Add interrupt_harness()
This commit is contained in:
parent
dff260f74a
commit
420d53c511
|
@ -33,6 +33,7 @@ typedef unsigned char u_char;
|
|||
# error Define STACK_SIZE for your platform. It should probably not be less than 32k?
|
||||
#endif
|
||||
|
||||
static volatile int harness_running = 1;
|
||||
Process *current_process = NULL;
|
||||
|
||||
#define EMPTY_PROCESS_QUEUE ((queue_t) { offsetof(Process, link), 0, NULL, NULL })
|
||||
|
@ -234,7 +235,13 @@ void boot_harness(void) {
|
|||
//info("Polling for events\n");
|
||||
event_loop(EVLOOP_NONBLOCK);
|
||||
}
|
||||
if (!harness_running) break;
|
||||
//info("Blocking for events\n");
|
||||
event_loop(EVLOOP_ONCE);
|
||||
}
|
||||
}
|
||||
|
||||
void interrupt_harness(void) {
|
||||
info("Interrupting harness\n");
|
||||
harness_running = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue