| KPAUSE(9) | Kernel Developer's Manual | KPAUSE(9) | 
kpause —
#include <sys/proc.h>
int
  
  kpause(const
    char *wmesg, bool
    intr, int timeo,
    kmutex_t *mtx);
kpause() makes the calling LWP sleep. It's similar to
  cv_timedwait_sig(9)
  without the corresponding
  cv_signal(9).
kpause() can wake up spontaneously.
    Callers should prepare to handle it.
kpause(). The kernel does not use this argument
      directly but makes it available for utilities such as
      ps(1) to display.kpause().
    Zero means no timeout.
NULL, mtx will be released
      once the LWP has prepared to sleep, and will be reacquired before
      kpause() returns.kpause() returns 0 when waking up spontaneously.
  Otherwise, it returns an error number.
EINTR]kpause() returned due to other reasons. Typically
      as a result of a signal without SA_RESTART
      property.ERESTART]kpause() returned as a result of a signal with
      SA_RESTART property.EWOULDBLOCK]| July 20, 2011 | NetBSD 9.3 |