[ECOS] Re: about ecos dsr and the serial_write function

Eric Doenges Eric.Doenges@DynaPel.de
Wed Jul 23 08:44:00 GMT 2003


[ 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



More information about the Ecos-discuss mailing list