|
@@ -32,10 +32,6 @@ void *switch_to_tt(void *prev, void *next, void *last)
|
|
|
unsigned long flags;
|
|
|
int err, vtalrm, alrm, prof, cpu;
|
|
|
char c;
|
|
|
- /* jailing and SMP are incompatible, so this doesn't need to be
|
|
|
- * made per-cpu
|
|
|
- */
|
|
|
- static int reading;
|
|
|
|
|
|
from = prev;
|
|
|
to = next;
|
|
@@ -59,13 +55,11 @@ void *switch_to_tt(void *prev, void *next, void *last)
|
|
|
c = 0;
|
|
|
set_current(to);
|
|
|
|
|
|
- reading = 0;
|
|
|
err = os_write_file(to->thread.mode.tt.switch_pipe[1], &c, sizeof(c));
|
|
|
if(err != sizeof(c))
|
|
|
panic("write of switch_pipe failed, err = %d", -err);
|
|
|
|
|
|
- reading = 1;
|
|
|
- if(from->thread.mode.tt.switch_pipe[0] == -1)
|
|
|
+ if(from->thread.mode.tt.switch_pipe[0] == -1)
|
|
|
os_kill_process(os_getpid(), 0);
|
|
|
|
|
|
err = os_read_file(from->thread.mode.tt.switch_pipe[0], &c, sizeof(c));
|