Cygdrvspinlocktry, Cygdrvspinlocktest, Cyg_drv_spinlock_try – Comtrol eCos User Manual
Page 395: Cyg_drv_spinlock_test
Chapter 18. Device Driver Interface to the Kernel
Arguments:
lock
- pointer to spinlock to clear
Result:
None
Level:
ISR
Description:
Clear a spinlock. This clears the spinlock and allows another CPU to claim it. If there is more than one CPU
waiting in
cyg_drv_spinlock_spin()
then just one of them will be allowed to proceed.
cyg_drv_spinlock_try
Function:
cyg_bool_t cyg_drv_spinlock_try(cyg_spinlock_t *lock )
Arguments:
lock
- pointer to spinlock to try
Result:
TRUE
if the spinlock was claimed,
FALSE
otherwise.
Level:
ISR
Description:
Try to claim the spinlock without waiting. If the spinlock could be claimed immediately then
TRUE
is returned.
If the spinlock is already claimed then the result is
FALSE
.
cyg_drv_spinlock_test
Function:
cyg_bool_t cyg_drv_spinlock_test(cyg_spinlock_t *lock )
Arguments:
lock
- pointer to spinlock to test
Result:
TRUE
if the spinlock is available,
FALSE
otherwise.
291