From 7a67c93f8e92bfbac8fd786831e0d75d3e7796c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 18 Nov 2005 12:04:28 +0000 Subject: [PATCH] Turns out B_RELEASE_ALL just works as expected - it was a deadlock by design; when the cursor thread didn't call acquire_sem() fast enough, it would never get released by B_RELEASE_ALL (as that only releases all waiting threads), and thus, waited forever for the semaphore to be released again. On the other side, the input_server didn't call release_sem() anymore, since the cursor thread still didn't read out the data after the last release... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15014 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/input/InputServer.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/servers/input/InputServer.cpp b/src/servers/input/InputServer.cpp index 3576c630f2..3398063d7f 100644 --- a/src/servers/input/InputServer.cpp +++ b/src/servers/input/InputServer.cpp @@ -1599,11 +1599,8 @@ InputServer::_DispatchEvent(BMessage* event) #else atomic_set((int32*)&fCursorBuffer->pos, (uint32)fMousePos.x << 16UL | ((uint32)fMousePos.y & 0xffff)); - if (atomic_or(&fCursorBuffer->read, 1) == 0) { + if (atomic_or(&fCursorBuffer->read, 1) == 0) release_sem(fCursorSem); - // TODO: this doesn't work for some reason... -// release_sem_etc(fCursorSem, 0, B_RELEASE_ALL); - } #endif } break;