|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Objecteduni.simjava.Semaphore
A counting semaphore class.
This class is used internally by Sim_system to
synchronize the simulation's entities. Semaphores should not be
needed in user simulations.
Sim_system| Constructor Summary | |
Semaphore()
Allocate a new semaphore object with an initial count of zero. |
|
Semaphore(int count)
Allocates a new semaphore object with a given initial count. |
|
| Method Summary | |
void |
p()
Try to obtain the semaphore. |
void |
v()
Free the semaphore, by incrementing the internal count. |
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Semaphore()
public Semaphore(int count)
count - The initial count of the semaphore.| Method Detail |
public void p()
public void v()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||