summaryrefslogtreecommitdiff
path: root/libhurd-mm/exceptions.c
diff options
context:
space:
mode:
authorneal <neal>2008-01-02 15:41:01 +0000
committerneal <neal>2008-01-02 15:41:01 +0000
commitda6c87a2e1a94b0f31029c2616119be8597edafc (patch)
treee61606e5845307a1e2a8d8b2540c965f28d71a5f /libhurd-mm/exceptions.c
parentb358735a6cfacaa948ac875c654e3914d1a2b6f4 (diff)
viengoos/
2008-01-02 Neal H. Walfield <neal@gnu.org> * Makefile.am (libhurd_cap_a_CPPFLAGS): Add -mpreferred-stack-boundary=2. * as.c (ensure_stack) [! RM_INTERN]: New function. (AS_LOCK) [! RM_INTERN]: Call it. * cap-lookup.c (ensure_stack) [! RM_INTERN]: New function. (AS_LOCK): New macro. (AS_UNLOCK): Likewise. (cap_lookup_rel): Use AS_LOCK and AS_UNOCK rather than pthread_rwlock_rdlock and pthread_rwlock_unlock, respectively. (object_lookup_rel): Likewise. (slot_lookup_rel): Likewise. libhurd-mm/ 2008-01-02 Neal H. Walfield <neal@gnu.org> * exceptions.c (exception_handler_activated): Move the debug statement after the call to utcb_state_save. * Makefile.am (COMMON_CPPFLAGS): Add -mpreferred-stack-boundary=2. Use -O2.
Diffstat (limited to 'libhurd-mm/exceptions.c')
-rw-r--r--libhurd-mm/exceptions.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/libhurd-mm/exceptions.c b/libhurd-mm/exceptions.c
index a5395c7..3135b29 100644
--- a/libhurd-mm/exceptions.c
+++ b/libhurd-mm/exceptions.c
@@ -162,9 +162,10 @@ exception_fetch_exception (void)
void
exception_handler_normal (struct exception_frame *exception_frame)
{
- debug (5, "Exception handler called (0x%x.%x, exception_frame: %p)",
+ debug (5, "Exception handler called (0x%x.%x, exception_frame: %p, "
+ "next: %p)",
l4_thread_no (l4_myself ()), l4_version (l4_myself ()),
- exception_frame);
+ exception_frame, exception_frame->next);
l4_msg_t *msg = &exception_frame->exception;
@@ -220,17 +221,19 @@ crc (struct exception_page *exception_page)
struct exception_frame *
exception_handler_activated (struct exception_page *exception_page)
{
+ /* We expect EXCEPTION_PAGE to be page aligned. */
+ assert (((uintptr_t) exception_page & (PAGESIZE - 1)) == 0);
assert (exception_page->activated_mode);
- debug (5, "Exception handler called (0x%x.%x, exception_page: %p)",
- l4_thread_no (l4_myself ()), l4_version (l4_myself ()),
- exception_page);
-
/* Allocate an exception frame. */
struct exception_frame *exception_frame
= exception_frame_alloc (exception_page);
utcb_state_save (exception_frame);
+ debug (5, "Exception handler called (0x%x.%x, exception_page: %p)",
+ l4_thread_no (l4_myself ()), l4_version (l4_myself ()),
+ exception_page);
+
#ifndef NDEBUG
exception_page->crc = crc (exception_page);
#endif