| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // ====================================================================== | ||
| 2 | // \title Os/Posix/DefaultRawTime.cpp | ||
| 3 | // \brief sets default Os::RawTime Posix implementation via linker | ||
| 4 | // ====================================================================== | ||
| 5 | #include <config/RawTimeSource.hpp> | ||
| 6 | #include "Os/Delegate.hpp" | ||
| 7 | #include "Os/Posix/RawTime.hpp" | ||
| 8 | |||
| 9 | namespace Os { | ||
| 10 | |||
| 11 | //! \brief get a delegate for RawTimeInterface that intercepts calls for Posix | ||
| 12 | //! \param aligned_new_memory: aligned memory to fill | ||
| 13 | //! \param to_copy: pointer to copy-constructor input | ||
| 14 | //! \param source: timer source selection (unused in Posix - only RAWTIME_DEFAULT supported) | ||
| 15 | //! \return: pointer to delegate | ||
| 16 | 6 | RawTimeInterface* RawTimeInterface::getDelegate(RawTimeHandleStorage& aligned_new_memory, | |
| 17 | const RawTimeInterface* to_copy, | ||
| 18 | RawTimeSource source) { | ||
| 19 | (void)source; // Posix implementation only supports default timer source | ||
| 20 | 6 | return Os::Delegate::makeDelegate<RawTimeInterface, Os::Posix::RawTime::PosixRawTime, RawTimeHandleStorage>( | |
| 21 | 6 | aligned_new_memory, to_copy); | |
| 22 | } | ||
| 23 | |||
| 24 | } // namespace Os | ||
| 25 |