MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / add

Method add

util/GenericQ.cpp:76–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75
76void GenericQ::add(void *item)
77{
78 if(deadYet) return;
79 if(item == NULL) THROW("NULL argument in GenericQ::add()");
80 CriticalSection::SafeLock l(mutex);
81 if(deadYet) return;
82 Entry *temp = new Entry;
83 if(temp == NULL) THROW("Alloc error");
84 if(start == NULL) start = temp;
85 else end->next = temp;
86 temp->item = item; temp->next = NULL;
87 end = temp;
88 hasItem.post();
89}
90
91
92// This will block until there is something in the queue

Callers 1

drawFrameMethod · 0.45

Calls 1

postMethod · 0.80

Tested by

no test coverage detected