]> git.proxmox.com Git - mirror_zfs.git/commit - module/os/linux/spl/spl-condvar.c
Add cv_wait_interruptible() function.
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 14 May 2010 16:24:51 +0000 (09:24 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 14 May 2010 16:24:51 +0000 (09:24 -0700)
commitf752b46eb3c3b889d62465ea800cf17c980becd1
tree3d9b8f152d2ea919472d7436dce587c4c6557f90
parent97f8f6d78999ab41d23cf5942d55ea3ad0ca4f3e
Add cv_wait_interruptible() function.

This is a minor extension to the condition variable API to allow
for reasonable signal handling on Linux.  The cv_wait() function by
definition must wait unconditionally for cv_signal()/cv_broadcast()
before waking it.  This makes it impossible to woken by a signal
such as SIGTERM.  The cv_wait_interruptible() function was added
to handle this case.  It behaves identically to cv_wait() with the
exception that it waits interruptibly allowing a signal to wake it
up.  This means you do need to be careful and check issig() after
waking.
include/sys/condvar.h
module/spl/spl-condvar.c