summaryrefslogtreecommitdiff
path: root/include/linux/prctl.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2002-08-13 06:27:23 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-08-13 06:27:23 -0700
commitfcc6fcc61d5d2e32f689bbfcacd031e4c3d40268 (patch)
tree67e671cdf4df365b5e31e1ba02b601088c8b9095 /include/linux/prctl.h
parente1b19d6e06a98874018c66990465dcc69b69c4bf (diff)
[PATCH] add FP exception mode prctl
This patch that adds a prctl so that processes can set their floating-point exception mode on PPC and on PPC64. We need this because the FP exception mode is controlled by bits in the machine state register, which can only be accessed by the kernel, and because the exception mode setting interacts with the lazy FPU save/restore that the kernel does.
Diffstat (limited to 'include/linux/prctl.h')
-rw-r--r--include/linux/prctl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/prctl.h b/include/linux/prctl.h
index bbe6c00bfbd3..2cc14f5e5396 100644
--- a/include/linux/prctl.h
+++ b/include/linux/prctl.h
@@ -26,4 +26,12 @@
# define PR_FPEMU_NOPRINT 1 /* silently emulate fp operations accesses */
# define PR_FPEMU_SIGFPE 2 /* don't emulate fp operations, send SIGFPE instead */
+/* Get/set floating-point exception mode (if meaningful) */
+#define PR_GET_FPEXC 11
+#define PR_SET_FPEXC 12
+# define PR_FP_EXC_DISABLED 0 /* FP exceptions disabled */
+# define PR_FP_EXC_NONRECOV 1 /* async non-recoverable exc. mode */
+# define PR_FP_EXC_ASYNC 2 /* async recoverable exception mode */
+# define PR_FP_EXC_PRECISE 3 /* precise exception mode */
+
#endif /* _LINUX_PRCTL_H */