From 9338d4ec596931534e317146edab9645d835fb8d Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 4 Jun 2009 21:31:39 +0000 Subject: [PATCH] Removed the guts of the SigAlarm code, which was only needed for HPUX and on Linux breaks external libraries that use the Posix Timer API. --- src/libCom/osi/os/posix/osdSignal.cpp | 37 ++++----------------------- src/libCom/osi/osiSock.h | 5 ++-- 2 files changed, 7 insertions(+), 35 deletions(-) diff --git a/src/libCom/osi/os/posix/osdSignal.cpp b/src/libCom/osi/os/posix/osdSignal.cpp index 7e77d952e..420176427 100644 --- a/src/libCom/osi/os/posix/osdSignal.cpp +++ b/src/libCom/osi/os/posix/osdSignal.cpp @@ -3,8 +3,7 @@ * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. - * EPICS BASE Versions 3.13.7 - * and higher are distributed subject to a Software License Agreement found + * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ @@ -28,7 +27,6 @@ typedef void ( *pSigFunc ) ( int ); static pSigFunc pReplacedSigHupFunc = 0; static pSigFunc pReplacedSigPipeFunc = 0; -static pSigFunc pReplacedSigAlarmFunc = 0; /* * localInstallSigHandler () @@ -96,23 +94,6 @@ static void ignoreSigPipe ( int signal ) } } -/* - * ignoreSigAlarm () - */ -extern "C" { -static void ignoreSigAlarm ( int signal ) -{ - static volatile int reentered = 1; - - if (--reentered == 0) { - if ( pReplacedSigAlarmFunc ) { - ( *pReplacedSigAlarmFunc ) ( signal ); - } - } - ++reentered; -} -} - /* * epicsSignalInstallSigHupIgnore () */ @@ -134,22 +115,14 @@ epicsShareFunc void epicsShareAPI epicsSignalInstallSigPipeIgnore (void) /* * epicsSignalInstallSigAlarmIgnore () */ -epicsShareFunc void epicsShareAPI epicsSignalInstallSigAlarmIgnore ( void ) +epicsShareFunc void epicsShareAPI epicsSignalInstallSigAlarmIgnore ( void ) { - localInstallSigHandler ( SIGALRM, - ignoreSigAlarm, & pReplacedSigAlarmFunc ); + // Removed; this functionality was only required by HPUX, + // and it interferes with the posix timer API on Linux. } /* * epicsSignalRaiseSigAlarm () */ epicsShareFunc void epicsShareAPI epicsSignalRaiseSigAlarm - ( struct epicsThreadOSD * threadId ) -{ - pthread_t id = epicsThreadGetPosixThreadId ( threadId ); - int status = pthread_kill ( id, SIGALRM ); - if ( status ) { - errlogPrintf ( "Failed to send SIGALARM to thread. Status = \"%s\"\n", - strerror ( status ) ); - } -} + ( struct epicsThreadOSD * /* threadId */ ) {} diff --git a/src/libCom/osi/osiSock.h b/src/libCom/osi/osiSock.h index 1855ad41a..a675e64cc 100644 --- a/src/libCom/osi/osiSock.h +++ b/src/libCom/osi/osiSock.h @@ -3,8 +3,7 @@ * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ @@ -50,7 +49,7 @@ epicsShareFunc void epicsShareAPI enum epicsSocketSystemCallInterruptMechanismQueryInfo { esscimqi_socketCloseRequired, esscimqi_socketBothShutdownRequired, - esscimqi_socketSigAlarmRequired + esscimqi_socketSigAlarmRequired /* NO LONGER USED/SUPPORTED */ }; epicsShareFunc enum epicsSocketSystemCallInterruptMechanismQueryInfo epicsSocketSystemCallInterruptMechanismQuery ();