mirror of
https://github.com/nasa/fprime.git
synced 2025-12-11 04:35:25 -06:00
* Adhering to new mutex api * casting assert arg as expected * Using correct mutex call * Formatting * Fixing interface for wait/pend * Fixing conditionvariable to adhere to new interface * Updated Os::Stub's implementation of ConditionVariable per new interface * Formatting and updating Test's ConditionVariable implementation to the new API * bugfix to ut * Fixes per PR review.
26 lines
1.2 KiB
C++
26 lines
1.2 KiB
C++
// ======================================================================
|
|
// \title Os/Posix/DefaultMutex.cpp
|
|
// \brief sets default Os::Mutex Posix implementation via linker
|
|
// ======================================================================
|
|
#include "Os/Delegate.hpp"
|
|
#include "Os/Posix/ConditionVariable.hpp"
|
|
#include "Os/Posix/Mutex.hpp"
|
|
namespace Os {
|
|
|
|
//! \brief get a delegate for MutexInterface that intercepts calls for Posix
|
|
//! \param aligned_new_memory: aligned memory to fill
|
|
//! \return: pointer to delegate
|
|
MutexInterface* MutexInterface::getDelegate(MutexHandleStorage& aligned_new_memory) {
|
|
return Os::Delegate::makeDelegate<MutexInterface, Os::Posix::Mutex::PosixMutex>(aligned_new_memory);
|
|
}
|
|
|
|
//! \brief get a delegate for MutexInterface that intercepts calls for Posix
|
|
//! \param aligned_new_memory: aligned memory to fill
|
|
//! \return: pointer to delegate
|
|
ConditionVariableInterface* ConditionVariableInterface::getDelegate(
|
|
ConditionVariableHandleStorage& aligned_new_memory) {
|
|
return Os::Delegate::makeDelegate<ConditionVariableInterface, Os::Posix::Mutex::PosixConditionVariable,
|
|
ConditionVariableHandleStorage>(aligned_new_memory);
|
|
}
|
|
} // namespace Os
|