mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
Minimal signal handling interface.
git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@49 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
parent
2bdb28fbe0
commit
1ec74a114c
24
include/sys/signal.h
Normal file
24
include/sys/signal.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#ifndef _SPL_SIGNAL_H
|
||||||
|
#define _SPL_SIGNAL_H
|
||||||
|
|
||||||
|
#define FORREAL 0 /* Usual side-effects */
|
||||||
|
#define JUSTLOOKING 1 /* Don't stop the process */
|
||||||
|
|
||||||
|
/* The "why" argument indicates the allowable side-effects of the call:
|
||||||
|
*
|
||||||
|
* FORREAL: Extract the next pending signal from p_sig into p_cursig;
|
||||||
|
* stop the process if a stop has been requested or if a traced signal
|
||||||
|
* is pending.
|
||||||
|
*
|
||||||
|
* JUSTLOOKING: Don't stop the process, just indicate whether or not
|
||||||
|
* a signal might be pending (FORREAL is needed to tell for sure).
|
||||||
|
*/
|
||||||
|
static __inline__ int
|
||||||
|
issig(int why)
|
||||||
|
{
|
||||||
|
BUG_ON(!(why == FORREAL || why == JUSTLOOKING));
|
||||||
|
|
||||||
|
return signal_pending(current);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* SPL_SIGNAL_H */
|
@ -8,6 +8,7 @@ extern "C" {
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <sys/varargs.h>
|
#include <sys/varargs.h>
|
||||||
#include <sys/zone.h>
|
#include <sys/zone.h>
|
||||||
|
#include <sys/signal.h>
|
||||||
|
|
||||||
#ifndef _KERNEL
|
#ifndef _KERNEL
|
||||||
#define _KERNEL __KERNEL__
|
#define _KERNEL __KERNEL__
|
||||||
|
Loading…
Reference in New Issue
Block a user