This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: about ecos dsr and the serial_write function
- From: "Eric de Jong" <list_ericdejong_10 at gmx dot net>
- To: <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 23 Jul 2003 10:16:44 +0200
- Subject: [ECOS] Re: about ecos dsr and the serial_write function
邮件Zhaoxia,
for the at91 target, you might be right.
In at91_serial.c the ISR just calls the DSR, which handles the transmission of
characters.
In /io/serial/current/src/common/serial.c (function serial_write) the DSR is
blocked, followed by a loop to output all characters.
If to much data is send, the system should block forever. I have never tested
this.
As I have no knowlage of the serial driver, I leave it 'as it is' because it
works for me. sorry, I pass this (possible) problem to someone else :)
Eric.
----- Original Message -----
From: zhaoxia
Sent: Wednesday, July 23, 2003 6:52 AM
Subject: about ecos dsr
Hello,
Excuse me, but I can't understand something here.
Talking about the function of 'serial_write' with the kernel presenting. The
device is runing in interrupt mode. before writes the date to the cbuf, you call
"cyg_drv_dsr_lock" to disable the schedule of dsr. When the cbuf is full , the
thread will sleep and wait on the condition.
but how to make the dsr run with cyg_drv_dsr_lock,and come out from
"cyg_drv_cond_wait(&cbuf->wait)"?
Can you explain the process of running dsr in a scenario of writing the date to
a serial device in interrupt mode? I think,according to your programm, with
cyg_drv_dsr_lock ,you can't make the expected dsr run, unless you call
cyg_drv_dsr_unlock(). Is that right?
Thanks.
sunny
zhaoxia (at) os . pku . edu . cn
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss