C Microkernel Realtime eXecutive
Realtime Operating System for Cortex-M based microcontrollers
 
Loading...
Searching...
No Matches

Flags that further specify the behavior of calls in notification group. More...

Macros

#define NOTIFY_PRIORITY_INHERIT(thread_id)   (((thread_id & 0xFF) << 8) | (1 << NOTIFY_PRIORITY_INHERIT_FLAG))
 Inherit scheduler priority to specific thread if caller is going to be suspended.
 
#define NOTIFY_PRIORITY_DROP   (1 << NOTIFY_PRIORITY_DROP_FLAG)
 Drop inherited priority after notification has been sent.
 
#define NOTIFY_QUEUE_NOTIFICATION   (1 << NOTIFY_QUEUE_NOTIFICATION_FLAG)
 If there is no object waiting for notification then queue notification for later.
 
#define NOTIFY_VALUE_INCREMENT   (1 << NOTIFY_VALUE_INCREMENT_FLAG)
 If value is as expected, then increment it before returning from the syscall.
 
#define NOTIFY_NO_FLAGS   0
 Statement that there are no flags passed to the call.
 
#define NOTIFY_PRIORITY_INHERIT_THREAD(flags)   ((flags >> 8) && 0xFF)
 
#define WAIT_FOR_OBJECT_FLAGS_MASK   ((1 << NOTIFY_PRIORITY_INHERIT_FLAG) | NOTIFY_VALUE_INCREMENT)
 
#define NOTIFY_OBJECT_FLAGS_MASK   (NOTIFY_PRIORITY_DROP | NOTIFY_QUEUE_NOTIFICATION)
 

Enumerations

enum  NotifyFlags { NOTIFY_PRIORITY_INHERIT_FLAG = 0 , NOTIFY_PRIORITY_DROP_FLAG , NOTIFY_QUEUE_NOTIFICATION_FLAG , NOTIFY_VALUE_INCREMENT_FLAG }
 

Detailed Description

Flags that further specify the behavior of calls in notification group.

Macro Definition Documentation

◆ NOTIFY_NO_FLAGS

#define NOTIFY_NO_FLAGS   0

Statement that there are no flags passed to the call.

◆ NOTIFY_OBJECT_FLAGS_MASK

#define NOTIFY_OBJECT_FLAGS_MASK   (NOTIFY_PRIORITY_DROP | NOTIFY_QUEUE_NOTIFICATION)

◆ NOTIFY_PRIORITY_DROP

#define NOTIFY_PRIORITY_DROP   (1 << NOTIFY_PRIORITY_DROP_FLAG)

Drop inherited priority after notification has been sent.

Calling thread will drop elevated priority after notifications have been sent and return to its default priority.

◆ NOTIFY_PRIORITY_INHERIT

#define NOTIFY_PRIORITY_INHERIT (   thread_id)    (((thread_id & 0xFF) << 8) | (1 << NOTIFY_PRIORITY_INHERIT_FLAG))

Inherit scheduler priority to specific thread if caller is going to be suspended.

This flag tells the kernel to inherit scheduler priority of the current thread to specific thread ID. This only happens if calling thread is going to be suspended waiting for notification. If specific thread already has priority higher than that of the calling thread then priority change does not happen.

Parameters
thread_idID of the thread to inherit the priority

◆ NOTIFY_PRIORITY_INHERIT_THREAD

#define NOTIFY_PRIORITY_INHERIT_THREAD (   flags)    ((flags >> 8) && 0xFF)

◆ NOTIFY_QUEUE_NOTIFICATION

#define NOTIFY_QUEUE_NOTIFICATION   (1 << NOTIFY_QUEUE_NOTIFICATION_FLAG)

If there is no object waiting for notification then queue notification for later.

Enabling this flag will cause that any notification that won't immediately wake up any thread will be queued into pending notifications list.

◆ NOTIFY_VALUE_INCREMENT

#define NOTIFY_VALUE_INCREMENT   (1 << NOTIFY_VALUE_INCREMENT_FLAG)

If value is as expected, then increment it before returning from the syscall.

This effectively implements compare-increment semantics.

◆ WAIT_FOR_OBJECT_FLAGS_MASK

#define WAIT_FOR_OBJECT_FLAGS_MASK   ((1 << NOTIFY_PRIORITY_INHERIT_FLAG) | NOTIFY_VALUE_INCREMENT)

Enumeration Type Documentation

◆ NotifyFlags

Enumerator
NOTIFY_PRIORITY_INHERIT_FLAG 
NOTIFY_PRIORITY_DROP_FLAG 
NOTIFY_QUEUE_NOTIFICATION_FLAG 
NOTIFY_VALUE_INCREMENT_FLAG