signal.inc 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. {
  2. $Id$
  3. Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  4. @APPLE_LICENSE_HEADER_START@
  5. The contents of this file constitute Original Code as defined in and
  6. are subject to the Apple Public Source License Version 1.1 (the
  7. "License"). You may not use this file except in compliance with the
  8. License. Please obtain a copy of the License at
  9. http://www.apple.com/publicsource and read it before using this file.
  10. This Original Code and all software distributed under the License are
  11. distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  12. EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  13. INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  14. FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
  15. License for the specific language governing rights and limitations
  16. under the License.
  17. @APPLE_LICENSE_HEADER_END@
  18. }
  19. {
  20. Copyright (c) 1992, 1993 NeXT Computer, Inc.
  21. HISTORY
  22. Machine specific signal information.
  23. HISTORY
  24. 25-MAR-97 Umesh Vaishampayan ([email protected])
  25. Ported from m98k and hppa.
  26. 13-Jan-92 Peter King (king) at NeXT Computer, Inc.
  27. Filled out struct sigcontext to hold all registers.
  28. Added regs_saved_t to specify which regs stored in the
  29. sigcontext are valid.
  30. 09-Nov-92 Ben Fathi (benf) at NeXT, Inc.
  31. Ported to m98k.
  32. 09-May-91 Mike DeMoney (mike) at NeXT, Inc.
  33. Ported to m88k.
  34. }
  35. const
  36. _PPC_SIGNAL_ = 1;
  37. type
  38. sig_atomic_t = longint;
  39. {
  40. Machine-dependant flags used in sigvec call.
  41. }
  42. { Save all regs in sigcontext }
  43. const
  44. SV_SAVE_REGS = $1000;
  45. {
  46. regs_saved_t -- Describes which registers beyond what the kernel cares
  47. about are saved to and restored from this sigcontext.
  48. The default is REGS_SAVED_CALLER, only the caller saved registers
  49. are saved. If the SV_SAVE_REGS flag was set when the signal
  50. handler was registered with sigvec() then all the registers will be
  51. saved in the sigcontext, and REGS_SAVED_ALL will be set. The C
  52. library uses REGS_SAVED_NONE in order to quickly restore kernel
  53. state during a longjmp().
  54. }
  55. { Only kernel managed regs restored }
  56. { "Caller saved" regs: rpc, a0-a7,
  57. t0-t4, at, lk0-lk1, xt1-xt20,
  58. xr0-xr1 }
  59. { All registers }
  60. type
  61. regs_saved_t = (REGS_SAVED_NONE,REGS_SAVED_CALLER,REGS_SAVED_ALL
  62. );
  63. {
  64. Information pushed on stack when a signal is delivered.
  65. This is used by the kernel to restore state following
  66. execution of the signal handler. It is also made available
  67. to the handler to allow it to properly restore state if
  68. a non-standard exit is performed.
  69. }
  70. { sigstack state to restore }
  71. { signal mask to restore }
  72. { pc }
  73. { processor status word }
  74. { stack pointer if sc_regs == NULL }
  75. { (kernel private) saved state }
  76. sigcontextrec = record
  77. sc_onstack : longint;
  78. sc_mask : longint;
  79. sc_ir : longint;
  80. sc_psw : longint;
  81. sc_sp : longint;
  82. sc_regs : pointer;
  83. end;
  84. {
  85. $Log$
  86. Revision 1.1 2002-09-08 09:01:48 jonas
  87. + initial revision
  88. }