exception.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * This program is free software; you can redistribute it and/or modify
  3. * it under the terms of the GNU General Public License version 2 as
  4. * published by the Free Software Foundation.
  5. *
  6. * This program is distributed in the hope that it will be useful,
  7. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. * GNU General Public License for more details.
  10. *
  11. * You should have received a copy of the GNU General Public License
  12. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #ifndef __ASM_EXCEPTION_H
  15. #define __ASM_EXCEPTION_H
  16. struct pt_regs;
  17. struct exception_table_entry;
  18. extern void ia64_handle_exception(struct pt_regs *regs,
  19. const struct exception_table_entry *e);
  20. #define ia64_done_with_exception(regs) \
  21. ({ \
  22. int __ex_ret = 0; \
  23. const struct exception_table_entry *e; \
  24. e = search_exception_tables((regs)->cr_iip + ia64_psr(regs)->ri); \
  25. if (e) { \
  26. ia64_handle_exception(regs, e); \
  27. __ex_ret = 1; \
  28. } \
  29. __ex_ret; \
  30. })
  31. #endif /* __ASM_EXCEPTION_H */