/*
* Copyright (c) 1998-2001 Proofpoint, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: signal.h,v 1.17 2013-11-22 20:51:31 ca Exp $
*/
/*
** SIGNAL.H -- libsm (and sendmail) signal facilities
** on signal configuration.
*/
#ifndef SM_SIGNAL_H
#include <limits.h>
#include <signal.h>
/*
** Critical signal sections
*/
#define LEAVE_CRITICAL() \
do \
{ \
if (InCriticalSection > 0) \
InCriticalSection--; \
} while (0)
do \
{ \
if (InCriticalSection > 0 && (sig) != 0) \
{ \
pend_signal((sig)); \
return SIGFUNC_RETURN; \
} \
} while (0)
/* variables */
extern unsigned int volatile InCriticalSection; /* >0 if in critical section */
extern int volatile PendingSignal; /* pending signal to resend */
/* functions */
extern void pend_signal __P((int));
/* reset signal in case System V semantics */
#ifdef SYS5SIGNALS
{ \
if ((sig) != 0) \
}
#else /* SYS5SIGNALS */
#endif /* SYS5SIGNALS */
extern void sm_allsignals __P((bool));
extern int sm_blocksignal __P((int));
extern int sm_releasesignal __P((int));
#endif /* SM_SIGNAL_H */