This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]