[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

fp_raise_xcp Subroutine

Purpose

Generates a floating-point exception.

Library

Standard C Library (libc.a)

Syntax

#include <fpxcp.h>


int fp_raise_xcp( mask)
fpflag_t mask;

Description

The fp_raise_xcp subroutine causes any floating-point exceptions defined by the mask parameter to be raised immediately. If the exceptions defined by the mask parameter are enabled and the program is running in serial mode, the signal for floating-point exceptions, SIGFPE, is raised.

If more than one exception is included in the mask variable, the exceptions are raised in the following order:

  1. Invalid
  2. Dividebyzero
  3. Underflow
  4. Overflow
  5. Inexact

Thus, if the user exception handler does not disable further exceptions, one call to the fp_raise_xcp subroutine can cause the exception handler to be entered many times.

Parameters

mask Specifies a 32-bit pattern that identifies floating-point traps.

Return Values

The fp_raise_xcp subroutine returns 0 for normal completion and returns a nonzero value if an error occurs.

Related Information

The fp_any_enable, fp_is_enabled, fp_enable_all, fp_enable, fp_disable_all, or fp_disable (fp_any_enable, fp_is_enabled, fp_enable_all, fp_enable, fp_disable_all, or fp_disable Subroutine) subroutine, fp_clr_flag, fp_read_flag, fp_swap_flag, or fpset_flag (fp_clr_flag, fp_set_flag, fp_read_flag, or fp_swap_flag Subroutine) subroutine, fp_cpusync (fp_cpusync Subroutine) subroutine, fp_trap (fp_trap Subroutine) subroutine, sigaction subroutine.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]