edu.unima.ky.parallel.javaparty
Class CTSemaphore
java.lang.Object
|
+--edu.unima.ky.parallel.javaparty.CTSemaphore
- public class CTSemaphore
- extends java.lang.Object
Semaphore to be used with CommunicationTask
- See Also:
- "CommunicationTaskSemaphore"
Field Summary |
(package private) edu.unima.ky.parallel.javaparty.CommunicationTask |
ct
|
(package private) edu.unima.ky.parallel.Semaphore |
hsem
|
(package private) edu.unima.ky.parallel.javaparty.LogicalTime |
lt
|
(package private) java.lang.Object |
myid
|
(package private) int |
s
|
Constructor Summary |
CTSemaphore(edu.unima.ky.parallel.javaparty.CommunicationTask c)
|
CTSemaphore(edu.unima.ky.parallel.javaparty.CommunicationTask c,
int i)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hsem
edu.unima.ky.parallel.Semaphore hsem
s
int s
lt
edu.unima.ky.parallel.javaparty.LogicalTime lt
ct
edu.unima.ky.parallel.javaparty.CommunicationTask ct
myid
java.lang.Object myid
CTSemaphore
public CTSemaphore(edu.unima.ky.parallel.javaparty.CommunicationTask c)
CTSemaphore
public CTSemaphore(edu.unima.ky.parallel.javaparty.CommunicationTask c,
int i)
init
public void init()
P
public void P()
throws java.lang.InterruptedException
java.lang.InterruptedException
V
public void V()
throws java.lang.InterruptedException
java.lang.InterruptedException
isPositive
public boolean isPositive()
- checks if RemoteSemaphore is positive
terminate
public void terminate()