All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Use of condition vars
@ 2011-12-29 20:39 Terry Fryar
  2011-12-29 23:56 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 3+ messages in thread
From: Terry Fryar @ 2011-12-29 20:39 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 586 bytes --]

Using Xenomai 2.6.0, I have a question regarding the use of condition
variables.  I think I understand why the mutex is required, but how to use
it is a bit of a mystery?
 
- To call "rt_cond_signal()", do you have to have the mutex acquired??
 
- I assume to call "rt_cond_wait()", you are required to have the mutex
acquired, yes??
 
So, the pseudocode would be:
 
Task1:
.
.
rt_cond_signal()
.
.
 
Task2, Task3, ....TaskN
.
.
rt_mutex_acquire()
while (rt_cond_wait() != 0)
// got it, do code that accesses the signaled var (mutex protected)
rt_mutex_release()
.
.
.
 
 
Is that it??

[-- Attachment #2: Type: text/html, Size: 3109 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-02 14:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-29 20:39 [Xenomai-help] Use of condition vars Terry Fryar
2011-12-29 23:56 ` Gilles Chanteperdrix
2012-01-02 14:03   ` Terry Fryar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.