Changes due to continue development of the IpcLibs. Not done yet.
This commit is contained in:
@@ -100,33 +100,45 @@ extern pthread_mutex_t interlockedMutex;
|
||||
__inline static unsigned long
|
||||
InterlockedIncrement(unsigned long *pValue)
|
||||
{
|
||||
unsigned long retVal;
|
||||
pthread_mutex_lock(&interlockedMutex);
|
||||
*pValue ++;
|
||||
(*pValue) ++;
|
||||
retVal = *pValue;
|
||||
pthread_mutex_unlock(&interlockedMutex);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
__inline static unsigned long
|
||||
InterlockedDecrement(unsigned long *pValue)
|
||||
{
|
||||
unsigned long retVal;
|
||||
pthread_mutex_lock(&interlockedMutex);
|
||||
*pValue --;
|
||||
(*pValue) --;
|
||||
retVal = *pValue;
|
||||
pthread_mutex_unlock(&interlockedMutex);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
__inline static uint32_t
|
||||
InterlockedIncrement(uint32_t *pValue)
|
||||
{
|
||||
uint32_t retVal;
|
||||
pthread_mutex_lock(&interlockedMutex);
|
||||
*pValue ++;
|
||||
(*pValue) ++;
|
||||
retVal = *pValue;
|
||||
pthread_mutex_unlock(&interlockedMutex);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
__inline static uint32_t
|
||||
InterlockedDecrement(uint32_t *pValue)
|
||||
{
|
||||
uint32_t retVal;
|
||||
pthread_mutex_lock(&interlockedMutex);
|
||||
*pValue --;
|
||||
(*pValue) --;
|
||||
retVal = *pValue;
|
||||
pthread_mutex_unlock(&interlockedMutex);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
//===[ Include files ]=====================================================
|
||||
|
||||
Reference in New Issue
Block a user