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]

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


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