Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arch: provide better documentation for the arch-specific SA_* flags

Instead of documenting the arch-specific flag values in a comment at
the top where they may be easily overlooked, document them in comments
inline with the definitions in numerical order so that it is clear
why specific values must be chosen for new generic flags and to reduce
the likelihood of conflicts between generic and arch-specific flags.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Link: https://linux-review.googlesource.com/id/I40a129cf7c3a71ba1bfd6d936c544072ee3b7ce6
Link: https://lkml.kernel.org/r/198c8b68c76bf3ed73117d817c7cdf9bc0eb174f.1605582887.git.pcc@google.com
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>

authored by

Peter Collingbourne and committed by
Eric W. Biederman
7da5082a 23acdc76

+14 -8
+14 -8
include/uapi/asm-generic/signal-defs.h
··· 17 17 * 18 18 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single 19 19 * Unix names RESETHAND and NODEFER respectively. 20 - * 21 - * The following bits are used in architecture-specific SA_* definitions and 22 - * should be avoided for new generic flags: 3, 4, 5, 6, 7, 8, 9, 16, 24, 25, 26. 23 20 */ 24 21 #ifndef SA_NOCLDSTOP 25 22 #define SA_NOCLDSTOP 0x00000001 ··· 27 30 #ifndef SA_SIGINFO 28 31 #define SA_SIGINFO 0x00000004 29 32 #endif 33 + /* 0x00000008 used on alpha, mips, parisc */ 34 + /* 0x00000010 used on alpha, parisc */ 35 + /* 0x00000020 used on alpha, parisc, sparc */ 36 + /* 0x00000040 used on alpha, parisc */ 37 + /* 0x00000080 used on parisc */ 38 + /* 0x00000100 used on sparc */ 39 + /* 0x00000200 used on sparc */ 40 + /* 0x00010000 used on mips */ 41 + /* 0x01000000 used on x86 */ 42 + /* 0x02000000 used on x86 */ 43 + /* 44 + * New architectures should not define the obsolete 45 + * SA_RESTORER 0x04000000 46 + */ 30 47 #ifndef SA_ONSTACK 31 48 #define SA_ONSTACK 0x08000000 32 49 #endif ··· 56 45 57 46 #define SA_NOMASK SA_NODEFER 58 47 #define SA_ONESHOT SA_RESETHAND 59 - 60 - /* 61 - * New architectures should not define the obsolete 62 - * SA_RESTORER 0x04000000 63 - */ 64 48 65 49 #ifndef SIG_BLOCK 66 50 #define SIG_BLOCK 0 /* for blocking signals */