a question on event send and receive (event when not waiting)
Chan Kim
ckim at etri.re.kr
Mon Aug 31 13:51:48 UTC 2015
Hello, rtems users,
To increase performance of my SD card driver, I'm moving a function which used to handle events from ISR and maintain state machine during a command processing into the thread that requested the SD card command processing. With this change, I request(trigger) command and enter that tasklet function in the same thread now. The tasklet(now in same thread following the request function) loops and receives events from the ISR and when everything is finished for that command, gets out of the loop. I saw the ISR has the same thread ID with the requesting thread. (so it's sending and receiving events in the same thread) (thread ID is different for file read and write somehow.)
At the beginning of the tasklet is the rtems_event_receive function. This scheme works sometimes(depending on the printk delay variation) but I saw once, an event coming from the ISR has not been catched by the rtems_event_wait function. Because the tasklet was doing something else and was not waiting for the event at that time. How do people solve this kind of situation?
can I somehow 'queue' the events so that it is detected next time rtems_event_wait function is called?
Thanks!
Chan
More information about the users
mailing list