2.11BSD/src/man/man2/fperr.2

Compare this file to the similar file:
Show the results in this format:

.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\"	@(#)fperr.2	2.3 (Berkeley) 1/22/87
.\"
.TH FPERR 2 "January 22, 1987"
.UC 2
.SH NAME
fperr \- get floating-point error registers (2BSD)
.SH SYNOPSIS
.nf
.ft B
#include <pdp/fperr.h>

struct fperr
{
	short	f_fec;
	caddr_t	f_fea;
};

fperr(fpe)
struct fperr *fpe;
.fi
.ft R
.SH DESCRIPTION
.I Fperr
returns the contents of the
floating-point processor's
error registers as they were
following the last floating exception
generated by the calling process.
The registers are stored in the
structure pointed to by
.IR fpe .
.PP
This call is required because the
error registers in the PDP-11 floating-point processor
are read-only.
Thus, they may be changed by some other
process between the time that
the current process generates an exception and the
time that it reads the registers.
Therefore, the system saves their state
at the time of an exception.
.PP
The values returned are
valid only after a floating-point
exception.
.SH ERRORS
.TP 15
[EINVAL]
The kernel has not been compiled for a processor with floating point.
.SH "SEE ALSO
Ed Gould, Jim Reeds, Vance Vaughan,
.I UNIX Problems with Floating Point Processors
.SH BUGS
.I Fperr
is unique to the PDP-11 and 2BSD; its use is discouraged.