hexo/lock.h header reference
[Hardware abstraction layer module]

The source code of this header can be browsed online.

Description  

Spinlock operations include memory barriers to ensure the consistency of memory accesses on weakly-ordered memory architectures.

Members  

Types  

Functions  

Macros  

Members detail  

#define LOCK_H_  

This macro is declared in hexo/lock.h source file, line 32.

#define LOCK_INITIALIZER  

This macro is declared in hexo/lock.h source file, line 71.

Preprocessor condition: defined( CONFIG_ARCH_SMP ) or defined( CONFIG_HEXO_LOCK_DEBUG )

#define LOCK_INITIALIZER  

This macro is declared in hexo/lock.h source file, line 73.

Preprocessor condition: not ( defined( CONFIG_ARCH_SMP ) or defined( CONFIG_HEXO_LOCK_DEBUG ))

#define LOCK_RELEASE_IRQ(lock)  

This macro is declared in hexo/lock.h source file, line 228.

this macro releases a lock and restore previous interrupts state. This macro must be matched with the LOCK_SPIN_IRQ macro.

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: defined( CONFIG_HEXO_IRQ )

#define LOCK_RELEASE_IRQ(lock)  

This macro is declared in hexo/lock.h source file, line 234.

this macro releases a lock and restore previous interrupts state. This macro must be matched with the LOCK_SPIN_IRQ macro.

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: not defined( CONFIG_HEXO_IRQ )

#define LOCK_SPIN_IRQ(lock)  

This macro is declared in hexo/lock.h source file, line 175.

this macro saves interrupts state, disables interrupts, and spins to take lock. This macro must be matched with the LOCK_RELEASE_IRQ macro. Using #LOCK_SPIN_IRQ_SCOPED is preferred over using this macros.

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: defined( CONFIG_HEXO_IRQ )

#define LOCK_SPIN_IRQ(lock)  

This macro is declared in hexo/lock.h source file, line 181.

Documentation from alternate declaration:

this macro saves interrupts state, disables interrupts, and spins to take lock. This macro must be matched with the LOCK_RELEASE_IRQ macro. Using #LOCK_SPIN_IRQ_SCOPED is preferred over using this macros.

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: not defined( CONFIG_HEXO_IRQ )

#define LOCK_SPIN_IRQ_SCOPED(lock)  

This macro is declared in hexo/lock.h source file, line 274.

this macro saves interrupts state, disables interrupts, and spins to spin lock. Lock is automatically released when control reaches scope end.

#define LOCK_SPIN_SCOPED(lock)  

This macro is declared in hexo/lock.h source file, line 303.

this macro saves interrupts state, disables interrupts, and spins to spin lock. Lock is automatically released when control reaches scope end.

void lock_destroy(lock_t *lock)  

This function is declared in hexo/lock.h source file, line 100.

this function frees lock ressources

void lock_destroy_irq(lock_irq_t *lock)  

This function is declared in hexo/lock.h source file, line 108.

this function frees lock ressources

error_t lock_init(lock_t *lock)  

This function is declared in hexo/lock.h source file, line 79.

allocate a new lock

error_t lock_init_irq(lock_irq_t *lock)  

This function is declared in hexo/lock.h source file, line 89.

allocate a new lock with interrupt state

struct lock_irq_s  

This struct is declared in hexo/lock.h source file, line 59.

FieldDescription
cpu_irq_state_t __interrupt_state;
struct __arch_lock_s arch;architecture specific lock data

See also lock_irq_t.

typedef struct lock_irq_s lock_irq_t  

This typedef is declared in hexo/lock.h source file, line 69.

void lock_release(lock_t *lock)  

This function is declared in hexo/lock.h source file, line 189.

this function releases a lock

void lock_release_irq(lock_irq_t *lock)  

This function is declared in hexo/lock.h source file, line 198.

This function releases a lock and restore previous interrupt state

void lock_release_irq2(lock_t *lock, const cpu_irq_state_t *irq_state)  

This function is declared in hexo/lock.h source file, line 213.

This function releases a lock and restore interrupt state from *irq_state

struct lock_s  

This struct is declared in hexo/lock.h source file, line 49.

FieldDescription
struct __arch_lock_s arch;architecture specific lock data

See also lock_t.

void lock_spin(lock_t *lock)  

This function is declared in hexo/lock.h source file, line 129.

this function spins to take the lock

void lock_spin_irq(lock_irq_t *lock)  

This function is declared in hexo/lock.h source file, line 139.

This function disables interrupts, spins to take the lock and store the previous irq state in *lock

void lock_spin_irq2(lock_t *lock, cpu_irq_state_t *irq_state)  

This function is declared in hexo/lock.h source file, line 156.

This function disables interrupts, spins to take the lock and store the previous irq state in *irq_state

typedef struct lock_s lock_t  

This typedef is declared in hexo/lock.h source file, line 56.

See also pthread_spinlock_t.

bool_t lock_try(lock_t *lock)  

This function is declared in hexo/lock.h source file, line 117.

this function tries to take lock

void lock_irq_scoped_release(struct lock_irq_scoped_s *ls)  

This function is declared in hexo/lock.h source file, line 254.

This function is for internal use only.

See also LOCK_SPIN_IRQ_SCOPED.

struct lock_irq_scoped_s  

This struct is declared in hexo/lock.h source file, line 244.

This struct is for internal use only.

See also LOCK_SPIN_IRQ_SCOPED.

FieldDescription
cpu_irq_state_t interrupt_state;
lock_t * lock;

void lock_irq_scoped_spin(struct lock_irq_scoped_s *ls, lock_t *lock)  

This function is declared in hexo/lock.h source file, line 264.

This function is for internal use only.

See also LOCK_SPIN_IRQ_SCOPED.

void lock_scoped_release(struct lock_scoped_s *ls)  

This function is declared in hexo/lock.h source file, line 289.

This function is for internal use only.

See also LOCK_SPIN_SCOPED.

struct lock_scoped_s  

This struct is declared in hexo/lock.h source file, line 282.

This struct is for internal use only.

See also LOCK_SPIN_SCOPED.

FieldDescription
lock_t * lock;

void lock_scoped_spin(struct lock_scoped_s *ls, lock_t *lock)  

This function is declared in hexo/lock.h source file, line 296.

This function is for internal use only.

See also LOCK_SPIN_SCOPED.

Valid XHTML 1.0 StrictGenerated by diaxen on Wed Oct 17 21:18:38 2018 using MkDoc