Skip to content

Commit

Permalink
Added TaskBase::IsRunning method
Browse files Browse the repository at this point in the history
  • Loading branch information
dc42 committed Apr 21, 2021
1 parent d61b6b0 commit b1717e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/RTOSIface/RTOSIface.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ class TaskBase : public StaticTask_t
void Suspend() noexcept { vTaskSuspend(GetFreeRTOSHandle()); }
void Resume() noexcept { vTaskResume(GetFreeRTOSHandle()); }

bool IsRunning() const noexcept { return taskId != 0; }

// Wake up a task identified by its handle from an ISR. Safe to call with a null handle.
static void GiveFromISR(TaskBase *h) noexcept
{
Expand Down

0 comments on commit b1717e7

Please sign in to comment.