embkernel
 All Classes Functions Variables Typedefs Groups Pages
RtosPortable.hpp
1 //------------------------------------------------------------------------------
2 //This file is part of embKernel.
3 //See license.txt for the full license governing this code.
4 //------------------------------------------------------------------------------
8 #ifndef RTOS_PORTABLE_HPP_
9 #define RTOS_PORTABLE_HPP_
10 
11 #include <stddef.h>
12 #include <stdint.h>
13 
17 class RtosPortable {
18  friend class Rtos;
19  friend class RtosTask;
20  friend class RtosSyncObject;
21 private:
22  static const uint32_t STACK_FILL_VALUE = 0x35A4CDE1;
23 
24  static void start();
25  static void yield();
26  static void* stackInit(void* stack, size_t stackSize, void(*run)(void*), void *parameter);
27  static bool isStackOverflow(void* stack, size_t stackSize);
28  static size_t getFreeStackSize(void* stack, size_t stackSize);
29  static uint32_t getCyclesCounter();
30 
31 public:
32  static void enterCriticalSection();
33  static void exitCriticalSection();
34  static void disableAllInt();
35  static void enableAllInt();
36 };
37 
38 #endif /* RTOS_PORTABLE_HPP_ */
39