This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: Confusion in the kernel API cyg_drv_cond_wait
- From: "Paul D. DeRocco" <pderocco at ix dot netcom dot com>
- To: "eCos Discuss" <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 18 Mar 2010 10:00:31 -0700
- Subject: RE: [ECOS] Confusion in the kernel API cyg_drv_cond_wait
> From: Himanshu Patel
>
> I am referring to the eCos source code and found expression like if(
> !cyg_drv_cond_wait(&cbuf->wait)).
>
> However in the documentation I have found that cyg_drv_cond_wait returns
> nothing (void). Am I missing something?
When using the Kernel, I believe cyg_drv_cond_wait gets #defined to be
cyg_cond_wait, which returns true if success, false if not. So in this case,
it must be #defined that way, and probably should have been written as
cyg_cond_wait to be more clear. I think the only thing that can cause it to
fail is if the waiting thread is forcibly awakened with release().
--
Ciao, Paul D. DeRocco
Paul mailto:pderocco@ix.netcom.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss