nap in Sys V (millisecond sleeps)

Malaclypse the Elder dwc at homxc.ATT.COM
Fri Apr 7 10:47:14 AEST 1989


another way to do this is to write a pseudo-device driver
and use ioctl on that device to put an entry in the callout
table to wake itself up in N ticks.  then you can write a
user level nap() to hide all the ugliness.

or if you are uncomfortable with writing pseudo-device drivers,
then just reserve a tty line, open it, ioctl it into raw mode
and with a timeout value equivalent to the desired nap time and
do a read from that line.  again, once you know which tty line
is reserved for this, you can hide all the ugliness in a function
call.

danny chen
att!homxc!dwc



More information about the Comp.unix.microport mailing list