delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/09/14/08:45:36

Date: Sat, 14 Sep 2002 13:54:18 +0100
From: "Richard Dawe" <rich AT phekda DOT freeserve DOT co DOT uk>
Sender: rich AT phekda DOT freeserve DOT co DOT uk
To: djgpp-workers AT delorie DOT com
Disposition-Notification-To: rich AT phekda DOT freeserve DOT co DOT uk
X-Mailer: WinNT's Blat ver 1.8.6 http://www.blat.net
X-Mailer: Emacs 21.3.50 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
Cc: lvr AT softsystem DOT co DOT uk
Subject: Patch: Signal handlers & FPU state - doc update
Message-Id: <E17qCI6-0000RH-00@phekda.freeserve.co.uk>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Below is a patch to update the docs for signal and setitimer.
For signal() it documents that the FPU state is not saved.
Rather than duplicate this information in the page for setitimer,
I added a reference from the setitimer page to the signal page.

OK to commit?

Thanks, bye, Rich =]

Index: src/libc/posix/signal/itimer.txh
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/posix/signal/itimer.txh,v
retrieving revision 1.6
diff -p -u -3 -r1.6 itimer.txh
--- src/libc/posix/signal/itimer.txh	6 Oct 2000 16:57:04 -0000	1.6
+++ src/libc/posix/signal/itimer.txh	14 Sep 2002 12:40:37 -0000
@@ -67,6 +67,9 @@ This function changes the current value 
 of the timer is returned in @var{ovalue} if it is not a @code{NULL}
 pointer.  When the timer expires, the appropriate signal is raised.
 
+Please see the documentation for @code{signal} (@pxref{signal})
+for restrictions on signal handlers.
+
 If @var{value} is a @code{NULL} pointer, @code{setitimer} stores the
 previous timer value in @var{ovalue} (if it is non- AT code{NULL}), like
 @code{getitimer} does, but otherwise does nothing.
Index: src/libc/go32/dpmiexcp.txh
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/go32/dpmiexcp.txh,v
retrieving revision 1.6
diff -p -u -3 -r1.6 dpmiexcp.txh
--- src/libc/go32/dpmiexcp.txh	26 Oct 1999 07:00:37 -0000	1.6
+++ src/libc/go32/dpmiexcp.txh	14 Sep 2002 12:40:42 -0000
@@ -68,6 +68,14 @@ handler for a particular signal, it will
 occurs.  The execution of the program will be suspended until the
 handler returns or calls @code{longjmp} (@pxref{longjmp}).
 
+The state of the floating-point unit (FPU) is not saved, before
+entering a signal handler.  It can be extremely costly to save
+the FPU state.  Most signal handlers do not use floating-point
+operations, so the overhead of saving FPU state is avoided.
+An example of a signal handler that saves the FPU state is
+the function @code{dbgsig} in @file{src/debug/common/dbgcom.c}
+in the DJGPP sources.
+
 You may pass @code{SIG_DFL} as the value of @var{func} to reset the
 signal handling for the signal @var{sig} to default (also
 @xref{__djgpp_exception_toggle}, for a quick way to restore all the

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019