Debian Codegraph @

upstream/debian-trixie/man2/PR_SET_FPEXC.2const

raw
1 .\" Copyright Guillem Jover <[email protected]>
2 .\" Copyright 2024, Alejandro Colomar <[email protected]>
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH PR_SET_FPEXC 2const 2024-06-02 "Linux man-pages 6.9.1"
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 Pass
25 .B PR_FP_EXC_SW_ENABLE
26 to use FPEXC for FP exception enables,
27 .B PR_FP_EXC_DIV
28 for floating-point divide by zero,
29 .B PR_FP_EXC_OVF
30 for floating-point overflow,
31 .B PR_FP_EXC_UND
32 for floating-point underflow,
33 .B PR_FP_EXC_RES
34 for floating-point inexact result,
35 .B PR_FP_EXC_INV
36 for floating-point invalid operation,
37 .B PR_FP_EXC_DISABLED
38 for FP exceptions disabled,
39 .B PR_FP_EXC_NONRECOV
40 for async nonrecoverable exception mode,
41 .B PR_FP_EXC_ASYNC
42 for async recoverable exception mode,
43 .B PR_FP_EXC_PRECISE
44 for precise exception mode.
45 .SH RETURN VALUE
46 On success,
47 0 is returned.
48 On error, \-1 is returned, and
49 .I errno
50 is set to indicate the error.
51 .SH ERRORS
52 .TP
53 .B EINVAL
54 .I mode
55 is not a valid value.
56 .SH STANDARDS
57 Linux.
58 PowerPC only.
59 .SH HISTORY
60 Linux 2.4.21, 2.5.32.
61 (PowerPC)
62 .SH SEE ALSO
63 .BR prctl (2),
64 .BR PR_GET_FPEXC (2const)