Mark3 Realtime Kernel
criticalsection.h
Go to the documentation of this file.
1 /*===========================================================================
2  _____ _____ _____ _____
3  ___| _|__ __|_ |__ __|__ |__ __| __ |__ ______
4 | \ / | || \ || | || |/ / ||___ |
5 | \/ | || \ || \ || \ ||___ |
6 |__/\__/|__|_||__|\__\ __||__|\__\ __||__|\__\ __||______|
7  |_____| |_____| |_____| |_____|
8 
9 --[Mark3 Realtime Platform]--------------------------------------------------
10 
11 Copyright (c) 2012 - 2019 m0slevin, all rights reserved.
12 See license.txt for more information
13 ===========================================================================*/
20 #pragma once
21 
22 #include "mark3cfg.h"
23 #include "threadport.h"
24 
25 namespace Mark3 {
26 
27 //---------------------------------------------------------------------------
49 public:
50 
56  static inline void Enter() {
57  PORT_CS_ENTER();
58  }
59 
65  static inline void Exit() {
66  PORT_CS_EXIT();
67  }
68 
73  static inline K_WORD NestingCount() {
74  return PORT_CS_NESTING();
75  }
76 };
77 
78 } // namespace Mark3
static void Exit()
Exit Exit a critical section, re-enabling kernel-aware interrupts, and releasing exclusive control of...
#define K_WORD
Size of a data word.
Definition: portcfg.h:62
void PORT_CS_ENTER()
Definition: threadport.h:167
The CriticalSection class. This class implements a portable CriticalSection interface based on macros...
Definition: atomic.cpp:23
Mark3 Kernel Configuration This file is used to configure the kernel for your specific application in...
ATMega1284p Multithreading support.
void PORT_CS_EXIT()
Definition: threadport.h:178
static K_WORD NestingCount()
NestingCount.
static void Enter()
Enter Enter a critical section, disabling all kernel-aware interrupts, and giving exclusive control o...
K_WORD PORT_CS_NESTING()
Definition: threadport.h:187