Lib/Runtime/Atomics.cpp
static WaitList* openWaitList(Uptr address)
{
	Platform::Mutex::Lock mapLock(addressToWaitListMapMutex);
	auto waitListPtr = addressToWaitListMap.get(address);
	if(waitListPtr)
	{
		++(*waitListPtr)->numReferences;
		return *waitListPtr;
	}
	else
	{
		WaitList* waitList = new WaitList();
		addressToWaitListMap.set(address, waitList);
		return waitList;
	}
}
// Opens the wait list for a given address.
// Increases the wait list's reference count, and returns a pointer to it.
// Note that it does not lock the wait list mutex.
// A call to openWaitList should be followed by a call to closeWaitList to avoid leaks.
Opens the wait list for a given address.
Increases the wait list's reference count, and returns a pointer to it.
Note that it does not lock the wait list mutex.
A call to openWaitList should be followed by a call to closeWaitList to avoid leaks.
Opens the wait list for a given address . Increases the wait list ' s reference count and returns a pointer to it . Note that it does not lock the wait list mutex . A call to openWaitList should be followed by a call to closeWaitList to avoid leaks .
static WaitList* openWaitList(Uptr address)
{
	Platform::Mutex::Lock mapLock(addressToWaitListMapMutex);
	auto waitListPtr = addressToWaitListMap.get(address);
	if(waitListPtr)
	{
		++(*waitListPtr)->numReferences;
		return *waitListPtr;
	}
	else
	{
		WaitList* waitList = new WaitList();
		addressToWaitListMap.set(address, waitList);
		return waitList;
	}
}
static WaitList * openWaitList ( Uptr address ) { Platform :: Mutex :: Lock mapLock ( addressToWaitListMapMutex ) ; auto waitListPtr = addressToWaitListMap . get ( address ) ; if ( waitListPtr ) { ++ ( * waitListPtr ) -> numReferences ; return * waitListPtr ; } else { WaitList * waitList = new WaitList ( ) ; addressToWaitListMap . set ( address , waitList ) ; return waitList ; } }
Opens the wait list for a given address.
Opens the wait list for a given address .