diff options
author | Roland McGrath <roland@gnu.org> | 2002-02-17 22:54:39 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-02-17 22:54:39 +0000 |
commit | f22a77e1db3c93123691164c5c36f5d25d0bc4ed (patch) | |
tree | 4ecba81f45fcb6aa449f6ed202a26c90efb6f6c9 /hurd/catch-exc.c | |
parent | 9b09446441f1b3a888ca4a83247496e2e7900d3c (diff) | |
download | glibc-f22a77e1db3c93123691164c5c36f5d25d0bc4ed.tar glibc-f22a77e1db3c93123691164c5c36f5d25d0bc4ed.tar.gz glibc-f22a77e1db3c93123691164c5c36f5d25d0bc4ed.tar.bz2 glibc-f22a77e1db3c93123691164c5c36f5d25d0bc4ed.zip |
* hurd/hurdselect.c (_hurd_select) [MACH_MSG_TRAILER_MINIMUM_SIZE]:
Use untyped Mach IPC message format.
* sysdeps/mach/hurd/ioctl.c (__ioctl) [! MACH_MSG_TYPE_BIT]: Handle
Handle untyped Mach IPC message formats.
* hurd/catch-exc.c (_S_catch_exception_raise) [EXC_MASK_ALL]:
Expect different argument conventions when this is defined.
[EXC_MASK_ALL] (_S_catch_exception_raise_state): New stub function.
[EXC_MASK_ALL] (_S_catch_exception_raise_state_identity): Likewise.
* hurd/hurdfault.c: Likewise for _hurdsig_fault_catch_exception_*.
[NDR_CHAR_ASCII] (mig_reply_header_t): #define as mig_reply_error_t
for OSF Mach variant.
(faulted): Use mig_reply_error_t for REPLY.
(_hurdsig_fault_init) [EXC_MASK_ALL]: Use EXCEPTION_STATE_IDENTITY
in __thread_set_exception_ports call.
(_hurdsig_fault_init) [MACH_PORT_RECEIVE_STATUS]: Use
__mach_port_set_attributes in place of __mach_port_set_qlimit.
* sysdeps/mach/powerpc/sysdep.h (_MACH_MACHINE_ASM_H): Define this
before include <sysdeps/mach/sysdep.h>, to inhibit <mach/machine/asm.h>
on Darwin, which includes bogons.
Diffstat (limited to 'hurd/catch-exc.c')
-rw-r--r-- | hurd/catch-exc.c | 57 |
1 files changed, 53 insertions, 4 deletions
diff --git a/hurd/catch-exc.c b/hurd/catch-exc.c index 9eef252df1..6c58793a98 100644 --- a/hurd/catch-exc.c +++ b/hurd/catch-exc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994,95,96,97,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,9 +25,14 @@ kern_return_t _S_catch_exception_raise (mach_port_t port, thread_t thread, task_t task, - int exception, - int code, - int subcode) +#ifdef EXC_MASK_ALL /* New interface flavor. */ + exception_type_t exception, + exception_data_t code, + mach_msg_type_number_t codeCnt +#else /* Vanilla Mach 3.0 interface. */ + int exception, int code, int subcode +#endif + ) { struct hurd_sigstate *ss; int signo; @@ -38,8 +43,14 @@ _S_catch_exception_raise (mach_port_t port, return EPERM; d.exc = exception; +#ifdef EXC_MASK_ALL + assert (codeCnt >= 2); + d.exc_code = code[0]; + d.exc_subcode = code[1]; +#else d.exc_code = code; d.exc_subcode = subcode; +#endif /* Call the machine-dependent function to translate the Mach exception codes into a signal number and subcode. */ @@ -79,3 +90,41 @@ _S_catch_exception_raise (mach_port_t port, return KERN_SUCCESS; } + +#ifdef EXC_MASK_ALL +/* XXX New interface flavor has additional RPCs that we could be using + instead. These RPCs roll a thread_get_state/thread_set_state into + the message, so the signal thread ought to use these to save some calls. + */ +kern_return_t +_S_catch_exception_raise_state (mach_port_t port, + exception_type_t exception, + exception_data_t code, + mach_msg_type_number_t codeCnt, + int *flavor, + thread_state_t old_state, + mach_msg_type_number_t old_stateCnt, + thread_state_t new_state, + mach_msg_type_number_t *new_stateCnt) +{ + abort (); + return KERN_FAILURE; +} + +kern_return_t +_S_catch_exception_raise_state_identity (mach_port_t exception_port, + thread_t thread, + task_t task, + exception_type_t exception, + exception_data_t code, + mach_msg_type_number_t codeCnt, + int *flavor, + thread_state_t old_state, + mach_msg_type_number_t old_stateCnt, + thread_state_t new_state, + mach_msg_type_number_t *new_stateCnt) +{ + abort (); + return KERN_FAILURE; +} +#endif |