original files of m241
This commit is contained in:
@@ -0,0 +1,211 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
* HEADER FILE
|
||||
*
|
||||
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: signal.h,v $ $Revision: 1.4.54.3 $
|
||||
* $Source: /home/interpeak/CVSRoot/ipxinc/include/sys/signal.h,v $
|
||||
* $Author: yli10 $ $Date: 2018-06-20 08:58:36 $
|
||||
* $State: Exp $ $Locker: $
|
||||
*
|
||||
* INTERPEAK_COPYRIGHT_STRING
|
||||
* Design and implementation by Lennart Bang <lob@interpeak.se>
|
||||
******************************************************************************
|
||||
*/
|
||||
#ifndef IP_SYS_SIGNAL_H
|
||||
#define IP_SYS_SIGNAL_H
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 1 DESCRIPTION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 2 CONFIGURATION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include "ipcom_config.h"
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 3 INCLUDE FILES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#define IPCOM_USE_CLIB_PROTO
|
||||
#include "ipcom_type.h"
|
||||
#include "ipcom_cstyle.h"
|
||||
#include "ipcom_clib.h"
|
||||
|
||||
#include "sys/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 4 DEFINES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
*===========================================================================
|
||||
* signal numbers
|
||||
*===========================================================================
|
||||
*/
|
||||
#define SIGHUP 1 /* hangup */
|
||||
#define SIGINT 2 /* interrupt */
|
||||
#define SIGQUIT 3
|
||||
#define SIGILL 4
|
||||
#define SIGTRAP 5 /* trace trap (not reset when caught) */
|
||||
#define SIGABRT 6
|
||||
#define SIGIOT 6
|
||||
#define SIGBUS 7
|
||||
#define SIGFPE 8
|
||||
#define SIGKILL 9
|
||||
#define SIGSEGV 11 /* segmentation violation */
|
||||
#define SIGPIPE 13
|
||||
#define SIGALRM 14 /* alarm clock */
|
||||
#define SIGTERM 15 /* software termination signal from kill */
|
||||
#define SIGSTKFLT 16
|
||||
#define SIGCHLD 17
|
||||
#define SIGCONT 18
|
||||
#define SIGSTOP 19
|
||||
#define SIGTSTP 20
|
||||
#define SIGTTIN 21
|
||||
#define SIGTTOU 22
|
||||
#define SIGURG 23
|
||||
#define SIGXCPU 24
|
||||
#define SIGXFSZ 25
|
||||
#define SIGVTALRM 26
|
||||
#define SIGPROF 27
|
||||
#define SIGWINCH 28
|
||||
#define SIGIO 29
|
||||
#define SIGUSR1 30 /* user defined signal 1 */
|
||||
#define SIGUSR2 31 /* user defined signal 2 */
|
||||
|
||||
#define NSIG 33
|
||||
|
||||
|
||||
/*
|
||||
*===========================================================================
|
||||
* signal
|
||||
*===========================================================================
|
||||
*/
|
||||
|
||||
#define SIG_DFL ((void (*)(int)) 0)
|
||||
#define SIG_IGN ((void (*)(int)) 1)
|
||||
#define SIG_ERR ((void (*)(int)) -1)
|
||||
|
||||
|
||||
/*
|
||||
*===========================================================================
|
||||
* sigprocmask flags
|
||||
*===========================================================================
|
||||
*/
|
||||
|
||||
#define SIG_BLOCK 1 /* block specified signal set */
|
||||
#define SIG_UNBLOCK 2 /* unblock specified signal set */
|
||||
#define SIG_SETMASK 3 /* set specified signal set */
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 5 TYPES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
typedef int Ip_sig_atomic_t;
|
||||
#define sig_atomic_t Ip_sig_atomic_t
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Ip_u32 __bits[4];
|
||||
}
|
||||
Ip_sigset_t;
|
||||
#define sigset_t Ip_sigset_t
|
||||
|
||||
|
||||
struct sigaction
|
||||
{
|
||||
void (*sa_handler)(int); /* signal handler */
|
||||
Ip_sigset_t sa_mask; /* signal mask to apply */
|
||||
int sa_flags; /* signal options */
|
||||
};
|
||||
|
||||
typedef void (*Ip_sighandler_t)(int);
|
||||
#define sighandler_t Ip_sighandler_t
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 6 FUNCTIONS
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
IP_PUBLIC int ipk_sigemptyset(Ip_sigset_t *set);
|
||||
#define sigemptyset ipk_sigemptyset
|
||||
|
||||
IP_PUBLIC int ipk_sigfillset(Ip_sigset_t *set);
|
||||
/*#define sigfillset ipk_sigfillset*/
|
||||
extern int sigfillset (sigset_t * __set);
|
||||
|
||||
IP_PUBLIC int ipk_sigaddset(Ip_sigset_t *set, int signo);
|
||||
#define sigaddset ipk_sigaddset
|
||||
|
||||
IP_PUBLIC int ipk_sigdelset(Ip_sigset_t *set, int signo);
|
||||
/*#define sigdelset ipk_sigdelset*/
|
||||
extern int sigdelset (sigset_t * __set, int __signo);
|
||||
|
||||
IP_PUBLIC int ipk_sigismember(const Ip_sigset_t *set, int signo);
|
||||
#define sigismember ipk_sigismember
|
||||
|
||||
IP_PUBLIC int ipk_sigpending(Ip_sigset_t *set);
|
||||
#define sigpending ipk_sigpending
|
||||
|
||||
IP_PUBLIC int ipk_sigprocmask(int how, const Ip_sigset_t *set, Ip_sigset_t *oset);
|
||||
#ifndef _WRS_KERNEL /* user-mode API's */
|
||||
#define sigprocmask ipk_sigprocmask
|
||||
#else
|
||||
extern int sigprocmask (int __how, const sigset_t * __set, sigset_t * __oset);
|
||||
#endif
|
||||
|
||||
IP_PUBLIC int sigaction(int signo, const struct sigaction *act, struct sigaction *oact);
|
||||
|
||||
IP_PUBLIC Ip_sighandler_t ipk_signal(int signo, Ip_sighandler_t handler);
|
||||
|
||||
|
||||
#ifdef NETSNMP_INTERPEAK
|
||||
#ifdef signal
|
||||
#undef signal
|
||||
#endif
|
||||
#define signal(s,h) ipnetsnmp_signal(s,h)
|
||||
IP_PUBLIC sighandler_t ipnetsnmp_signal(int signo, sighandler_t handler);
|
||||
|
||||
#ifdef sigemptyset
|
||||
#undef sigemptyset
|
||||
#endif
|
||||
#define sigemptyset(s) ipnetsnmp_sigemptyset(s)
|
||||
IP_PUBLIC int ipnetsnmp_sigemptyset(sigset_t *set);
|
||||
|
||||
IP_PUBLIC int ipnetsnmp_sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
|
||||
#define sigaction(s,a,o) ipnetsnmp_sigaction(s,a,o)
|
||||
#endif /* #ifdef NETSNMP_INTERPEAK */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* END OF FILE
|
||||
****************************************************************************
|
||||
*/
|
||||
Reference in New Issue
Block a user