[ECOS] cyg_io_write
Bob Koninckx
bob.koninckx@mech.kuleuven.ac.be
Wed Jun 28 08:36:00 GMT 2000
Gary Thomas wrote:
>
> On 28-Jun-00 Dave Airlie wrote:
> >
> > Can I call cyg_io_write from with a cyg_io_write? as in my app calls a
> > virtual cyg_io_write which then calls a cyg_io_write on a real serial
> > port... does this sound like something I really shouldn't be doing, it
> > doesn't seem to work, but the problems I've been having I would be loathe
> > to blame eCos before asking :-)
> >
>
> I don't see any reason why it wouldn't work. This function should be
> reentrant as well as serially reusable.
Make sure you never lock an already locked mutex. I remember spending
quite some time searching for a deadlock caused by this .... (I am not
sure it will happen in your case though)
Might be an idea do modify the cyg_mutex_t behaviour in such a way that
a call to cyg_mutexc_lock doesnt do anything if it is called from the
thread that already owns the lock. Similar to what "How are they called
again ??" does with their CRITICAL_SECTION objects. Cygnus folks ??
Regards,
Bob
--
-----------------------------------------------------------------------
ir. Bob Koninckx
Katholieke Universiteit Leuven
Division Production Engineering, tel. +32 16 322535
Machine Design and Automation fax. +32 16 322987
Celestijnenlaan 300B bob.koninckx@mech.kuleuven.ac.be
B-3001 Leuven Belgium
http://www.mech.kuleuven.ac.be/pma.html
-----------------------------------------------------------------------
More information about the Ecos-discuss
mailing list