mn_task_utils.hpp
Go to the documentation of this file.
1 
19 #ifndef MINLIB_ESP32_THREAD_UTILS_
20 #define MINLIB_ESP32_THREAD_UTILS_
21 
22 #include "mn_config.hpp"
23 #include "mn_autolock.hpp"
24 
25 namespace mn {
26  class basic_task;
27 
33  public:
35  enum action {
36  no_action = eNoAction,
37  set_bits = eSetBits,
38  increment = eIncrement,
39  set_value_overwrite = eSetValueWithOverwrite,
40  set_value = eSetValueWithoutOverwrite
41  };
42 
56  static bool notify(basic_task* pTaskToNotify, uint32_t ulValue, task_utils::action eAction);
57 
78  static uint32_t notify_take(bool bClearCountOnExit, TickType_t xTicksToWait);
79 
88  static bool notify_give(basic_task* pTaskToNotify);
89 
117  static bool notify_wait(uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit,
118  uint32_t *pulNotificationValue, TickType_t xTicksToWait );
119 
120  #if( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )
132  static void set_storage_pointer(basic_task* task, unsigned short index, void* value);
144  static void* get_storage_pointer(basic_task* task, unsigned short index);
145  #endif
146  };
147 
149 }
150 #endif
Wrapper class around FreeRTOS's implementation of a task.
Definition: mn_task.hpp:88
Definition: mn_task_utils.hpp:32
static bool notify(basic_task *pTaskToNotify, uint32_t ulValue, task_utils::action eAction)
static uint32_t notify_take(bool bClearCountOnExit, TickType_t xTicksToWait)
static bool notify_wait(uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait)
action
Definition: mn_task_utils.hpp:35
@ set_bits
Definition: mn_task_utils.hpp:37
@ set_value
Definition: mn_task_utils.hpp:40
@ no_action
Definition: mn_task_utils.hpp:36
@ set_value_overwrite
Definition: mn_task_utils.hpp:39
@ increment
Definition: mn_task_utils.hpp:38
static bool notify_give(basic_task *pTaskToNotify)
#define MN_ONSIGLETN_CLASS
Definition: mn_copyable.hpp:27
Definition: mn_allocator_typetraits.hpp:25