F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
error.cpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title Os/Darwin/error.cpp
3
// \brief Darwin dispatch semaphore return status conversion implementation
4
// ======================================================================
5
#include "
Os/Darwin/error.hpp
"
6
7
namespace
Os
{
8
namespace
Darwin {
9
10
Os::CountingSemaphore::Status
dispatch_result_to_semaphore_status
(
long
dispatch_result) {
11
// dispatch_semaphore_wait returns 0 on success, non-zero on timeout
12
if
(dispatch_result == 0) {
13
return
Os::CountingSemaphore::Status::OP_OK
;
14
}
15
return
Os::CountingSemaphore::Status::ERROR_TIMEOUT;
16
}
17
18
}
// namespace Darwin
19
}
// namespace Os
Os::Generic::OP_OK
Operation succeeded.
Definition:
Os.hpp:27
Os::CountingSemaphoreInterface::Status
Status
Definition:
CountingSemaphore.hpp:16
Os
Definition:
FppConstantsAc.hpp:344
error.hpp
Os::Darwin::dispatch_result_to_semaphore_status
Os::CountingSemaphore::Status dispatch_result_to_semaphore_status(long dispatch_result)
Definition:
error.cpp:10
Os
Darwin
error.cpp
Generated by
1.8.14