Get handle of this task?

RichPiano
Posts: 123
Joined: Mon May 18, 2020 2:51 pm

Get handle of this task?

Postby RichPiano » Wed Jan 26, 2022 6:37 am

I can't seem to find a way to get the handle of the currently running task (the one that I'm calling a function out of).

I want to have an API where I call a function and the function reads out the task context and puts itself (its handle) into an std::map. Is this possible somehow?

Victoria Nope
Posts: 75
Joined: Fri Dec 04, 2020 9:56 pm

Re: Get handle of this task?

Postby Victoria Nope » Wed Jan 26, 2022 9:01 am

You're looking for the xTaskGetCurrentTaskHandle function.

RichPiano
Posts: 123
Joined: Mon May 18, 2020 2:51 pm

Re: Get handle of this task?

Postby RichPiano » Sat Feb 12, 2022 10:11 am

Thank you it seems to work well! :)

Who is online

Users browsing this forum: Google [Bot] and 93 guests