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

Method getValue

util/Mutex.cpp:344–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342
343
344long Semaphore::getValue(void)
345{
346 #ifdef _WIN32
347
348 long count = 0;
349 if(WaitForSingleObject(sem, 0) != WAIT_TIMEOUT)
350 {
351 ReleaseSemaphore(sem, 1, &count);
352 count++;
353 }
354
355 #elif defined(__APPLE__)
356
357 int count = 0;
358 sem_getvalue(sem, &count);
359
360 #else
361
362 int count = 0;
363 sem_getvalue(&sem, &count);
364
365 #endif
366
367 return (long)count;
368}

Callers 1

itemsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected