From: amoss@bagel.cs.huji.ac.il (Amos Shapira)
Subject: Writing device drivers - sleep () won't wakeup
Date: 1995/08/14 [thread overview]
Message-ID: <AMOSS.95Aug14202808@bagel.cs.huji.ac.il> (raw)
Hello,
The following is under OSF/1 version 3.2, as well as earlier versions
I'm writing a simple device driver which talks over two half-duplex
propriety parallel cards.
One of my problems is that the read() interface, if called while the
input queue (filled by the interrupt handler) is empty, will block
indefinatly inside a sleep() even though the interrupt handler calls
wakeup() on the same address (if the queue is not empty then the
read() interface returns immidietly and avoids the sleep()
altogether).
If the sleep() is called with a PCATCH flag, as the manual suggests in
order to keep the process interruptible, then sending an INT signal
(e.g. with ^C) will cause the system to hang. ^Z (SIGSUSP?) seems to
work.
If the sleep() is called without a PCATCH then (as expected?) the
process is completly uninterruptible.
So far I circumvented the problem by adding a select() interface
and probing with select() before calling read(), but this is
not the way to go.
Any suggestions would be greatly appreciated.
Cheers,
--Amos
--
--Amos Shapira | "Of course Australia was marked for
133 Shlomo Ben-Yosef st. | glory, for its people had been chosen
Jerusalem 93 805 | by the finest judges in England."
ISRAEL amoss@cs.huji.ac.il | -- Anonymous
reply other threads:[~1995-08-14 4:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox