thread_state.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Mach thread state definitions for machine-independent code. Stub version.
  2. Copyright (C) 1994-2019 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <http://www.gnu.org/licenses/>. */
  15. /* Everything else is called `thread_state', but CMU's header file is
  16. called `thread_status'. Oh boy. */
  17. #include <mach/thread_state.h>
  18. /* Replace <machine> with "i386" or "mips" or whatever. */
  19. /* This lets the kernel define architecture-specific registers for a new
  20. thread. */
  21. #define MACHINE_NEW_THREAD_STATE_FLAVOR <machine>_NEW_THREAD_STATE
  22. /* This makes the kernel load all architectures-specific registers for the
  23. thread. */
  24. #define MACHINE_THREAD_STATE_FLAVOR <machine>_THREAD_STATE
  25. #define MACHINE_THREAD_STATE_COUNT <machine>_THREAD_STATE_COUNT
  26. #define machine_thread_state <machine>_thread_state
  27. /* Define these to the member names in `struct <machine>_thread_state'
  28. for the PC and stack pointer. */
  29. #define PC ?
  30. #define SP ?
  31. /* This structure should contain all of the different flavors of thread
  32. state structures which are meaningful for this machine. Every machine's
  33. definition of this structure should have a member `int set' which is a
  34. bit mask (1 << FLAVOR) of the flavors of thread state in the structure
  35. which are filled in; and a member `struct machine_thread_state basic'.
  36. On some machines those are the only members (e.g. i386); on others,
  37. there are several relevant flavors of thread state (e.g. mips). */
  38. struct machine_thread_all_state
  39. {
  40. int set; /* Mask of bits (1 << FLAVOR). */
  41. struct <machine>_thread_state basic;
  42. };