compat-signal.h 640 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ASM_COMPAT_SIGNAL_H
  3. #define __ASM_COMPAT_SIGNAL_H
  4. #include <linux/bug.h>
  5. #include <linux/compat.h>
  6. #include <linux/compiler.h>
  7. #include <asm/signal.h>
  8. #include <asm/siginfo.h>
  9. #include <linux/uaccess.h>
  10. static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d,
  11. const sigset_t *s)
  12. {
  13. BUILD_BUG_ON(sizeof(*d) != sizeof(*s));
  14. BUILD_BUG_ON(_NSIG_WORDS != 2);
  15. return put_compat_sigset(d, s, sizeof(*d));
  16. }
  17. static inline int __copy_conv_sigset_from_user(sigset_t *d,
  18. const compat_sigset_t __user *s)
  19. {
  20. return get_compat_sigset(d, s);
  21. }
  22. #endif /* __ASM_COMPAT_SIGNAL_H */