Skip to content

Commit

Permalink
Added function SetCurrentTaskPriority
Browse files Browse the repository at this point in the history
  • Loading branch information
dc42 committed Aug 8, 2022
1 parent 0db112d commit 4feb697
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/RTOSIface/RTOSIface.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ class TaskBase : public StaticTask_t
void Resume() noexcept { vTaskResume(GetFreeRTOSHandle()); }

void SetPriority(unsigned int priority) noexcept { vTaskPrioritySet(GetFreeRTOSHandle(), priority); }

static void SetCurrentTaskPriority(unsigned int priority) noexcept { vTaskPrioritySet(nullptr, priority); }

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.
Expand Down

0 comments on commit 4feb697

Please sign in to comment.