|
|
|
@ -979,56 +979,6 @@ extern "C" {
|
|
|
|
|
#define HXAtomicSubRetUINT32(p,n) _HXAtomicSubRetUINT32((p),(n))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
|
* MAC / PowerPC (CW)
|
|
|
|
|
*
|
|
|
|
|
* Implementation Notes:
|
|
|
|
|
*
|
|
|
|
|
* This will need to be rewritten, probably, once we move away from CW to PB.
|
|
|
|
|
*
|
|
|
|
|
* Note: This is an imcompletely-defined platform, be aware that
|
|
|
|
|
* not all standard HXAtomic operators are defined!
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
#elif defined(_MACINTOSH) && defined(__MWERKS__)
|
|
|
|
|
|
|
|
|
|
inline UINT32
|
|
|
|
|
HXAtomicIncRetUINT32(UINT32* pNum)
|
|
|
|
|
{
|
|
|
|
|
UINT32 zeroOffset = 0;
|
|
|
|
|
UINT32 temp;
|
|
|
|
|
|
|
|
|
|
asm
|
|
|
|
|
{
|
|
|
|
|
again:
|
|
|
|
|
lwarx temp, zeroOffset, pNum
|
|
|
|
|
addi temp, temp, 1
|
|
|
|
|
stwcx. temp, zeroOffset, pNum
|
|
|
|
|
bne- again
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return temp;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline UINT32
|
|
|
|
|
HXAtomicDecRetUINT32(UINT32* pNum)
|
|
|
|
|
{
|
|
|
|
|
UINT32 zeroOffset = 0;
|
|
|
|
|
UINT32 temp;
|
|
|
|
|
|
|
|
|
|
asm
|
|
|
|
|
{
|
|
|
|
|
again:
|
|
|
|
|
lwarx temp, zeroOffset, pNum
|
|
|
|
|
subi temp, temp, 1
|
|
|
|
|
stwcx. temp, zeroOffset, pNum
|
|
|
|
|
bne- again
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return temp;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
|
* MAC - PowerPC (PB or XCode) / Linux - PowerPC
|
|
|
|
|
*
|
|
|
|
|