Mark3 Realtime Kernel
notify.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 ===========================================================================*/
21 #pragma once
22 
23 #include "mark3cfg.h"
24 #include "blocking.h"
25 
26 namespace Mark3
27 {
33 class Notify : public BlockingObject
34 {
35 public:
36  void* operator new(size_t sz, void* pv) { return reinterpret_cast<Notify*>(pv); };
37  ~Notify();
38 
43  void Init(void);
44 
53  void Signal(void);
54 
63  void Wait(bool* pbFlag_);
64 
76  bool Wait(uint32_t u32WaitTimeMS_, bool* pbFlag_);
77 
86  void WakeMe(Thread* pclChosenOne_);
87 
88 private:
89  bool m_bPending;
90 };
91 } // namespace Mark3
Blocking object base class declarations.
Definition: atomic.cpp:23
Mark3 Kernel Configuration This file is used to configure the kernel for your specific application in...
bool m_bPending
Definition: notify.h:89
void WakeMe(Thread *pclChosenOne_)
WakeMe Wake the specified thread from its current blocking queue. Note that this is only public in or...
Definition: notify.cpp:175
The Thread Class. This object providing the fundamental thread control data structures and functions ...
Definition: thread.h:64
The Notify class. This class provides a blocking object type that allows one or more threads to wait ...
Definition: notify.h:33
void Signal(void)
Signal Signal the notification object. This will cause the highest priority thread currently blocking...
Definition: notify.cpp:66
void Init(void)
Init Initialze the Notification object prior to use.
Definition: notify.cpp:57
void Wait(bool *pbFlag_)
Wait Block the current thread, waiting for a signal on the object.
Definition: notify.cpp:95
The BlockingObject class. Class implementing thread-blocking primatives. used for implementing things...
Definition: blocking.h:65