| 1 |
.\" Copyright, Guillem Jover <[email protected]> |
| 2 |
.\" Copyright, the authors of the Linux man-pages project |
| 3 |
.\" |
| 4 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 5 |
.\" |
| 6 |
.TH PR_SET_FPEXC 2const 2026-02-08 "Linux man-pages 6.18" |
| 7 |
.SH NAME |
| 8 |
PR_SET_FPEXC |
| 9 |
\- |
| 10 |
set the floating-point exception mode |
| 11 |
.SH LIBRARY |
| 12 |
Standard C library |
| 13 |
.RI ( libc ,\~ \-lc ) |
| 14 |
.SH SYNOPSIS |
| 15 |
.nf |
| 16 |
.BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */" |
| 17 |
.B #include <sys/prctl.h> |
| 18 |
.P |
| 19 |
.BI "int prctl(PR_SET_FPEXC, unsigned long " mode ); |
| 20 |
.fi |
| 21 |
.SH DESCRIPTION |
| 22 |
Set floating-point exception mode to |
| 23 |
.IR mode , |
| 24 |
which can be one of the following values. |
| 25 |
.TP |
| 26 |
.B PR_FP_EXC_SW_ENABLE |
| 27 |
Use FPEXC for |
| 28 |
FP exception enables. |
| 29 |
.TP |
| 30 |
.B PR_FP_EXC_DIV |
| 31 |
Use FPEXC for |
| 32 |
floating-point divide by zero. |
| 33 |
.TP |
| 34 |
.B PR_FP_EXC_OVF |
| 35 |
Use FPEXC for |
| 36 |
floating-point overflow. |
| 37 |
.TP |
| 38 |
.B PR_FP_EXC_UND |
| 39 |
Use FPEXC for |
| 40 |
floating-point underflow. |
| 41 |
.TP |
| 42 |
.B PR_FP_EXC_RES |
| 43 |
Use FPEXC for |
| 44 |
floating-point inexact result. |
| 45 |
.TP |
| 46 |
.B PR_FP_EXC_INV |
| 47 |
Use FPEXC for |
| 48 |
floating-point invalid operation. |
| 49 |
.TP |
| 50 |
.B PR_FP_EXC_DISABLED |
| 51 |
Use FPEXC for |
| 52 |
FP exceptions disabled. |
| 53 |
.TP |
| 54 |
.B PR_FP_EXC_NONRECOV |
| 55 |
Use FPEXC for |
| 56 |
async nonrecoverable exception mode. |
| 57 |
.TP |
| 58 |
.B PR_FP_EXC_ASYNC |
| 59 |
Use FPEXC for |
| 60 |
async recoverable exception mode. |
| 61 |
.TP |
| 62 |
.B PR_FP_EXC_PRECISE |
| 63 |
Use FPEXC for |
| 64 |
precise exception mode. |
| 65 |
.SH RETURN VALUE |
| 66 |
On success, |
| 67 |
0 is returned. |
| 68 |
On error, \-1 is returned, and |
| 69 |
.I errno |
| 70 |
is set to indicate the error. |
| 71 |
.SH ERRORS |
| 72 |
.TP |
| 73 |
.B EINVAL |
| 74 |
.I mode |
| 75 |
is not a valid value. |
| 76 |
.SH STANDARDS |
| 77 |
Linux. |
| 78 |
PowerPC only. |
| 79 |
.SH HISTORY |
| 80 |
Linux 2.4.21, 2.5.32. |
| 81 |
(PowerPC) |
| 82 |
.SH SEE ALSO |
| 83 |
.BR prctl (2), |
| 84 |
.BR PR_GET_FPEXC (2const) |