Public Methods | |
Monitor () | |
Monitor (int lt, int lc, List wt) | |
boolean | checkLock (ThreadInfo th) |
boolean | checkLockAfterNotified (ThreadInfo th) |
Object | clone () |
boolean | equals (Object obj) |
int | getLockCount () |
int | getLockingThread () |
List | getWaitingThreads () |
void | hash (HashData hd) |
int | hashCode () |
boolean | lock (ThreadInfo th, Ref ref) |
boolean | lockAfterNotified (ThreadInfo th, Ref ref) |
void | notify (KernelState ks, Scheduler sch) |
void | notifyAll (KernelState ks) |
void | unlock (ThreadInfo th, Ref ref) |
void | wait (ThreadInfo th, Ref ref) |
Monitor () | |
boolean | canLock (ThreadInfo th) |
Object | clone () |
boolean | equals (Object o) |
int | getLockCount () |
int | getLockingThread () |
int[] | getWaitingThreads () |
void | hash (HashData hd) |
int | hashCode () |
void | interrupt (ThreadInfo th) |
void | lock (ThreadInfo th, Ref ref) |
void | lockNotified (ThreadInfo th, Ref ref) |
void | log () |
void | notify (SystemState ss) |
void | notifyAll (SystemState ss) |
String | toString () |
void | unlock (ThreadInfo th, Ref ref) |
void | wait (ThreadInfo th, Ref ref) |
Private Methods | |
void | ANALYZE_lock (ThreadInfo th, Ref ref) |
void | ANALYZE_unlock (ThreadInfo th, Ref ref) |
void | ANALYZE_wait (ThreadInfo th, Ref ref) |
void | LOCKORDER_lock (ThreadInfo th, Ref ref) |
void | LOCKORDER_unlock (ThreadInfo th) |
void | LOCKORDER_wait (ThreadInfo th) |
int | remove (int index) |
Private Attributes | |
int | locking_thread = -1 |
int | lock_count = 0 |
List | waiting_threads = new ArrayList() |
int | lockingThread |
int | lockCount |
int[] | waitingThreads |
Definition at line 12 of file lib/jpf/gov/nasa/arc/ase/jpf/jvm/Monitor.java.
|
Creates a new empty monitor. Definition at line 39 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. Referenced by clone().
|
|
Returns true if it is possible to lock the monitor. Definition at line 47 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. |
|
Creates a clone of the monitor. Definition at line 55 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. |
|
Compares to another object. Definition at line 68 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. |
|
Returns the number of nested locks acquired. Definition at line 89 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. Referenced by equals().
|
|
Returns the identifier of the thread holding the lock. Definition at line 95 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. Referenced by equals().
|
|
Returns the list of waiting threads. Definition at line 101 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. |
|
Interrupts one of the threads holding the lock. Definition at line 121 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. |
|
Acquires the lock for a given object or class. Definition at line 128 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. |
|
Tries to require the lock after being notified. Definition at line 143 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. |
|
Notifies one of the threads. The thread is chosen non deterministically. Definition at line 173 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. |
|
Notifies all waiting threads. Definition at line 185 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. |
|
Releases the lock. The lock can be still held by the thread if it had been locked more than once. Definition at line 230 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. |
|
Waits to be notified. Releases the lock and waits. Definition at line 246 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. |
|
The number of nested locks acquired. Definition at line 29 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. |
|
The identifier of the thread locking an object. Definition at line 24 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. |
|
The list of threads waiting to be notified. Definition at line 34 of file src/gov/nasa/arc/ase/jpf/jvm/Monitor.java. |