Re: evl. event and mutex
Philippe Gerum <[email protected]>
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <[email protected]> |
Giulio Moro <[email protected]> writes: > Hi everyone, > I am trying to use evl_event and evl_mutex so that two threads can signal each other when either needs work from the other, so they each need to call evl_signal_event() and evl_wait_event(). The first thread to call evl_wait_event() seems to correctly drop the mutex, thus unlocking the second thread. When the second thread signals the condition variable (while holding the mutex) and then calls evl_wait_event(), thus implicitly dropping the mutex, the first thread is, unexpectedly, not restarted. I noticed that if a third thread acquires and then releases the lock (without touching the condition variable), then the first thread is restarted. This sounds like a bug? > It is, please pick this commit (on v6.18.y, backported to v6.1.y-cip and v6.12.y): https://gitlab.com/Xenomai/xenomai4/linux-evl/-/commit/c02e718dda07cfa1db079450d352f62b32702c55 -- Philippe.