int threadIndex = indexOf(owner, true); if (resize) resizeGraph(); if (graph[threadIndex][lockIndex] == WAITING_FOR_LOCK) graph[threadIndex][lockIndex] = NO_STATE;
int threadIndex = indexOf(owner, true); if (resize) resizeGraph(); if (graph[threadIndex][lockIndex] == WAITING_FOR_LOCK) graph[threadIndex][lockIndex] = NO_STATE;
int threadIndex = indexOf(owner, true); if (resize) resizeGraph(); if (graph[threadIndex][lockIndex] == WAITING_FOR_LOCK) graph[threadIndex][lockIndex] = NO_STATE;
int threadIndex = indexOf(owner, true); if (resize) resizeGraph(); if (graph[threadIndex][lockIndex] == WAITING_FOR_LOCK) graph[threadIndex][lockIndex] = NO_STATE;
/** * The given thread is waiting for the given lock. Update the graph. */ private void setToWait(Thread owner, ISchedulingRule lock, boolean suspend) { boolean needTransfer = false; /** * if we are adding an entry where a thread is waiting on a scheduling rule, * then we need to transfer all positive entries for a conflicting rule to the * newly added rule in order to synchronize the graph. */ if (!suspend && !(lock instanceof ILock)) needTransfer = true; int lockIndex = indexOf(lock, !suspend); int threadIndex = indexOf(owner, !suspend); if (resize) resizeGraph(); graph[threadIndex][lockIndex] = WAITING_FOR_LOCK; if (needTransfer) fillPresentEntries(lock, lockIndex); }
/** * The given thread is waiting for the given lock. Update the graph. */ private void setToWait(Thread owner, ISchedulingRule lock, boolean suspend) { boolean needTransfer = false; /** * if we are adding an entry where a thread is waiting on a scheduling rule, * then we need to transfer all positive entries for a conflicting rule to the * newly added rule in order to synchronize the graph. */ if (!suspend && !(lock instanceof ILock)) needTransfer = true; int lockIndex = indexOf(lock, !suspend); int threadIndex = indexOf(owner, !suspend); if (resize) resizeGraph(); graph[threadIndex][lockIndex] = WAITING_FOR_LOCK; if (needTransfer) fillPresentEntries(lock, lockIndex); }
/** * The given thread is waiting for the given lock. Update the graph. */ private void setToWait(Thread owner, ISchedulingRule lock, boolean suspend) { boolean needTransfer = false; /** * if we are adding an entry where a thread is waiting on a scheduling rule, * then we need to transfer all positive entries for a conflicting rule to the * newly added rule in order to synchronize the graph. */ if (!suspend && !(lock instanceof ILock)) needTransfer = true; int lockIndex = indexOf(lock, !suspend); int threadIndex = indexOf(owner, !suspend); if (resize) resizeGraph(); graph[threadIndex][lockIndex] = WAITING_FOR_LOCK; if (needTransfer) fillPresentEntries(lock, lockIndex); }
/** * The given thread is waiting for the given lock. Update the graph. */ private void setToWait(Thread owner, ISchedulingRule lock, boolean suspend) { boolean needTransfer = false; /** * if we are adding an entry where a thread is waiting on a scheduling rule, * then we need to transfer all positive entries for a conflicting rule to the * newly added rule in order to synchronize the graph. */ if (!suspend && !(lock instanceof ILock)) needTransfer = true; int lockIndex = indexOf(lock, !suspend); int threadIndex = indexOf(owner, !suspend); if (resize) resizeGraph(); graph[threadIndex][lockIndex] = WAITING_FOR_LOCK; if (needTransfer) fillPresentEntries(lock, lockIndex); }