aboutsummaryrefslogtreecommitdiff
path: root/mach
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-02-18 20:57:51 +0000
committerRoland McGrath <roland@gnu.org>2002-02-18 20:57:51 +0000
commit21297437bb37c5f1aedb615fd41e93efc12f556a (patch)
tree77461c41453829cbf06db3d934f82706d0b485a2 /mach
parent9ce8b3c817156108b9f1a1cf12a3fa6eb4332f11 (diff)
downloadglibc-21297437bb37c5f1aedb615fd41e93efc12f556a.zip
glibc-21297437bb37c5f1aedb615fd41e93efc12f556a.tar.gz
glibc-21297437bb37c5f1aedb615fd41e93efc12f556a.tar.bz2
* sysdeps/mach/configure.in: Check for <mach/machine/ndr_def.h>
or <machine/ndr_def.h> and add -DNDR_DEF_HEADER=... to DEFINES. * sysdeps/mach/configure: Regenerated. * mach/mach_init.c [NDR_DEF_HEADER]: #include it. * hurd/hurdfault.c (_hurdsig_fault_init): Add a cast. * hurd/hurd/signal.h: Include <setjmp.h> for `jmp_buf' decl. * mach/msgserver.c (__mach_msg_server_timeout) [! MACH_RCV_LARGE]: Double MAX_SIZE and don't retry on MACH_RCV_TOO_LARGE. * sysdeps/mach/hurd/times.c [NO_CREATION_TIME] (startup_time): New static variable. [NO_CREATION_TIME] (times_init): New static function in __libc_subinit. (__times) [NO_CREATION_TIME]: Use startup_time in lieu of task creation_time from task_basic_info. (__times): Use __gettimeofday instead of __host_get_time. * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg) [! MACH_MSG_TYPE_BIT]: Use untyped Mach IPC message format. * hurd/catch-exc.c: Include <assert.h>, missing from last change.
Diffstat (limited to 'mach')
-rw-r--r--mach/mach_init.c5
-rw-r--r--mach/msgserver.c17
2 files changed, 21 insertions, 1 deletions
diff --git a/mach/mach_init.c b/mach/mach_init.c
index 0dd33e4..552d268 100644
--- a/mach/mach_init.c
+++ b/mach/mach_init.c
@@ -24,6 +24,11 @@ mach_port_t __mach_task_self_;
vm_size_t __vm_page_size = 0; /* Must be data not bss for weak alias. */
weak_alias (__vm_page_size, vm_page_size)
+#ifdef NDR_DEF_HEADER
+/* This defines NDR_record, which the MiG-generated stubs use. XXX namespace */
+# include NDR_DEF_HEADER
+#endif
+
void
__mach_init (void)
{
diff --git a/mach/msgserver.c b/mach/msgserver.c
index 6471877..82dc3d0 100644
--- a/mach/msgserver.c
+++ b/mach/msgserver.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1995, 1996, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1993,94,95,96,2001,02 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
@@ -49,6 +49,12 @@
/*
* HISTORY
* $Log$
+ * Revision 1.9 2002/02/18 20:56:35 roland
+ * 2002-02-18 Roland McGrath <roland@frob.com>
+ *
+ * * mach/msgserver.c (__mach_msg_server_timeout) [! MACH_RCV_LARGE]:
+ * Double MAX_SIZE and don't retry on MACH_RCV_TOO_LARGE.
+ *
* Revision 1.8 2002/02/17 07:13:32 roland
* 2002-02-16 Roland McGrath <roland@frob.com>
*
@@ -116,8 +122,12 @@ __mach_msg_server_timeout (boolean_t (*demux) (mach_msg_header_t *request,
if (max_size == 0)
{
+#ifdef MACH_RCV_LARGE
option |= MACH_RCV_LARGE;
max_size = 2 * __vm_page_size; /* Generic. Good? XXX */
+#else
+ max_size = 4 * __vm_page_size; /* XXX */
+#endif
}
request = __alloca (max_size);
@@ -187,6 +197,7 @@ __mach_msg_server_timeout (boolean_t (*demux) (mach_msg_header_t *request,
switch (mr)
{
case MACH_RCV_TOO_LARGE:
+#ifdef MACH_RCV_LARGE
/* The request message is larger than MAX_SIZE, and has not
been dequeued. The message header has the actual size of
the message. We recurse here in hopes that the compiler
@@ -194,6 +205,10 @@ __mach_msg_server_timeout (boolean_t (*demux) (mach_msg_header_t *request,
space instead of way too much. */
return __mach_msg_server_timeout (demux, request->Head.msgh_size,
rcv_name, option, timeout);
+#else
+ /* XXX the kernel has destroyed the msg */
+ break;
+#endif
case MACH_SEND_INVALID_DEST:
/* The reply can't be delivered, so destroy it. This error