F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
CountingSemaphore.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title Os/Stub/CountingSemaphore.hpp
3 // \brief Stub definitions for Os::CountingSemaphore
4 // ======================================================================
5 #ifndef OS_STUB_COUNTING_SEMAPHORE_HPP
6 #define OS_STUB_COUNTING_SEMAPHORE_HPP
8 
9 namespace Os {
10 namespace Stub {
11 namespace Semaphore {
12 
14 
16  public:
17  explicit StubCountingSemaphore(U32 initial_count);
18 
19  ~StubCountingSemaphore() override = default;
20 
21  StubCountingSemaphore(const StubCountingSemaphore& other) = delete;
22 
24 
26 
28 
30 
32 
34 
35  private:
37 };
38 
39 } // namespace Semaphore
40 } // namespace Stub
41 } // namespace Os
42 #endif // OS_STUB_COUNTING_SEMAPHORE_HPP
StubCountingSemaphore::Status waitTimeout(const Fw::TimeInterval &interval) override
wait on the semaphore with a timeout
StubCountingSemaphore::Status post() override
post (increment) the semaphore, potentially waking a waiting thread
CountingSemaphoreInterface & operator=(const CountingSemaphoreInterface &other)=delete
CountingSemaphoreHandle * getHandle() override
return the underlying semaphore handle (implementation specific)
StubCountingSemaphore::Status tryWait() override
non-blocking attempt to decrement the semaphore
StubCountingSemaphore::Status wait() override
wait (decrement) the semaphore, blocking if count is zero