< prev index next >

src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeMessageQueue.cpp

Print this page

        

*** 82,102 **** * add - add an element to the queue, which is locked with semaphores * */ QueueReturns AccessBridgeMessageQueue::add(AccessBridgeQueueElement *element) { ! PrintDebugString(" in AccessBridgeMessageQueue::add()"); ! PrintDebugString(" queue size = %d", size); QueueReturns returnVal = cElementPushedOK; if (queueLocked) { ! PrintDebugString(" queue was locked; returning cQueueInUse!"); return cQueueInUse; } queueLocked = TRUE; { ! PrintDebugString(" adding element to queue!"); if (end == (AccessBridgeQueueElement *) 0) { if (start == (AccessBridgeQueueElement *) 0 && size == 0) { start = element; end = element; element->previous = (AccessBridgeQueueElement *) 0; --- 82,102 ---- * add - add an element to the queue, which is locked with semaphores * */ QueueReturns AccessBridgeMessageQueue::add(AccessBridgeQueueElement *element) { ! PrintDebugString("[INFO]: in AccessBridgeMessageQueue::add()"); ! PrintDebugString("[INFO]: queue size = %d", size); QueueReturns returnVal = cElementPushedOK; if (queueLocked) { ! PrintDebugString("[WARN]: queue was locked; returning cQueueInUse!"); return cQueueInUse; } queueLocked = TRUE; { ! PrintDebugString("[INFO]: adding element to queue!"); if (end == (AccessBridgeQueueElement *) 0) { if (start == (AccessBridgeQueueElement *) 0 && size == 0) { start = element; end = element; element->previous = (AccessBridgeQueueElement *) 0;
*** 112,143 **** end = element; size++; } } queueLocked = FALSE; ! PrintDebugString(" returning from AccessBridgeMessageQueue::add()"); return returnVal; } /** * remove - remove an element from the queue, which is locked with semaphores * */ QueueReturns AccessBridgeMessageQueue::remove(AccessBridgeQueueElement **element) { ! PrintDebugString(" in AccessBridgeMessageQueue::remove()"); ! PrintDebugString(" queue size = %d", size); QueueReturns returnVal = cMoreMessages; if (queueLocked) { ! PrintDebugString(" queue was locked; returning cQueueInUse!"); return cQueueInUse; } queueLocked = TRUE; { ! PrintDebugString(" removing element from queue!"); if (size > 0) { if (start != (AccessBridgeQueueElement *) 0) { *element = start; start = start->next; if (start != (AccessBridgeQueueElement *) 0) { --- 112,143 ---- end = element; size++; } } queueLocked = FALSE; ! PrintDebugString("[INFO]: returning from AccessBridgeMessageQueue::add()"); return returnVal; } /** * remove - remove an element from the queue, which is locked with semaphores * */ QueueReturns AccessBridgeMessageQueue::remove(AccessBridgeQueueElement **element) { ! PrintDebugString("[INFO]: in AccessBridgeMessageQueue::remove()"); ! PrintDebugString("[INFO]: queue size = %d", size); QueueReturns returnVal = cMoreMessages; if (queueLocked) { ! PrintDebugString("[WARN]: queue was locked; returning cQueueInUse!"); return cQueueInUse; } queueLocked = TRUE; { ! PrintDebugString("[INFO]: removing element from queue!"); if (size > 0) { if (start != (AccessBridgeQueueElement *) 0) { *element = start; start = start->next; if (start != (AccessBridgeQueueElement *) 0) {
*** 155,165 **** } else { returnVal = cQueueEmpty; } } queueLocked = FALSE; ! PrintDebugString(" returning from AccessBridgeMessageQueue::remove()"); return returnVal; } /** --- 155,165 ---- } else { returnVal = cQueueEmpty; } } queueLocked = FALSE; ! PrintDebugString("[INFO]: returning from AccessBridgeMessageQueue::remove()"); return returnVal; } /**
< prev index next >