sleep man page on OSF1

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
OSF1 logo
[printable version]

sleep(9r)							     sleep(9r)

NAME
       sleep - General: Puts a calling process to sleep

SYNOPSIS
       void sleep(
	       caddr_t *channel,
	       long pri );

ARGUMENTS
       Specifies a unique address associated with the calling kernel thread to
       be put to sleep.	 Specifies whether the sleep request is interruptible.
       Setting this argument to the PCATCH flag causes the process to sleep in
       an interruptible state (that is, the kernel thread can  take  asynchro‐
       nous  signals). Not setting the PCATCH flag causes the process to sleep
       in an uninterruptible state (that is, the  kernel  thread  cannot  take
       asynchronous signals).

DESCRIPTION
       The sleep routine puts a calling process to sleep on the address speci‐
       fied by the channel argument. Some common addresses are the lbolt argu‐
       ment,  a	 buf  structure, and a proc structure.	This address should be
       unique to prevent unexpected wake/sleep cycles, which can occur if dif‐
       ferent processes are sleeping on the same address accidentally.	If you
       set the PCATCH flag in the pri argument, the sleep routine puts signals
       on the queue and does not wake up the sleeping process.

       The  sleep and wakeup routines block and then wake up a process. Gener‐
       ally, device drivers call these routines to wait for  the  transfer  to
       complete	 an  interrupt	from the device. That is, the write routine of
       the device driver sleeps on the address of a known  location,  and  the
       device's	 Interrupt  Service Interface (ISI) wakes the process when the
       device interrupts. It is the responsibility of the wakened  process  to
       check if the condition for which it was sleeping has been removed.

NOTES
       The  operating  system  provides	 two  ways  to put a process to sleep:
       interruptible and uninterruptible. The sleep routine performs an	 unin‐
       terruptible  sleep  operation  if you do not set the PCATCH flag and an
       interruptible sleep operation if you set the PCATCH flag.   This	 means
       that  device  drivers cannot call sleep at interrupt context because at
       interrupt context there is no calling process to be put to sleep. Thus,
       a  device driver's Interrupt Service Interface (ISI) and those routines
       called from within the ISI must not call the sleep routine.

       On this operating system, you cannot use pri to set the scheduling pri‐
       ority of the calling process.

RETURN VALUES
       None

FILES
SEE ALSO
       Routines: wakeup(9r)

								     sleep(9r)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OSF1

List of man pages available for OSF1

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net