This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
cyg_drv_mutex_lock combine with while loop?
- From: Philipp Meier <pme dot neratec at gmx dot ch>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Fri, 12 Oct 2012 16:30:13 +0200
- Subject: [ECOS] cyg_drv_mutex_lock combine with while loop?
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