mn_critical.hpp
Go to the documentation of this file.
1 
19 #ifndef _MINLIB_CRITICAL_H_
20 #define _MINLIB_CRITICAL_H_
21 
22 #include "mn_config.hpp"
23 
24 #include <freertos/FreeRTOS.h>
25 #include <freertos/task.h>
26 
27 #include "mn_error.hpp"
28 #include "mn_micros.hpp"
29 #include "mn_autolock.hpp"
30 
34 
35 namespace mn {
36  namespace system {
37 
49  #define CRITICAL_SECTION(OBJECT) if( (bool)(auto_critical_t lock(OBJECT)) )
50 
62  #define CRITICAL_SECTION_TIMEDOUT(OBJECT) if( (bool)(auto_critical_section_timedout_t lock(OBJECT)) )
74  #define CRITICAL_SECTION_NESTED(OBJECT) if( (bool)(auto_critical_section_nested_t lock(OBJECT)) )
75 
76 
88  #define INTERRUPTS_LOCK(OBJECT) if( (bool)(auto_interrupts_lock_t lock(OBJECT)) )
89 
101  #define SCHEDULAR_LOCK(OBJECT) if( (bool)(auto_schedular_lock_t lock(OBJECT)) )
102 
109 
112 
115 
122 
127  }
128 }
129 #endif
Definition: mn_lock.hpp:122
Definition: mn_criticalsection.hpp:99
Definition: mn_criticalsection.hpp:59
Definition: mn_criticalsection.hpp:32
Definition: mn_interrupts_lock.hpp:29
Definition: mn_schedular_lock.hpp:56
A list of all error codes in this lib. This file is part of the Mini Thread Library (https://github....
Definition: mn_allocator_typetraits.hpp:25