From: "Trenton D. Adams" <tadams@theone.dnsalias.com>
To: "eCos Discussion" <ecos-discuss@sourceware.cygnus.com>
Subject: [ECOS] cyg_cond_signal() without cyg_cond_wait ()
Date: Wed, 29 Aug 2001 13:32:00 -0000 [thread overview]
Message-ID: <001601c130c9$a0f2a1e0$090110ac@TRENT> (raw)
I've been looking through the kernel sources for answers now that I
understand a little more how eCos is laid out.
From what I've seen, it would appear that if I call cyg_cond_signal ()
while there isn't a cyg_cond_wait () in progress, nothing will happen at
all. For example, I thought that MAYBE the condition variable would be
signaled at a later time when cyg_cond_wait () was finally called. It
looks like cyg_cond_wait () queues the waiting threads and
cyg_cond_signal dequeues them. But, it appears that cyg_cond_signals
are not queued, correct?
Based on that information, I should leave the condition variable's mutex
locked until such time that I can loop again to call cyg_cond_wait (),
correct? Should I be locking the scheduler at the end of the loop until
the next loop has started? If I don't, it's theoretically possible that
a cyg_cond_signal () could occur before I get back to my cyg_cond_wait
(), correct?
Trenton D. Adams
Extreme Engineering
#17, 6025 - 12 St. SE
Calgary, Alberta, Canada
T2H 2K1
Phone: 403 640 9494 ext-208
Fax: 403 640 9599
http://www.extremeeng.com
next reply other threads:[~2001-08-29 13:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-29 13:32 Trenton D. Adams [this message]
2001-08-30 3:45 ` Nick Garnett
2001-08-30 8:04 ` Trenton D. Adams
2001-08-30 8:20 ` Nick Garnett
2001-08-30 8:56 ` Trenton D. Adams
2001-08-30 9:04 ` Nick Garnett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001601c130c9$a0f2a1e0$090110ac@TRENT' \
--to=tadams@theone.dnsalias.com \
--cc=ecos-discuss@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).