__monitor
In this section:
Syntax
See Syntax for type attributes used on functions.
Description
The __monitor keyword causes interrupts to be disabled during execution of the function. This allows atomic operations to be performed, such as operations on semaphores that control access to resources by multiple processes. A function declared with the __monitor keyword is equivalent to any other function in all other respects.
Example
__monitor int get_lock(void);
See also
Monitor functions. For information about related intrinsic functions, see __disable_interrupt, __enable_interrupt, __get_interrupt_state, and __set_interrupt_state, respectively.