From 27347625c320209e12fdd289305b876ba1f1f94d Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Mon, 17 Dec 2012 00:51:26 +0100 Subject: 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. --- console-client/pc-mouse.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'console-client') 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)]; -- cgit v1.2.3