Huge (k)FreeBSD update. (k)FreeBSD support is freebsd/ Other BSD are in
2007-02-18 Benoît Dejean <benoit@placenet.org> * configure.in: * libgtop-sysdeps.m4: * sysdeps/Makefile.am: Huge (k)FreeBSD update. (k)FreeBSD support is freebsd/ Other BSD are in bsd/ Patch by Joe Marcus Clarke <marcus@freebsd.org> Alexander Nedotsukov <bland@FreeBSD.org> Closes #407693. svn path=/trunk/; revision=2557
This commit is contained in:
committed by
Benoît Dejean
parent
747438e334
commit
5a15e409cf
@@ -30,9 +30,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <osreldate.h>
|
||||
#endif
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_signal =
|
||||
(1L << GLIBTOP_PROC_SIGNAL_SIGNAL) +
|
||||
@@ -70,69 +68,30 @@ glibtop_get_proc_signal_p (glibtop *server,
|
||||
return;
|
||||
}
|
||||
|
||||
#if (defined(__FreeBSD__) && (__FreeBSD_version >= 500013)) || defined(__FreeBSD_kernel__)
|
||||
|
||||
#define PROC_SIGLIST ki_siglist
|
||||
#define PROC_SIGMASK ki_sigmask
|
||||
#define PROC_SIGIGNORE ki_sigignore
|
||||
#define PROC_SIGCATCH ki_sigcatch
|
||||
|
||||
#else
|
||||
|
||||
#define PROC_SIGLIST kp_proc.p_siglist
|
||||
#define PROC_SIGMASK kp_proc.p_sigmask
|
||||
#define PROC_SIGIGNORE kp_proc.p_sigignore
|
||||
#define PROC_SIGCATCH kp_proc.p_sigcatch
|
||||
|
||||
#endif
|
||||
|
||||
/* signal: mask of pending signals.
|
||||
* pinfo [0].kp_proc.p_siglist
|
||||
*/
|
||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105150000)
|
||||
buf->signal [0] = pinfo [0].kp_proc.p_sigctx.ps_siglist.__bits[0];
|
||||
#elif (defined(__NetBSD__) && (NSIG > 32)) || \
|
||||
(defined(__FreeBSD__) && (__FreeBSD_version >= 400011) || defined(__FreeBSD_kernel__))
|
||||
buf->signal [0] = pinfo [0].PROC_SIGLIST.__bits[0];
|
||||
#else
|
||||
buf->signal [0] = pinfo [0].kp_proc.p_siglist;
|
||||
#endif
|
||||
|
||||
/* blocked: mask of blocked signals.
|
||||
* pinfo [0].kp_proc.p_sigmask
|
||||
*/
|
||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105150000)
|
||||
buf->blocked [0] = pinfo [0].kp_proc.p_sigctx.ps_sigmask.__bits[0];
|
||||
#elif (defined(__NetBSD__) && (NSIG > 32)) || \
|
||||
(defined(__FreeBSD__) && (__FreeBSD_version >= 400011) || defined(__FreeBSD_kernel__))
|
||||
buf->blocked [0] = pinfo [0].PROC_SIGMASK.__bits[0];
|
||||
#else
|
||||
buf->blocked [0] = pinfo [0].kp_proc.p_sigmask;
|
||||
#endif
|
||||
|
||||
/* sigignore: mask of ignored signals.
|
||||
* pinfo [0].kp_proc.p_sigignore
|
||||
*/
|
||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105150000)
|
||||
buf->sigignore [0] = pinfo [0].kp_proc.p_sigctx.ps_sigignore.__bits[0];
|
||||
#elif (defined(__NetBSD__) && (NSIG > 32)) || \
|
||||
(defined(__FreeBSD__) && (__FreeBSD_version >= 400011) || defined(__FreeBSD_kernel__))
|
||||
buf->sigignore [0] = pinfo [0].PROC_SIGIGNORE.__bits[0];
|
||||
#else
|
||||
buf->sigignore [0] = pinfo [0].kp_proc.p_sigignore;
|
||||
#endif
|
||||
|
||||
/* sigcatch: mask of caught signals.
|
||||
* pinfo [0].kp_proc.p_sigcatch
|
||||
*/
|
||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105150000)
|
||||
buf->sigcatch [0] = pinfo [0].kp_proc.p_sigctx.ps_sigcatch.__bits[0];
|
||||
#elif (defined(__NetBSD__) && (NSIG > 32)) || \
|
||||
(defined(__FreeBSD__) && (__FreeBSD_version >= 400011) || defined(__FreeBSD_kernel__))
|
||||
buf->sigcatch [0] = pinfo [0].PROC_SIGCATCH.__bits[0];
|
||||
#else
|
||||
buf->sigcatch [0] = pinfo [0].kp_proc.p_sigcatch;
|
||||
#endif
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_signal;
|
||||
}
|
||||
|
Reference in New Issue
Block a user