distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
ARMv6-M-ARMv7-M-supervisorCall.hpp
Go to the documentation of this file.
1 
12 #ifndef SOURCE_ARCHITECTURE_ARM_ARMV6_M_ARMV7_M_ARMV6_M_ARMV7_M_SUPERVISORCALL_HPP_
13 #define SOURCE_ARCHITECTURE_ARM_ARMV6_M_ARMV7_M_ARMV6_M_ARMV7_M_SUPERVISORCALL_HPP_
14 
15 namespace distortos
16 {
17 
18 namespace architecture
19 {
20 
35 int supervisorCall(int (& function)(int, int, int, int), int argument1, int argument2, int argument3, int argument4);
36 
50 inline int supervisorCall(int (& function)(int, int, int), const int argument1, const int argument2,
51  const int argument3)
52 {
53  return supervisorCall(reinterpret_cast<int(&)(int, int, int, int)>(function), argument1, argument2, argument3, {});
54 }
55 
68 inline int supervisorCall(int (& function)(int, int), const int argument1, const int argument2)
69 {
70  return supervisorCall(reinterpret_cast<int(&)(int, int, int, int)>(function), argument1, argument2, {}, {});
71 }
72 
84 inline int supervisorCall(int (& function)(int), const int argument)
85 {
86  return supervisorCall(reinterpret_cast<int(&)(int, int, int, int)>(function), argument, {}, {}, {});
87 }
88 
99 inline int supervisorCall(int (& function)())
100 {
101  return supervisorCall(reinterpret_cast<int(&)(int, int, int, int)>(function), {}, {}, {}, {});
102 }
103 
104 } // namespace architecture
105 
106 } // namespace distortos
107 
108 #endif // SOURCE_ARCHITECTURE_ARM_ARMV6_M_ARMV7_M_ARMV6_M_ARMV7_M_SUPERVISORCALL_HPP_
int supervisorCall(int(&function)(int, int, int, int), const int argument1, const int argument2, const int argument3, const int argument4)
Supervisor call.
Definition: ARMv6-M-ARMv7-M-supervisorCall.cpp:25
Top-level namespace of distortos project.