5 #ifndef Os_Posix_Task_hpp_ 6 #define Os_Posix_Task_hpp_ 33 #if defined(POSIX_THREADS_ENABLE_NAMES) && POSIX_THREADS_ENABLE_NAMES 51 "TASK_PRIORITY_NON_REALTIME must not alias TASK_PRIORITY_DEFAULT");
128 static std::atomic<bool> s_permissions_reported;
Status _delay(const Fw::TimeInterval &interval) override
delay the current task
Task handle representation.
PlatformSizeType FwSizeType
~PosixTask()=default
default virtual destructor
static constexpr FwTaskPriorityType TASK_PRIORITY_NON_REALTIME
Sentinel priority: run the task under SCHED_OTHER (non-realtime) rather than SCHED_RR.
void suspend(SuspensionType suspensionType) override
suspend the task given the suspension type
static constexpr int SUCCESS
static constexpr FwTaskPriorityType TASK_PRIORITY_DEFAULT
PosixTask & operator=(const PosixTask &other)=delete
assignment operator is forbidden
bool m_is_valid
Is the above descriptor valid.
PermissionExpectation
Enumeration of permission expectations.
pthread_t m_task_descriptor
Posix task descriptor.
TaskHandle * getHandle() override
return the underlying task handle (implementation specific)
static constexpr FwSizeType PTHREAD_NAME_LENGTH
Length of pthread name.
PosixTask()=default
default constructor
PlatformTaskPriorityType FwTaskPriorityType
The type of task priorities used.
Expect that you do not hold necessary permissions.
Expect that you hold necessary permissions.
Status join() override
block until the task has ended
Status start(const Arguments &arguments) override
start the task
void resume() override
resume a suspended task
void onStart() override
perform required task start actions
Posix task implementation as driven by pthreads implementation.