dronecan / libcanard

MIT License
45 stars 52 forks source link

Added semaphore support for tx queue operations #50

Closed cuav-chen2 closed 1 year ago

cuav-chen2 commented 1 year ago

Use semaphore to ensure thread safety for operations on tx_queue

bugobliterator commented 1 year ago

The recommendation here is to use canard C++ API for thread-safe application. You will need to have a WITH_SEMAPHORE define like we have in Ardupilot, and a typedef for Semaphore.

Can I ask which RTOS are you using, I will add an example for ChibiOS RTOS.

cuav-chen2 commented 1 year ago

The recommendation here is to use canard C++ API for thread-safe application. You will need to have a WITH_SEMAPHORE define like we have in Ardupilot, and a typedef for Semaphore.

Can I ask which RTOS are you using, I will add an example for ChibiOS RTOS.

OK. Thank you so much.