ThreadX contains contains message queues that allow inter-thread communication. Suppose I have several threads that read and write to a queue. Do I have to synchronize access to this queue (e.g. using a mutex)?
Any ThreadX thread can send a message to a queue and any thread can receive a message from a queue. There is no limit to how many threads can access a queue. Access from miltiple threads is already synchronized by ThreadX with FIFO discipline -- threads are resumed in the order they were suspended. However, the order can be changed with a call to the function tx_queue_prioritize
.