From ecf2e38db22c2af6586cc7b3b4ada1b6fa6b40cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 25 Nov 2005 12:34:54 +0000 Subject: [PATCH] Reset last_acquirer in case the semaphore gets released. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15144 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/sem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/system/kernel/sem.c b/src/system/kernel/sem.c index 09f3e0253a..4be3a46704 100644 --- a/src/system/kernel/sem.c +++ b/src/system/kernel/sem.c @@ -642,6 +642,10 @@ release_sem_etc(sem_id id, int32 count, uint32 flags) goto err; } +#ifdef DEBUG_LAST_ACQUIRER + sSems[slot].u.used.last_acquirer = -1; +#endif + // clear out a queue we will use to hold all of the threads that we will have to // put back into the run list. This is done so the thread lock wont be held // while this sems lock is held since the two locks are grabbed in the other