changeset 109636:2d3e59e887ac

Cleanup syssignal.h. * src/syssignal.h (sighold, sigrelse, RETSIGTYPE): Remove, unused. (main_thread): Move down to remove #ifdef. (SIGMASKTYPE, SIGEMPTYMASK, SIGFULLMASK, sigmask, sigunblock): Remove conditional definition following unconditional ones.
author Dan Nicolaescu <dann@ics.uci.edu>
date Thu, 05 Aug 2010 16:22:18 -0700
parents fc7a8c411aa3
children c4c8e4a16194
files src/ChangeLog src/syssignal.h
diffstat 2 files changed, 7 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Aug 05 16:15:24 2010 -0700
+++ b/src/ChangeLog	Thu Aug 05 16:22:18 2010 -0700
@@ -1,5 +1,11 @@
 2010-08-05  Dan Nicolaescu  <dann@ics.uci.edu>
 
+	Cleanup syssignal.h.
+	* syssignal.h (sighold, sigrelse, RETSIGTYPE): Remove, unused.
+	(main_thread): Move down to remove #ifdef.
+	(SIGMASKTYPE, SIGEMPTYMASK, SIGFULLMASK, sigmask, sigunblock):
+	Remove conditional definition following unconditional ones.
+
 	* lisp.h: Remove HAVE_SHM code, unused.
 	(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
 	(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
--- a/src/syssignal.h	Thu Aug 05 16:15:24 2010 -0700
+++ b/src/syssignal.h	Thu Aug 05 16:22:18 2010 -0700
@@ -26,10 +26,6 @@
 #define FORWARD_SIGNAL_TO_MAIN_THREAD
 #endif
 
-#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
-extern pthread_t main_thread;
-#endif
-
 /* Don't #include <signal.h>.  That header should always be #included
    before "config.h", because some configuration files (like s/hpux.h)
    indicate that SIGIO doesn't work by #undef-ing SIGIO.  If this file
@@ -69,15 +65,9 @@
 #ifndef sigsetmask
 #define sigsetmask(SIG)  sys_sigsetmask (SIG)
 #endif
-#define sighold(SIG)     ONLY_USED_IN_BSD_4_1
-#define sigrelse(SIG)    ONLY_USED_IN_BSD_4_1
 #undef signal
 #define signal(SIG,ACT)      sys_signal(SIG,ACT)
 
-/* Whether this is what all systems want or not, this is what
-   appears to be assumed in the source, for example data.c:arith_error.  */
-typedef RETSIGTYPE (*signal_handler_t) (int);
-
 signal_handler_t sys_signal (int signal_number, signal_handler_t action);
 sigset_t sys_sigblock   (sigset_t new_mask);
 sigset_t sys_sigunblock (sigset_t new_mask);
@@ -85,27 +75,6 @@
 
 #define sys_sigdel(MASK,SIG) sigdelset (&MASK,SIG)
 
-#ifndef SIGMASKTYPE
-#define SIGMASKTYPE int
-#endif
-
-#ifndef SIGEMPTYMASK
-#define SIGEMPTYMASK (0)
-#endif
-
-#ifndef SIGFULLMASK
-#define SIGFULLMASK (0xffffffff)
-#endif
-
-#ifndef sigmask
-#define sigmask(no) (1L << ((no) - 1))
-#endif
-
-#ifndef sigunblock
-#define sigunblock(SIG) \
-{ SIGMASKTYPE omask = sigblock (SIGFULLMASK); sigsetmask (omask & ~SIG); }
-#endif
-
 #define sigfree() sigsetmask (SIGEMPTYMASK)
 
 #if defined (SIGINFO) && defined (BROKEN_SIGINFO)
@@ -164,6 +133,7 @@
 #endif
 
 #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
+extern pthread_t main_thread;
 #define SIGNAL_THREAD_CHECK(signo)                                      \
   do {                                                                  \
     if (!pthread_equal (pthread_self (), main_thread))			\