Xenomai  3.0.8
Locking services

The Xenomai core deals with concurrent activities from two distinct kernels running side-by-side. More...

Collaboration diagram for Locking services:

Macros

#define splhigh(x)   ((x) = ipipe_test_and_stall_head() & 1)
 Hard disable interrupts on the local processor, saving previous state. More...
 
#define splexit(x)   ipipe_restore_head(x & 1)
 Restore the saved hard interrupt state on the local processor. More...
 
#define splmax()   ipipe_stall_head()
 Hard disable interrupts on the local processor.
 
#define splnone()   ipipe_unstall_head()
 Hard enable interrupts on the local processor.
 
#define spltest()   ipipe_test_head()
 Test hard interrupt state on the local processor. More...
 

Detailed Description

The Xenomai core deals with concurrent activities from two distinct kernels running side-by-side.

When interrupts are involved, the services from this section control the hard interrupt state exclusively, for protecting against processor-local or SMP concurrency.

Note
In a dual kernel configuration, hard interrupts are gated by the CPU. When enabled, hard interrupts are immediately delivered to the Xenomai core if they belong to a real-time source, or deferred until enabled by a second-stage virtual interrupt mask, if they belong to regular Linux devices/sources.

Macro Definition Documentation

◆ splexit

#define splexit (   x)    ipipe_restore_head(x & 1)

Restore the saved hard interrupt state on the local processor.

Parameters
[in]xThe context variable previously updated by splhigh()

◆ splhigh

#define splhigh (   x)    ((x) = ipipe_test_and_stall_head() & 1)

Hard disable interrupts on the local processor, saving previous state.

Parameters
[out]xAn unsigned long integer context variable

◆ spltest

#define spltest ( )    ipipe_test_head()

Test hard interrupt state on the local processor.

Returns
Zero if the local processor currently accepts interrupts, non-zero otherwise.

Referenced by rtdm_fd_select(), and rtdm_lock_get().