projects
/
org.ibex.util.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ditched Preprocessor
[org.ibex.util.git]
/
src
/
org
/
ibex
/
util
/
Semaphore.java
diff --git
a/src/org/ibex/util/Semaphore.java
b/src/org/ibex/util/Semaphore.java
index
ad8376f
..
b37993c
100644
(file)
--- a/
src/org/ibex/util/Semaphore.java
+++ b/
src/org/ibex/util/Semaphore.java
@@
-12,9
+12,13
@@
public class Semaphore {
private int val = 0;
+ public synchronized void dec() {
+ val--;
+ }
+
/** Decrement the counter, blocking if zero. */
public synchronized void block() {
- while(val == 0) {
+ while(val <= 0) {
try {
wait();
} catch (InterruptedException e) {