This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

About cyg_drv_dsr_lock and cyg_drv_cond_wait.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]