Hi everyone,
I'm newbie to rtos implementations, kindly help me out.
I'm implementing a mechanism to synchronously transfer data between a thread function and a non-thread function. I want to use the "synchronous messages" to achieve this.
Is it possible to send a message from a thread function to a non-thread function? If yes, what should be the thread pointer to chMsgSend()?
If it is not possible, what is the best way to achieve synchronous data transfer in this case?
Thankyou
Message between thread and non-thread function
- Giovanni
- Site Admin
- Posts: 14565
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1112 times
- Been thanked: 937 times
- Contact:
Re: Message between thread and non-thread function
Hi,
There is no such thing like non-thread function in ChibiOS/RT, all code is executed by some thread. The functions you call from your main() are still executed in the context of the main thread.
Exceptions are ISRs, those are a special class and require the use of a dedicated API for synchronization with threads.
Giovanni
There is no such thing like non-thread function in ChibiOS/RT, all code is executed by some thread. The functions you call from your main() are still executed in the context of the main thread.
Exceptions are ISRs, those are a special class and require the use of a dedicated API for synchronization with threads.
Giovanni
Who is online
Users browsing this forum: No registered users and 11 guests