diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-02-26 01:44:55 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-02-26 01:44:55 +0100 |
commit | def510d20a47ce28f6b8b494f9212f9ee394aae2 (patch) | |
tree | 71f8762ab6c02c1f5fe9be4284688436bb5ac546 /i386 | |
parent | e7e91cc329b6a064d9703829911e940d7395d0a3 (diff) | |
download | gnumach-def510d20a47ce28f6b8b494f9212f9ee394aae2.tar.gz gnumach-def510d20a47ce28f6b8b494f9212f9ee394aae2.tar.bz2 gnumach-def510d20a47ce28f6b8b494f9212f9ee394aae2.zip |
Document why code is not racy
* i386/i386at/kd_mouse.c (kd_mouse_read): Document why the
assert_wait/thread_block pair is not racy.
Diffstat (limited to 'i386')
-rw-r--r-- | i386/i386at/kd_mouse.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c index 0f1881f4..ece13efe 100644 --- a/i386/i386at/kd_mouse.c +++ b/i386/i386at/kd_mouse.c @@ -630,6 +630,8 @@ int kd_mouse_read(void) while (mousebufindex <= mouse_char_index) { mouse_char_wanted = TRUE; assert_wait((event_t) &mousebuf, FALSE); + /* We are at tty SPL level, interrupts can not happen between + * assert_wait and thread_block. */ thread_block((void (*)()) 0); } |