Пример #1
0
/**
 * Moves back a blocked thread to a priority queue.
 * Has no effect on unblocked threads.
 */
void PriorityQueue::resume(int id)
{
	int location = isBlocked(id);
	if (location != -1)
	{
		enqueueElement(_Blocked.at(location));
		_Blocked.erase(_Blocked.begin() + location);
	}
}
Пример #2
0
Файл: queue.c Проект: Moeryn/bmc
void
requeueElement (Element *element) {
  unlinkElement(element);
  enqueueElement(element);
}
Пример #3
0
Файл: queue.c Проект: Moeryn/bmc
Element *
enqueueItem (Queue *queue, void *item) {
  Element *element = newElement(queue, item);
  if (element) enqueueElement(element);
  return element;
}