Cygdrvspinlockdestroy, Cygdrvspinlockspin, Cygdrvspinlockclear – Comtrol eCos User Manual

Page 394: Cyg_drv_spinlock_spin, Cyg_drv_spinlock_clear, Cyg_drv_spinlock_destroy

Advertising
background image

Chapter 18. Device Driver Interface to the Kernel

cyg_drv_spinlock_destroy

Function:

void cyg_drv_spinlock_destroy(cyg_spinlock_t *lock )

Arguments:

lock

- pointer to spinlock destroy

Result:

None

Level:

Thread

Description:

Destroy a spinlock that is no longer of use. There should be no CPUs attempting to claim the lock at the time

this function is called, otherwise the behavior is undefined.

cyg_drv_spinlock_spin

Function:

void cyg_drv_spinlock_spin(cyg_spinlock_t *lock )

Arguments:

lock

- pointer to spinlock to claim

Result:

None

Level:

ISR

Description:

Claim a spinlock, waiting in a busy loop until it is available. Wherever this is called from, this operation effec-

tively pauses the CPU until it succeeds. This operations should therefore be used sparingly, and in situations
where deadlocks/livelocks cannot occur. Also see

cyg_drv_spinlock_spin_intsave()

.

cyg_drv_spinlock_clear

Function:

void cyg_drv_spinlock_clear(cyg_spinlock_t *lock )

290

Advertising