Hi,
how to pass parameter to a thread and get return value from the thread, can u give me an example?
A Thread is not like a usual function in C. So you can not pass directly a parameter to it or make it returning a value like usual functions. You need to use a queue or other messaging techniques to pass or get values from a thread.
You can check the concept from freeRTOS as well, because interacting with threads is a topic in RTOS more than a special thing in Mbed.
For Mbed you can check the documentation page of Queue and Mail.
As usual a dirty and quick hack is to use global variable, but it is not adviced as usual.