1

Using the C/C++ Pico SDK, how can I find out which core my code is running on?

(Specifically, I'd like to use lwIP's LWIP_ASSERT_CORE_LOCKED, which requires a thread or core identifier to determine whether it holds the right locks.)

1 Answer 1

0

Not sure why I didn't find it the last time around, but there's get_core_num() in pico_platform.

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Dec 30, 2022 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.