cregit-Linux how code gets into the kernel

Release 4.14 arch/x86/include/asm/signal.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_X86_SIGNAL_H

#define _ASM_X86_SIGNAL_H

#ifndef __ASSEMBLY__
#include <linux/linkage.h>

/* Most things should be clean enough to redefine this at will, if care
   is taken to make libc match.  */


#define _NSIG		64

#ifdef __i386__

# define _NSIG_BPW	32
#else

# define _NSIG_BPW	64
#endif


#define _NSIG_WORDS	(_NSIG / _NSIG_BPW)


typedef unsigned long old_sigset_t;		
/* at least 32 bits */

typedef struct {
	
unsigned long sig[_NSIG_WORDS];

} sigset_t;

/* non-uapi in-kernel SA_FLAGS for those indicates ABI for a signal frame */

#define SA_IA32_ABI	0x02000000u

#define SA_X32_ABI	0x01000000u

#ifndef CONFIG_COMPAT

typedef sigset_t compat_sigset_t;
#endif

#endif /* __ASSEMBLY__ */
#include <uapi/asm/signal.h>
#ifndef __ASSEMBLY__
extern void do_signal(struct pt_regs *regs);


#define __ARCH_HAS_SA_RESTORER

#include <uapi/asm/sigcontext.h>

#ifdef __i386__


#define __HAVE_ARCH_SIG_BITOPS


#define sigaddset(set,sig)		    \
	(__builtin_constant_p(sig)          \
         ? __const_sigaddset((set), (sig))  \
         : __gen_sigaddset((set), (sig)))


static inline void __gen_sigaddset(sigset_t *set, int _sig) { asm("btsl %1,%0" : "+m"(*set) : "Ir"(_sig - 1) : "cc"); }

Contributors

PersonTokensPropCommitsCommitProp
Thomas Gleixner1386.67%150.00%
Joe Perches213.33%150.00%
Total15100.00%2100.00%


static inline void __const_sigaddset(sigset_t *set, int _sig) { unsigned long sig = _sig - 1; set->sig[sig / _NSIG_BPW] |= 1 << (sig % _NSIG_BPW); }

Contributors

PersonTokensPropCommitsCommitProp
Thomas Gleixner3897.44%150.00%
Joe Perches12.56%150.00%
Total39100.00%2100.00%

#define sigdelset(set, sig) \ (__builtin_constant_p(sig) \ ? __const_sigdelset((set), (sig)) \ : __gen_sigdelset((set), (sig)))
static inline void __gen_sigdelset(sigset_t *set, int _sig) { asm("btrl %1,%0" : "+m"(*set) : "Ir"(_sig - 1) : "cc"); }

Contributors

PersonTokensPropCommitsCommitProp
Thomas Gleixner1386.67%150.00%
Joe Perches213.33%150.00%
Total15100.00%2100.00%


static inline void __const_sigdelset(sigset_t *set, int _sig) { unsigned long sig = _sig - 1; set->sig[sig / _NSIG_BPW] &= ~(1 << (sig % _NSIG_BPW)); }

Contributors

PersonTokensPropCommitsCommitProp
Thomas Gleixner4197.62%150.00%
Joe Perches12.38%150.00%
Total42100.00%2100.00%


static inline int __const_sigismember(sigset_t *set, int _sig) { unsigned long sig = _sig - 1; return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW)); }

Contributors

PersonTokensPropCommitsCommitProp
Thomas Gleixner4197.62%150.00%
Joe Perches12.38%150.00%
Total42100.00%2100.00%


static inline int __gen_sigismember(sigset_t *set, int _sig) { unsigned char ret; asm("btl %2,%1\n\tsetc %0" : "=qm"(ret) : "m"(*set), "Ir"(_sig-1) : "cc"); return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Thomas Gleixner1881.82%133.33%
H. Peter Anvin313.64%133.33%
Joe Perches14.55%133.33%
Total22100.00%3100.00%

#define sigismember(set, sig) \ (__builtin_constant_p(sig) \ ? __const_sigismember((set), (sig)) \ : __gen_sigismember((set), (sig))) struct pt_regs; #else /* __i386__ */ #undef __HAVE_ARCH_SIG_BITOPS #endif /* !__i386__ */ #endif /* __ASSEMBLY__ */ #endif /* _ASM_X86_SIGNAL_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Thomas Gleixner27383.23%213.33%
Joe Perches103.05%16.67%
Dmitry Safonov92.74%16.67%
Suresh B. Siddha92.74%16.67%
Andrew Lutomirski82.44%16.67%
H. Peter Anvin61.83%213.33%
Roland McGrath30.91%16.67%
Al Viro30.91%16.67%
Herton Ronaldo Krzesinski20.61%16.67%
Jaswinder Singh Rajput20.61%16.67%
Greg Kroah-Hartman10.30%16.67%
David Howells10.30%16.67%
Ingo Molnar10.30%16.67%
Total328100.00%15100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.