OS  v1.7.5
Documentation
Loading...
Searching...
No Matches
critical.hpp
1#ifndef QOS_CPP_CRITICAL
2#define QOS_CPP_CRITICAL
3
4#include "include/types.hpp"
5
6namespace qOS {
7
30 using int_restorer_t = void (*)( uint32_t );
31
51 using int_disabler_t = uint32_t (*)( void );
52
56 namespace critical {
57
68 void enter( void ) noexcept;
74 void exit( void ) noexcept;
85 bool setInterruptsED( const int_restorer_t rFcn, const int_disabler_t dFcn ) noexcept;
86
88 }
89
91}
92
93#endif /*QOS_CPP_CRITICAL*/
void enter(void) noexcept
Enter a critical section. This function invokes the Disabler function if available.
uint32_t(*)(void) int_disabler_t
Function called by critical::enter() to disable interrupts.
Definition critical.hpp:51
bool setInterruptsED(const int_restorer_t rFcn, const int_disabler_t dFcn) noexcept
Set the hardware-specific code for global interrupt enable/disable. Setting this allows you to commun...
void(*)(uint32_t) int_restorer_t
Function called by critical::exit() to restore interrupts.
Definition critical.hpp:30
void exit(void) noexcept
Exit a critical section. This function invokes the Enabler function if available.
OS/Kernel interfaces.
Definition bytebuffer.hpp:7