Thank you for your answer Zoltan.
Let me clarify.
In a RTOS when a task is “waiting” for something the scheduler doesn’t even try to give it a time slice (this is called waiting state) but when ressource is gained then task switchs to ready state and when scheduler give it a time slice then task switchs to running state. You can find this in thread docmentation.
My question is : does task involving a “infinite” loop waiting (for example like queue.get()) switch the thread that calls it to waiting state or is it a polling (scheduler give some time slice to the task in order to try to get) ? It’s unclear in the very reduced documentation of Mbed OS 6.
Is it also valid for a THREAD (not an ISR) that try_put() with a timeout>0?
For serial communication, my question was : if I activate the Buffer Empty interrupt of any serial communication (for example BufferedSerial.attach(…, TxIrq)) how can I disable the interrupt when there is nothing to transmit as there is no detach function. But I’ve seen in BufferedSerial that a NULL pointer in the attach method seems to be enought to disable IRQ…
By advance thank you if you find any interresting informations about wainting functions.