int
kpause(
const char *wmesg
, bool intr
, int timeo
, kmutex_t *mtx
)
)
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.
wmesg
).
The kernel does not use this argument directly but makes it available for
utilities such as
ps(1)
to display.
intr
timeo
).
Zero means no timeout.
mtx
NULL
,
mtx
will be released once the LWP has prepared to sleep, and will be reacquired
before
kpause(
)
returns.
)
returns 0 when waking up spontaneously.
Otherwise,
It returns an error number.
EWOULDBLOCK
]
ERESTART
]
)
returned as a result of a signal with
SA_RESTART
property.
EINTR
]
)
returned due to other reasons.
Typically as a result of a signal without
SA_RESTART
property.