This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Re: about ecos dsr and the serial_write function
- From: Eric Doenges <Eric dot Doenges at DynaPel dot de>
- To: ecos-discuss at sources dot redhat dot com
- Date: Wed, 23 Jul 2003 10:45:57 +0200
- Subject: Re: [ECOS] Re: about ecos dsr and the serial_write function
- References: <001201c350f2$c80cb6d0$e33922c7@ericnt>
[ I'm replying to Eric de Jong's post instead of
the original because I seem to have missed the
original ]
----- Original Message -----
From: zhaoxia
Sent: Wednesday, July 23, 2003 6:52 AM
Subject: about ecos dsr
> [ ... ]
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)"?
I asked myself this very same question (for a different platform). As
far as I understand the kernel sources, cyg_drv_cond_wait will unlock
the scheduler, running all previously scheduled DSRs in the process, and
then relock DSRs (and the scheduler if it was locked before the call)
when the _wait returns. I might be wrong in my interpretation of the
kernel sources, however.
--
--------------------------------------------------------------------
| Eric Doenges | DynaPel Laboratories GmbH |
| Tel: +49 89 962428 23 | Fraunhoferstrasse 9/2 |
| Fax: +49 89 962428 90 | D - 85737 Ismaning, Germany |
--------------------------------------------------------------------
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss