From 4805d819e5b99ed2dd5ca4c7be757900c4d6b429 Mon Sep 17 00:00:00 2001 From: athomas Date: Sun, 29 Jun 2003 13:05:18 +0000 Subject: modified mutex to allow same thread to acquire lock multiple times. Will implement counting semantics for makeCurrent/freeCurrent symmetry git-svn-id: file:///home/mbien/NetBeansProjects/JOGAMP/joal-sync/git-svn/../svn-server-sync/joal/trunk@45 03bf7f67-59de-4072-a415-9a990d468a3f --- src/java/net/java/games/joal/ALCImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/net/java/games/joal/ALCImpl.java b/src/java/net/java/games/joal/ALCImpl.java index 6e7ccc5..fab3a56 100644 --- a/src/java/net/java/games/joal/ALCImpl.java +++ b/src/java/net/java/games/joal/ALCImpl.java @@ -201,7 +201,7 @@ final class ALCImpl implements ALC { Thread owner = null; public synchronized void acquire() { boolean interrupted = false; - while(owner != null) { + while(owner != null && owner != Thread.currentThread()) { try { wait(); } catch (InterruptedException e) { -- cgit v1.2.3