| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // ====================================================================== | ||
| 2 | // \title Os/Posix/DefaultMutex.cpp | ||
| 3 | // \brief sets default Os::Mutex Posix implementation via linker | ||
| 4 | // ====================================================================== | ||
| 5 | #include "Os/Delegate.hpp" | ||
| 6 | #include "Os/Posix/ConditionVariable.hpp" | ||
| 7 | #include "Os/Posix/Mutex.hpp" | ||
| 8 | namespace Os { | ||
| 9 | |||
| 10 | //! \brief get a delegate for MutexInterface that intercepts calls for Posix | ||
| 11 | //! \param aligned_new_memory: aligned memory to fill | ||
| 12 | //! \return: pointer to delegate | ||
| 13 | 75 | MutexInterface* MutexInterface::getDelegate(MutexHandleStorage& aligned_new_memory) { | |
| 14 | 75 | return Os::Delegate::makeDelegate<MutexInterface, Os::Posix::Mutex::PosixMutex>(aligned_new_memory); | |
| 15 | } | ||
| 16 | |||
| 17 | //! \brief get a delegate for MutexInterface that intercepts calls for Posix | ||
| 18 | //! \param aligned_new_memory: aligned memory to fill | ||
| 19 | //! \return: pointer to delegate | ||
| 20 | 56 | ConditionVariableInterface* ConditionVariableInterface::getDelegate( | |
| 21 | ConditionVariableHandleStorage& aligned_new_memory) { | ||
| 22 | return Os::Delegate::makeDelegate<ConditionVariableInterface, Os::Posix::Mutex::PosixConditionVariable, | ||
| 23 | 56 | ConditionVariableHandleStorage>(aligned_new_memory); | |
| 24 | } | ||
| 25 | } // namespace Os | ||
| 26 |