This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Application Timer Context Pointer

When you start an application timer, you can provide an optional context pointer. Is that pointer memcpy'd like with the scheduler or is it a shallow copy? I'd like to know if I can provide locally created values via this pointer.

  • It's just a pointer, treated as an opaque void *, the pointer value itself is retained and returned to you in each call, there is no copying (how could there be, there's no size to go with the pointer so it would be impossible to know what to copy).

    It doesn't even really need to be a pointer, you can cast any 4 byte value to a void*, pass it, and cast it back when you get it returned.

Related