|
|
@ -56,15 +56,15 @@ void spinLockIsrGive (spinlockIsr_t * lock) |
|
|
|
|
|
|
|
void spinLockIsrTake (spinlockIsr_t * lock) |
|
|
|
{ |
|
|
|
INTREG *key; |
|
|
|
INTREG intreg; |
|
|
|
|
|
|
|
if (lock) { |
|
|
|
key = (INTREG *)&(lock->lock.SL_pvReserved); |
|
|
|
#if SPIN_LOCK_USE_QUICK_LOCK > 0 |
|
|
|
API_SpinLockQuick(&lock->lock, key); |
|
|
|
API_SpinLockQuick(&lock->lock, &intreg); |
|
|
|
#else |
|
|
|
API_SpinLockIrq(&lock->lock, key); |
|
|
|
API_SpinLockIrq(&lock->lock, &intreg); |
|
|
|
#endif |
|
|
|
*(INTREG *)&(lock->lock.SL_pvReserved) = intreg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|