F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
CountingSemaphore.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title Os/Stub/CountingSemaphore.cpp
3 // \brief Stub implementations for Os::CountingSemaphore
4 // ======================================================================
6 #include "Fw/Types/Assert.hpp"
7 
8 namespace Os {
9 namespace Stub {
10 namespace Semaphore {
11 
13  (void)initial_count;
14 }
15 
17  return StubCountingSemaphore::Status::NOT_SUPPORTED;
18 }
19 
21  (void)interval;
22  return StubCountingSemaphore::Status::NOT_SUPPORTED;
23 }
24 
26  return StubCountingSemaphore::Status::NOT_SUPPORTED;
27 }
28 
30  return StubCountingSemaphore::Status::NOT_SUPPORTED;
31 }
32 
34  return &m_handle;
35 }
36 
37 } // namespace Semaphore
38 } // namespace Stub
39 } // namespace Os
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
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