diff options
author | Cyril Roelandt <tipecaml@gmail.com> | 2012-12-17 00:51:26 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-12-17 01:21:05 +0100 |
commit | 27347625c320209e12fdd289305b876ba1f1f94d (patch) | |
tree | cdba2e637f3db4ad2b836a0f0495664ceed078b1 | |
parent | 03572bbcca89fa3034e4afe97818fc95284afadf (diff) |
Fix double call to pthread_mutex_unlock in repeat_event().
* console-client/pc-mouse.c (repeat_event): remove a redundant call to
pthread_mutex_unlock.
-rw-r--r-- | console-client/pc-mouse.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/console-client/pc-mouse.c b/console-client/pc-mouse.c index 1b7bb5d7..2cec2042 100644 --- a/console-client/pc-mouse.c +++ b/console-client/pc-mouse.c @@ -93,12 +93,9 @@ repeat_event (kd_event *evt) pthread_mutex_lock (&global_lock); while (mousebuf.size + sizeof (kd_event) > MOUSEBUFSZ) { - /* The input buffer is full, wait until there is some space. */ - if (pthread_hurd_cond_wait_np (&mousebuf.writecond, &global_lock)) - { - pthread_mutex_unlock (&global_lock); - /* Interrupt, silently continue. */ - } + /* The input buffer is full, wait until there is some space. If this call + * is interrupted, silently continue */ + (void) pthread_hurd_cond_wait_np (&mousebuf.writecond, &global_lock); } ev = (kd_event *) &mousebuf.evtbuffer[MOUSEBUF_POS (mousebuf.pos + mousebuf.size)]; |