diff options
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/ChangeLog | 9 | ||||
-rw-r--r-- | hurd/exceptions.h | 67 |
2 files changed, 11 insertions, 65 deletions
diff --git a/hurd/ChangeLog b/hurd/ChangeLog index 5579351..481ace9 100644 --- a/hurd/ChangeLog +++ b/hurd/ChangeLog @@ -1,5 +1,14 @@ 2008-12-17 Neal H. Walfield <neal@gnu.org> + * exceptions.h: Don't include <viengoos/cap.h> or <l4/space.h>. + Include <viengoos/addr.h>. + (ACTIVATION_fault, activation_method_id_string) + (struct activation_fault_info, ACTIVATION_FAULT_INFO_FMT) + (ACTIVATION_FAULT_INFO_PRINTF, fault): Move from here... + * ../libviengoos/viengoos/thread.h: ... to here. + +2008-12-17 Neal H. Walfield <neal@gnu.org> + * thread.h: Include <hurd/exceptions.h>. (struct hurd_utcb): Add field tid. (hurd_myself): New function. diff --git a/hurd/exceptions.h b/hurd/exceptions.h index 6d27d6e..4e7dfd5 100644 --- a/hurd/exceptions.h +++ b/hurd/exceptions.h @@ -23,72 +23,11 @@ #include <hurd/stddef.h> -#ifndef ASM - #include <stdint.h> -#include <viengoos/cap.h> +#include <viengoos/addr.h> #include <viengoos/thread.h> #include <hurd/error.h> -#include <l4/space.h> - -#define RPC_STUB_PREFIX activation -#define RPC_ID_PREFIX ACTIVATION -#include <viengoos/rpc.h> - -/* Activation message ids. */ -enum - { - ACTIVATION_fault = 10, - }; - -/* Return a string corresponding to a message id. */ -static inline const char * -activation_method_id_string (uintptr_t id) -{ - switch (id) - { - case ACTIVATION_fault: - return "fault"; - default: - return "unknown"; - } -} - -struct activation_fault_info -{ - union - { - struct - { - /* Type of access. */ - uintptr_t access: 3; - /* Type of object that was attempting to be accessed. */ - uintptr_t type : CAP_TYPE_BITS; - /* Whether the page was discarded. */ - uintptr_t discarded : 1; - }; - uintptr_t raw; - }; -}; - -#define ACTIVATION_FAULT_INFO_FMT "%c%c%c %s%s" -#define ACTIVATION_FAULT_INFO_PRINTF(info) \ - ((info).access & L4_FPAGE_READABLE ? 'r' : '~'), \ - ((info).access & L4_FPAGE_WRITABLE ? 'w' : '~'), \ - ((info).access & L4_FPAGE_EXECUTABLE ? 'x' : '~'), \ - cap_type_string ((info).type), \ - (info.discarded) ? " discarded" : "" - -/* Raise a fault at address FAULT_ADDRESS. If IP is not 0, then IP is - the value of the IP of the faulting thread at the time of the fault - and SP the value of the stack pointer at the time of the fault. */ -RPC (fault, 4, 0, 0, - addr_t, fault_address, uintptr_t, sp, uintptr_t, ip, - struct activation_fault_info, activation_fault_info) - -#undef RPC_STUB_PREFIX -#undef RPC_ID_PREFIX - + /* Initializes the activation handler to allow receiving IPCs (but does not handle other faults). This must be called exactly once before any IPCs are sent. */ @@ -164,6 +103,4 @@ extern void hurd_activation_message_unregister (struct hurd_message_buffer *mb); /* Dump the activation stack to stdout. */ extern void hurd_activation_stack_dump (void); -#endif /* !ASM */ - #endif |