mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-10 17:30:12 +00:00
fixes to compile/share more code between SPU and PPU
This commit is contained in:
parent
5399a9ae8c
commit
984811f459
@ -75,31 +75,37 @@ public:
|
||||
btSpinlock (SpinVariable* var)
|
||||
: spinVariable (var)
|
||||
{}
|
||||
#ifndef __SPU__
|
||||
|
||||
void Init ()
|
||||
{
|
||||
#ifndef __SPU__
|
||||
//*spinVariable = 1;
|
||||
cellSyncMutexInitialize(spinVariable);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef __SPU__
|
||||
void Lock ()
|
||||
{
|
||||
#ifdef __SPU__
|
||||
// lock semaphore
|
||||
/*while (cellAtomicTestAndDecr32(atomic_buf, (uint64_t)spinVariable) == 0)
|
||||
{
|
||||
|
||||
};*/
|
||||
cellSyncMutexLock((uint64_t)spinVariable);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Unlock ()
|
||||
{
|
||||
#ifdef __SPU__
|
||||
//cellAtomicIncr32(atomic_buf, (uint64_t)spinVariable);
|
||||
cellSyncMutexUnlock((uint64_t)spinVariable);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
private:
|
||||
SpinVariable* spinVariable;
|
||||
|
Loading…
Reference in New Issue
Block a user