This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
About cyg_drv_dsr_lock and cyg_drv_cond_wait.
- From: chandrag at danlawinc dot com
- To: ecos-discuss at sources dot redhat dot com
- Date: Thu, 13 Mar 2003 17:19:08 +0530
- Subject: [ECOS] About cyg_drv_dsr_lock and cyg_drv_cond_wait.
- Organization: DTIL
Hi,
The call cyg_drv_dsr_lock is to prevent DSRs running until the call
cyg_drv_dsr_unlock is made.
One use of cyg_drv_cond_wait is to wait (block) for input from a
device.
To wake up a thread that is waiting on a condition variable a DSR can
call cyg_drv_cond_signal.
My question is -
A call to cyg_drv_cond_wait in most of the devices (e.g..
serial_read of
serial.c) is between the calls cyg_drv_dsr_lock and cyg_drv_dsr_unlock.
This happens when a thread is waiting for input from a device, waiting
for the
corresponding DSR to run. But DSRs can not run because of dsr_lock.
How is this happening?
My analysis may be missing something, what is that?
Thanks in advance,
chandra
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss