summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2008-12-17 14:17:15 +0100
committerNeal H. Walfield <neal@gnu.org>2008-12-17 14:17:15 +0100
commit6375b6cdd0732bfc3f9a1cca5a2e03f44eef8ec5 (patch)
tree5525aaff51d12648643aca37b406c5daef9bc358
parent9f836a41f30e7156d745dddd83b802356ad1d980 (diff)
Move activation interface definitions to libviengoos.
hurd/ 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. libhurd-mm/ 2008-12-17 Neal H. Walfield <neal@gnu.org> * ia32-exception-entry.S: Don't include <hurd/exceptions.h>. Include <hurd/stddef.h>. libviengoos/ 2008-12-17 Neal H. Walfield <neal@gnu.org> * ../hurd/exceptions.h (ACTIVATION_fault, activation_method_id_string) (struct activation_fault_info, ACTIVATION_FAULT_INFO_FMT) (ACTIVATION_FAULT_INFO_PRINTF, fault): Move from here... * viengoos/thread.h: ... to here.
-rw-r--r--hurd/ChangeLog9
-rw-r--r--hurd/exceptions.h67
-rw-r--r--libhurd-mm/ChangeLog5
-rw-r--r--libhurd-mm/ia32-exception-entry.S2
-rw-r--r--libviengoos/ChangeLog7
-rw-r--r--libviengoos/viengoos/thread.h58
-rw-r--r--viengoos/ChangeLog5
-rw-r--r--viengoos/server.c1
-rw-r--r--viengoos/thread.c1
9 files changed, 87 insertions, 68 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
diff --git a/libhurd-mm/ChangeLog b/libhurd-mm/ChangeLog
index fe90da8..a88e681 100644
--- a/libhurd-mm/ChangeLog
+++ b/libhurd-mm/ChangeLog
@@ -1,3 +1,8 @@
+2008-12-17 Neal H. Walfield <neal@gnu.org>
+
+ * ia32-exception-entry.S: Don't include <hurd/exceptions.h>.
+ Include <hurd/stddef.h>.
+
2008-12-16 Neal H. Walfield <neal@gnu.org>
* ia32-exception-entry.S (UTCB_SAVED_THREAD_STATE): Don't define.
diff --git a/libhurd-mm/ia32-exception-entry.S b/libhurd-mm/ia32-exception-entry.S
index f4212bf..04f38ce 100644
--- a/libhurd-mm/ia32-exception-entry.S
+++ b/libhurd-mm/ia32-exception-entry.S
@@ -18,7 +18,7 @@
along with this program. If not, see
<http://www.gnu.org/licenses/>. */
-#include <hurd/exceptions.h>
+#include <hurd/stddef.h>
.text
diff --git a/libviengoos/ChangeLog b/libviengoos/ChangeLog
index f112761..f0c8667 100644
--- a/libviengoos/ChangeLog
+++ b/libviengoos/ChangeLog
@@ -1,5 +1,12 @@
2008-12-17 Neal H. Walfield <neal@gnu.org>
+ * ../hurd/exceptions.h (ACTIVATION_fault, activation_method_id_string)
+ (struct activation_fault_info, ACTIVATION_FAULT_INFO_FMT)
+ (ACTIVATION_FAULT_INFO_PRINTF, fault): Move from here...
+ * viengoos/thread.h: ... to here.
+
+2008-12-17 Neal H. Walfield <neal@gnu.org>
+
* t-addr.c: Don't include <l4/math.h>. Include <viengoos/math.h>.
(main): Use vg_msb64 instead of l4_msb64 and vg_lsb64 instead of
l4_lsb64.
diff --git a/libviengoos/viengoos/thread.h b/libviengoos/viengoos/thread.h
index d8a69eb..3789475 100644
--- a/libviengoos/viengoos/thread.h
+++ b/libviengoos/viengoos/thread.h
@@ -276,6 +276,64 @@ vg_myself (void)
return vg_niltid;
return tid;
}
+
+#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
#endif /* _VIENGOOS_THREAD_H */
#endif /* __need_vg_thread_id_t */
diff --git a/viengoos/ChangeLog b/viengoos/ChangeLog
index 7bcefa1..d7f60ec 100644
--- a/viengoos/ChangeLog
+++ b/viengoos/ChangeLog
@@ -1,5 +1,10 @@
2008-12-17 Neal H. Walfield <neal@gnu.org>
+ * server.c: Don't include <hurd/exceptions.h>.
+ * thread.c: Likewise.
+
+2008-12-17 Neal H. Walfield <neal@gnu.org>
+
* zalloc.c: Don't include <l4/math.h>. Include <viengoos/math.h>.
(zfree): Use vg_msb instead of l4_msb.
* ager.c (update_stats): Likewise.
diff --git a/viengoos/server.c b/viengoos/server.c
index 3280a54..6c0be23 100644
--- a/viengoos/server.c
+++ b/viengoos/server.c
@@ -22,7 +22,6 @@
#include <l4/pagefault.h>
#include <viengoos/cap.h>
#include <hurd/stddef.h>
-#include <hurd/exceptions.h>
#include <viengoos/thread.h>
#include <viengoos/activity.h>
#include <viengoos/futex.h>
diff --git a/viengoos/thread.c b/viengoos/thread.c
index ec8080f..1889aa8 100644
--- a/viengoos/thread.c
+++ b/viengoos/thread.c
@@ -23,7 +23,6 @@
#include <hurd/ihash.h>
#include <viengoos/cap.h>
#include <hurd/stddef.h>
-#include <hurd/exceptions.h>
#include <viengoos/thread.h>
#include <bit-array.h>
#include <backtrace.h>