exception.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright (c) 2013 Free Software Foundation.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along
  15. * with this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  17. */
  18. #ifndef _KERN_EXCEPTION_H_
  19. #define _KERN_EXCEPTION_H_
  20. #include <ipc/ipc_types.h>
  21. #include <ipc/ipc_kmsg.h>
  22. extern void
  23. exception(
  24. integer_t _exception,
  25. integer_t code,
  26. integer_t subcode) __attribute__ ((noreturn));
  27. extern void
  28. exception_try_task(
  29. integer_t _exception,
  30. integer_t code,
  31. integer_t subcode) __attribute__ ((noreturn));
  32. extern void
  33. exception_no_server(void) __attribute__ ((noreturn));
  34. extern void
  35. exception_raise(
  36. ipc_port_t dest_port,
  37. ipc_port_t thread_port,
  38. ipc_port_t task_port,
  39. integer_t _exception,
  40. integer_t code,
  41. integer_t subcode) __attribute__ ((noreturn));
  42. extern kern_return_t
  43. exception_parse_reply(ipc_kmsg_t kmsg);
  44. extern void
  45. exception_raise_continue(void) __attribute__ ((noreturn));
  46. extern void
  47. exception_raise_continue_slow(
  48. mach_msg_return_t mr,
  49. ipc_kmsg_t kmsg,
  50. mach_port_seqno_t seqno) __attribute__ ((noreturn));
  51. extern void
  52. exception_raise_continue_fast(
  53. ipc_port_t reply_port,
  54. ipc_kmsg_t kmsg) __attribute__ ((noreturn));
  55. #endif /* _KERN_EXCEPTION_H_ */