mirror of
https://github.com/Interlisp/maiko.git
synced 2026-04-25 03:55:16 +00:00
Use sig_atomic_t for FP_error when using FP exceptions. (#220)
`sig_atomic_t` is usually `int`, but is the typedef that one should use for flags written to from a signal handler.
This commit is contained in:
@@ -27,7 +27,8 @@
|
|||||||
-------------------------------------------------- */
|
-------------------------------------------------- */
|
||||||
|
|
||||||
#ifdef FLTINT
|
#ifdef FLTINT
|
||||||
volatile extern int FP_error;
|
#include <signal.h>
|
||||||
|
extern volatile sig_atomic_t FP_error;
|
||||||
|
|
||||||
/* Note that a compiler may very likely move code around the arithmetic
|
/* Note that a compiler may very likely move code around the arithmetic
|
||||||
operation, causing this test (set by an interrupt handler) to be
|
operation, causing this test (set by an interrupt handler) to be
|
||||||
|
|||||||
@@ -644,7 +644,7 @@ void int_unblock() {
|
|||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
/* The global used to signal floating-point errors */
|
/* The global used to signal floating-point errors */
|
||||||
volatile int FP_error = 0;
|
volatile sig_atomic_t FP_error = 0;
|
||||||
|
|
||||||
void int_fp_service(int sig, siginfo_t *info, void *context)
|
void int_fp_service(int sig, siginfo_t *info, void *context)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user