ptrace.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * linux/arch/cris/kernel/ptrace.c
  3. *
  4. * Parts taken from the m68k port.
  5. *
  6. * Copyright (c) 2000, 2001, 2002 Axis Communications AB
  7. *
  8. * Authors: Bjorn Wesen
  9. *
  10. */
  11. #include <linux/kernel.h>
  12. #include <linux/sched.h>
  13. #include <linux/mm.h>
  14. #include <linux/smp.h>
  15. #include <linux/errno.h>
  16. #include <linux/ptrace.h>
  17. #include <linux/user.h>
  18. #include <linux/tracehook.h>
  19. #include <asm/uaccess.h>
  20. #include <asm/page.h>
  21. #include <asm/pgtable.h>
  22. #include <asm/system.h>
  23. #include <asm/processor.h>
  24. /* notification of userspace execution resumption
  25. * - triggered by current->work.notify_resume
  26. */
  27. extern int do_signal(int canrestart, struct pt_regs *regs);
  28. void do_notify_resume(int canrestart, struct pt_regs *regs,
  29. __u32 thread_info_flags)
  30. {
  31. /* deal with pending signal delivery */
  32. if (thread_info_flags & _TIF_SIGPENDING)
  33. do_signal(canrestart,regs);
  34. if (thread_info_flags & _TIF_NOTIFY_RESUME) {
  35. clear_thread_flag(TIF_NOTIFY_RESUME);
  36. tracehook_notify_resume(regs);
  37. if (current->replacement_session_keyring)
  38. key_replace_session_keyring();
  39. }
  40. }