From: Philipp Meier <pme.neratec@gmx.ch>
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] cyg_drv_mutex_lock combine with while loop?
Date: Fri, 12 Oct 2012 14:30:00 -0000 [thread overview]
Message-ID: <50782975.1090904@gmx.ch> (raw)
I see in some driver code the following statements:
while(!cyg_drv_mutex_lock(&any_lock));
And I wonder if this might be the source of a deadlock or even the
source of a stack overflow.
Is it a good/secure idea to stay in a while loop when
cyg_drv_mutex_lock() returns false? Or should this be handled as an
exceptional state?
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
reply other threads:[~2012-10-12 14:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=50782975.1090904@gmx.ch \
--to=pme.neratec@gmx.ch \
--cc=ecos-discuss@ecos.sourceware.org \
/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).