diff options
Diffstat (limited to 'kernel/console.c')
-rw-r--r-- | kernel/console.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/console.c b/kernel/console.c index 23a2d35..b8fa1de 100644 --- a/kernel/console.c +++ b/kernel/console.c @@ -89,7 +89,7 @@ consoleread(int user_dst, uint64 dst, int n) // wait until interrupt handler has put some // input into cons.buffer. while(cons.r == cons.w){ - if(myproc()->killed){ + if(__sync_add_and_fetch(&(myproc()->killed), 0)){ release(&cons.lock); return -1; } |