This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: probable bug in io/serial/common/serial.c!
- To: Gary Thomas <gthomas at cygnus dot co dot uk>
- Subject: Re: [ECOS] probable bug in io/serial/common/serial.c!
- From: Mohammed Illyas Mansoor <mansoor at cdotb dot ernet dot in>
- Date: Wed, 05 Jan 2000 20:04:28 +0530
- CC: ecos-discuss at sourceware dot cygnus dot com
- Organization: C-DOT
- References: <XFMail.000105063515.gthomas@cygnus.co.uk>
Gary Thomas wrote:
> I don't think there is a chance for deadlock here since the affected
> region [while (size > 0)] is protected by a "DSR lock". The call to
> 'cyg_drv_dsr_lock()' effectively says "don't allow DSRs to run while
> executing the following code". Since it is only the DSR that can
> signal the condition variable, this should be safe.
This is true only if xmt_char() is called only by the DSR fucntion,
but cogent_serial_with_interrupts calls xmt_char() directly from
start_xmit(),
after enabling xmt interrupts, in this implementation at least would it not
cause a deadlock??
--With Regards,
M. I. Mansoor