GCC Code Coverage Report


Directory: ./
File: Os/Stub/DefaultMutex.cpp
Date: 2026-09-03 21:13:48
Exec Total Coverage
Lines: 4 4 100.0%
Functions: 2 2 100.0%
Branches: 0 0 -%

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