* hurd/Versions (libc: GLIBC_2.0): Add _S_catch_exception_raise_state,
authorRoland McGrath <roland@gnu.org>
Mon, 18 Feb 2002 01:50:52 +0000 (01:50 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 18 Feb 2002 01:50:52 +0000 (01:50 +0000)
_S_catch_exception_raise_state_identity,
_hurdsig_fault_catch_exception_raise_state,
_hurdsig_fault_catch_exception_raise_state_identity.

* mach/shortcut.awk: Don't apply the /^}$/ rule when $proto == "".

* sysdeps/mach/getsysstats.c (__get_avphys_pages) [HOST_VM_INFO]: Use
__host_info with HOST_VM_INFO flavor instead of __vm_statistics.

* sysdeps/mach/hurd/getpriority.c [TASK_SCHED_TIMESHARE_INFO]: Find
`base_priority' in PIP->timeshare_base_info instead of PIP->taskinfo.

* sysdeps/mach/hurd/dl-sysdep.c [FMH]: Define for i386 only.
(fmh, unfmh): Define these functions only #if FMH.  Otherwise define
them as no-op macros.
[FMH] (ELF_MACHINE_USER_ADDRESS_MASK): Redefine it to zero.
(__mmap): Uncomment uses of ELF_MACHINE_USER_ADDRESS_MASK.

* sysdeps/powerpc/dl-machine.h
(ELF_MACHINE_USER_ADDRESS_MASK): New macro.

ChangeLog
hurd/Versions
mach/shortcut.awk
sysdeps/mach/getsysstats.c
sysdeps/mach/hurd/dl-sysdep.c
sysdeps/mach/hurd/getpriority.c
sysdeps/powerpc/dl-machine.h

index 7d95b2e182754dc049061a4829d7f2d56b56cc47..513702ff2fa55bbe9596ec83680ee162dce072d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,27 @@
 2002-02-17  Roland McGrath  <roland@frob.com>
 
+       * hurd/Versions (libc: GLIBC_2.0): Add _S_catch_exception_raise_state,
+       _S_catch_exception_raise_state_identity,
+       _hurdsig_fault_catch_exception_raise_state,
+       _hurdsig_fault_catch_exception_raise_state_identity.
+
+       * mach/shortcut.awk: Don't apply the /^}$/ rule when $proto == "".
+
+       * sysdeps/mach/getsysstats.c (__get_avphys_pages) [HOST_VM_INFO]: Use
+       __host_info with HOST_VM_INFO flavor instead of __vm_statistics.
+
+       * sysdeps/mach/hurd/getpriority.c [TASK_SCHED_TIMESHARE_INFO]: Find
+       `base_priority' in PIP->timeshare_base_info instead of PIP->taskinfo.
+
+       * sysdeps/mach/hurd/dl-sysdep.c [FMH]: Define for i386 only.
+       (fmh, unfmh): Define these functions only #if FMH.  Otherwise define
+       them as no-op macros.
+       [FMH] (ELF_MACHINE_USER_ADDRESS_MASK): Redefine it to zero.
+       (__mmap): Uncomment uses of ELF_MACHINE_USER_ADDRESS_MASK.
+
+       * sysdeps/powerpc/dl-machine.h
+       (ELF_MACHINE_USER_ADDRESS_MASK): New macro.
+
        * hurd/hurdselect.c (_hurd_select) [MACH_MSG_TRAILER_MINIMUM_SIZE]:
        Use untyped Mach IPC message format.
 
index 9b20923f8a435949d2fb7d57a7b320d7d5ffe90f..34333b03cec2cc3fce1b5d3b738e7e0a7797ca55 100644 (file)
@@ -41,6 +41,8 @@ libc {
 
     # functions used in libmachuser and libhurduser
     _S_catch_exception_raise;
+    _S_catch_exception_raise_state;
+    _S_catch_exception_raise_state_identity;
     _S_msg_add_auth; _S_msg_del_auth;
     _S_msg_describe_ports;
     _S_msg_get_dtable; _S_msg_set_dtable;
@@ -53,7 +55,10 @@ libc {
     _S_msg_get_init_ports; _S_msg_set_init_ports;
     _S_msg_proc_newids; _S_msg_report_wait;
     _S_msg_sig_post; _S_msg_sig_post_untraced;
-    _hurd_intr_rpc_mach_msg; _hurdsig_fault_catch_exception_raise;
+    _hurd_intr_rpc_mach_msg;
+    _hurdsig_fault_catch_exception_raise;
+    _hurdsig_fault_catch_exception_raise_state;
+    _hurdsig_fault_catch_exception_raise_state_identity;
 
     # "quasi-internal" variables
     _hurd_device_master;
index 987cebe325f5b23026399462b36c8488928bfd72..1857998122128b53d3b1c332f003f115cbc1b723 100644 (file)
@@ -30,7 +30,7 @@ NF == 1 && $1 == "(" { inproto=1 }
 
 echo == 1 { print $0; }
 
-/^}$/ \
+/^}$/ && proto != "" \
   {
     print "{";
     print "  kern_return_t err;";
index e1e467735a23d9a71060d32c16552cb11c4f6ecf..d2bebb621c1a5f54da6c5f91125402f0c0e1ded4 100644 (file)
@@ -1,5 +1,5 @@
 /* System dependent pieces of sysconf; Mach version
-   Copyright (C) 1996, 97, 99, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1996,97,99,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
@@ -84,7 +84,17 @@ __get_avphys_pages ()
   vm_statistics_data_t vs;
   kern_return_t err;
 
+#ifdef HOST_VM_INFO
+  {
+    mach_msg_type_number_t count = HOST_VM_INFO_COUNT;
+    err = __host_info (__mach_host_self (), HOST_VM_INFO,
+                      (host_info_t) &vs, &count);
+    if (!err && count < HOST_VM_INFO_COUNT)
+      err = EGRATUITOUS;
+  }
+#else
   err = __vm_statistics (__mach_task_self (), &vs);
+#endif
   if (err)
     return __hurd_fail (err);
 
index 596f161525aa4bbaaf90592f52c121b82ebae0f5..520385513d0e334fd275c5d3c4cd0f27a499169d 100644 (file)
@@ -71,7 +71,14 @@ unsigned long int __hurd_threadvar_stack_offset
   = (unsigned long int) &threadvars;
 unsigned long int __hurd_threadvar_stack_mask;
 
+#define FMH defined(__i386__)
+#if ! FMH
+# define fmh()         ((void)0)
+# define unfmh()       ((void)0)
+#else
 /* XXX loser kludge for vm_map kernel bug */
+#undef ELF_MACHINE_USER_ADDRESS_MASK
+#define ELF_MACHINE_USER_ADDRESS_MASK  0
 static vm_address_t fmha;
 static vm_size_t fmhs;
 static void unfmh(void){
@@ -93,7 +100,7 @@ static void fmh(void) {
     assert_perror(err);}
   }
 /* XXX loser kludge for vm_map kernel bug */
-
+#endif
 
 
 Elf32_Addr
@@ -446,7 +453,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
 
   mapaddr = (vm_address_t) addr;
   err = __vm_map (__mach_task_self (),
-                 &mapaddr, (vm_size_t) len, 0 /*ELF_MACHINE_USER_ADDRESS_MASK*/,
+                 &mapaddr, (vm_size_t) len, ELF_MACHINE_USER_ADDRESS_MASK,
                  !(flags & MAP_FIXED),
                  memobj_rd,
                  (vm_offset_t) offset,
@@ -460,7 +467,8 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
       err = __vm_deallocate (__mach_task_self (), mapaddr, len);
       if (! err)
        err = __vm_map (__mach_task_self (),
-                       &mapaddr, (vm_size_t) len, 0 /*ELF_MACHINE_USER_ADDRESS_MASK*/,
+                       &mapaddr, (vm_size_t) len,
+                       ELF_MACHINE_USER_ADDRESS_MASK,
                        !(flags & MAP_FIXED),
                        memobj_rd, (vm_offset_t) offset,
                        flags & (MAP_COPY|MAP_PRIVATE),
index 3777bcad17799f53963ec232e3dad76704af6bfb..e3016ee1d818a811bd802f2e8a8e0759658c510a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1994,95,96,97,2000,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
@@ -55,8 +55,13 @@ getpriority (enum __priority_which which, id_t who)
                             (vm_address_t) oldpi, oldpisize * sizeof pi[0]);
          pip = (struct procinfo *) pi;
        }
+#ifdef TASK_SCHED_TIMESHARE_INFO
+      if (!onerr && pip->timeshare_base_info.base_priority > maxpri)
+       maxpri = pip->timeshare_base_info.base_priority;
+#else
       if (!onerr && pip->taskinfo.base_priority > maxpri)
        maxpri = pip->taskinfo.base_priority;
+#endif
       return 0;
     }
 
index bf03c35643fd6bdfa5fca6347f489391c1873e7b..34858e5a4b0e8bc74ac7331509236bfc15e5ff0b 100644 (file)
@@ -253,6 +253,10 @@ _dl_prof_resolve:  \n\
 ");
 #endif
 
+/* Mask identifying addresses reserved for the user program,
+   where the dynamic linker should not map anything.  */
+#define ELF_MACHINE_USER_ADDRESS_MASK  0xf0000000UL
+
 /* The actual _start code is in dl-start.S.  Use a really
    ugly bit of assembler to let dl-start.o see _dl_start.  */
 #define RTLD_START asm (".globl _dl_start");