private int releaseMutex() { int count = 1; if (remutex_ != null) count = remutex_.releaseAll(); else mutex_.release(); return count; }
private void acquireMutex(int count) throws InterruptedException { if (remutex_ != null) remutex_.acquireAll(count); else mutex_.acquire(); }
public void postAction(FSM fsm) { AOMEntry entry = (AOMEntry) fsm; entry.wait.broadcast(); } };
public Guard.Result evaluate(FSM fsm, Input in) { AOMEntry entry = (AOMEntry) fsm; try { entry.wait.await(); } catch (InterruptedException exc) { // XXX Log this // NO-OP } return Guard.Result.DEFERED; } };
public AOMEntry(POAImpl poa) { super(engine, INVALID, (poa.getORB()).poaFSMDebugFlag); this.poa = poa; etherealizer = new Thread[1]; etherealizer[0] = null; counter = new int[1]; counter[0] = 0; wait = new CondVar(poa.poaMutex, (poa.getORB()).poaConcurrencyDebugFlag); }
void lock() { SyncUtil.acquire(poaMutex); if (debug) { ORBUtility.dprint(this, "LOCKED poa " + this); } }
void unlock() { if (debug) { ORBUtility.dprint(this, "UNLOCKED poa " + this); } poaMutex.release(); }
/** * Method to acquire a Sync without ever throwing an InterruptedException. Useful when a mutex is being used in * place of Java synchronization. */ public static void acquire(Sync sync) { boolean held = false; while (!held) { try { sync.acquire(); held = true; } catch (InterruptedException exc) { held = false; } } } }
private int releaseMutex() { int count = 1; if (remutex_ != null) count = remutex_.releaseAll(); else mutex_.release(); return count; }
private void acquireMutex(int count) throws InterruptedException { if (remutex_ != null) remutex_.acquireAll(count); else mutex_.acquire(); }
public void postAction(FSM fsm) { AOMEntry entry = (AOMEntry) fsm; entry.wait.broadcast(); } };
public Guard.Result evaluate(FSM fsm, Input in) { AOMEntry entry = (AOMEntry) fsm; try { entry.wait.await(); } catch (InterruptedException exc) { // XXX Log this // NO-OP } return Guard.Result.DEFERED; } };
public AOMEntry(POAImpl poa) { super(engine, INVALID, (poa.getORB()).poaFSMDebugFlag); this.poa = poa; etherealizer = new Thread[1]; etherealizer[0] = null; counter = new int[1]; counter[0] = 0; wait = new CondVar(poa.poaMutex, (poa.getORB()).poaConcurrencyDebugFlag); }
void lock() { SyncUtil.acquire(poaMutex); if (debug) { ORBUtility.dprint(this, "LOCKED poa " + this); } }
void unlock() { if (debug) { ORBUtility.dprint(this, "UNLOCKED poa " + this); } poaMutex.release(); }
/** * Method to acquire a Sync without ever throwing an InterruptedException. Useful when a mutex is being used in * place of Java synchronization. */ public static void acquire(Sync sync) { boolean held = false; while (!held) { try { sync.acquire(); held = true; } catch (InterruptedException exc) { held = false; } } } }
public void postAction(FSM fsm) { AOMEntry entry = (AOMEntry) fsm; entry.wait.broadcast(); } };
private boolean waitUntilRunning() { if (debug) { ORBUtility.dprint(this, "Calling waitUntilRunning on poa " + this); } while (state < STATE_RUN) { try { adapterActivatorCV.await(); } catch (InterruptedException exc) { // NO-OP } } if (debug) { ORBUtility.dprint(this, "Exiting waitUntilRunning on poa " + this); } // Note that a POA could be destroyed while in STATE_INIT due to a failure in the AdapterActivator upcall. return (state == STATE_RUN); }
public void postAction(FSM fsm) { AOMEntry entry = (AOMEntry) fsm; entry.wait.broadcast(); } };
private boolean waitUntilRunning() { if (debug) { ORBUtility.dprint(this, "Calling waitUntilRunning on poa " + this); } while (state < STATE_RUN) { try { adapterActivatorCV.await(); } catch (InterruptedException exc) { // NO-OP } } if (debug) { ORBUtility.dprint(this, "Exiting waitUntilRunning on poa " + this); } // Note that a POA could be destroyed while in STATE_INIT due to a failure in the AdapterActivator upcall. return (state == STATE_RUN); }