mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
* sysdeps/mach/configure.in: Add some checks for Mach headers
to ensure a sane installation. (mach_interface_list): Define this variable by checking for .defs files found in various variants. * configure.in (mach_interface_list): AC_SUBST this. * config.make.in (mach-interface-list): New substituted variable. * mach/Makefile (user-interfaces): Define this using the value of $(mach-interface-list) instead of mach, mach4. Updated other references to mach_interface to use it as well. * sysdeps/mach/powerpc/machine-lock.h: Avoid multi-line strings. * mach/msgserver.c [NDR_CHAR_ASCII] (mig_reply_header_t): #define as mig_reply_error_t for OSF Mach variant. * mach/Makefile (routines): Remove bootprivport. * mach/bootprivport.c: File removed. It has never been used. * mach/msg-destroy.c (__mach_msg_destroy) [MACH_MSG_PORT_DESCRIPTOR]: Grok the OSF flavor of message format. (mach_msg_destroy_port): For MAKE_SEND and MAKE_SEND_ONCE rights, create an destroy a right to ensure proper no-senders notification. 2002-02-06 Roland McGrath <roland@frob.com> * hurd/Versions (libc: GLIBC_2.0): Move cthread_fork, cthread_detach to here if 2.0 compatibility enabled ... (libc: GLIBC_2.1.3): ... from here.
This commit is contained in:
32
ChangeLog
32
ChangeLog
@ -1,3 +1,35 @@
|
|||||||
|
2002-02-16 Roland McGrath <roland@frob.com>
|
||||||
|
|
||||||
|
* sysdeps/mach/configure.in: Add some checks for Mach headers
|
||||||
|
to ensure a sane installation.
|
||||||
|
(mach_interface_list): Define this variable by checking for .defs
|
||||||
|
files found in various variants.
|
||||||
|
* configure.in (mach_interface_list): AC_SUBST this.
|
||||||
|
* config.make.in (mach-interface-list): New substituted variable.
|
||||||
|
* mach/Makefile (user-interfaces): Define this using the value
|
||||||
|
of $(mach-interface-list) instead of mach, mach4.
|
||||||
|
Updated other references to mach_interface to use it as well.
|
||||||
|
|
||||||
|
* sysdeps/mach/powerpc/machine-lock.h: Avoid multi-line strings.
|
||||||
|
|
||||||
|
* mach/msgserver.c [NDR_CHAR_ASCII] (mig_reply_header_t): #define as
|
||||||
|
mig_reply_error_t for OSF Mach variant.
|
||||||
|
|
||||||
|
* mach/Makefile (routines): Remove bootprivport.
|
||||||
|
* mach/bootprivport.c: File removed. It has never been used.
|
||||||
|
|
||||||
|
* mach/msg-destroy.c (__mach_msg_destroy) [MACH_MSG_PORT_DESCRIPTOR]:
|
||||||
|
Grok the OSF flavor of message format.
|
||||||
|
(mach_msg_destroy_port): For MAKE_SEND and
|
||||||
|
MAKE_SEND_ONCE rights, create an destroy a right to ensure proper
|
||||||
|
no-senders notification.
|
||||||
|
|
||||||
|
2002-02-06 Roland McGrath <roland@frob.com>
|
||||||
|
|
||||||
|
* hurd/Versions (libc: GLIBC_2.0): Move cthread_fork, cthread_detach
|
||||||
|
to here if 2.0 compatibility enabled ...
|
||||||
|
(libc: GLIBC_2.1.3): ... from here.
|
||||||
|
|
||||||
2002-02-15 Ulrich Drepper <drepper@redhat.com>
|
2002-02-15 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* elf/dl-open.c (dl_open_worker): Catch wrap-around of TLS
|
* elf/dl-open.c (dl_open_worker): Catch wrap-around of TLS
|
||||||
|
@ -57,6 +57,8 @@ no-whole-archive = @no_whole_archive@
|
|||||||
exceptions = @exceptions@
|
exceptions = @exceptions@
|
||||||
have_doors = @linux_doors@
|
have_doors = @linux_doors@
|
||||||
|
|
||||||
|
mach-interface-list = @mach_interface_list@
|
||||||
|
|
||||||
have-bash2 = @libc_cv_have_bash2@
|
have-bash2 = @libc_cv_have_bash2@
|
||||||
have-ksh = @libc_cv_have_ksh@
|
have-ksh = @libc_cv_have_ksh@
|
||||||
|
|
||||||
|
@ -1658,6 +1658,9 @@ case "$add_ons" in
|
|||||||
esac
|
esac
|
||||||
AC_SUBST(linux_doors)
|
AC_SUBST(linux_doors)
|
||||||
|
|
||||||
|
dnl See sysdeps/mach/configure.in for this variable.
|
||||||
|
AC_SUBST(mach_interface_list)
|
||||||
|
|
||||||
if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
|
if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
|
||||||
config_makefile=
|
config_makefile=
|
||||||
else
|
else
|
||||||
|
@ -22,6 +22,9 @@ libc {
|
|||||||
# cthreads functions with stubs in libc
|
# cthreads functions with stubs in libc
|
||||||
cthread_keycreate; cthread_getspecific; cthread_setspecific;
|
cthread_keycreate; cthread_getspecific; cthread_setspecific;
|
||||||
__libc_getspecific;
|
__libc_getspecific;
|
||||||
|
|
||||||
|
# weak refs to libthreads functions that libc calls iff libthreads in use
|
||||||
|
cthread_fork; cthread_detach;
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# necessary for the Hurd brk implementation
|
# necessary for the Hurd brk implementation
|
||||||
@ -124,11 +127,6 @@ libc {
|
|||||||
seteuids;
|
seteuids;
|
||||||
}
|
}
|
||||||
GLIBC_2.1.3 {
|
GLIBC_2.1.3 {
|
||||||
%if SHLIB_COMPAT (libc, GLIBC_2_1_3, HURD_CTHREADS_0_3)
|
|
||||||
# c*
|
|
||||||
cthread_fork; cthread_detach;
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# d*
|
# d*
|
||||||
directory_name_split;
|
directory_name_split;
|
||||||
|
|
||||||
|
@ -26,6 +26,15 @@
|
|||||||
/*
|
/*
|
||||||
* HISTORY
|
* HISTORY
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.6 2002/02/17 07:13:36 roland
|
||||||
|
* 2002-02-16 Roland McGrath <roland@frob.com>
|
||||||
|
*
|
||||||
|
* * mach/msg-destroy.c (__mach_msg_destroy) [MACH_MSG_PORT_DESCRIPTOR]:
|
||||||
|
* Grok the OSF flavor of message format.
|
||||||
|
* (mach_msg_destroy_port): For MAKE_SEND and
|
||||||
|
* MAKE_SEND_ONCE rights, create an destroy a right to ensure proper
|
||||||
|
* no-senders notification.
|
||||||
|
*
|
||||||
* Revision 1.5 1997/06/21 01:40:07 drepper
|
* Revision 1.5 1997/06/21 01:40:07 drepper
|
||||||
* More 64bit changes.
|
* More 64bit changes.
|
||||||
*
|
*
|
||||||
@ -91,6 +100,69 @@ __mach_msg_destroy(msg)
|
|||||||
mach_msg_destroy_port(msg->msgh_remote_port, MACH_MSGH_BITS_REMOTE(mbits));
|
mach_msg_destroy_port(msg->msgh_remote_port, MACH_MSGH_BITS_REMOTE(mbits));
|
||||||
|
|
||||||
if (mbits & MACH_MSGH_BITS_COMPLEX) {
|
if (mbits & MACH_MSGH_BITS_COMPLEX) {
|
||||||
|
#ifdef MACH_MSG_PORT_DESCRIPTOR
|
||||||
|
mach_msg_body_t *body;
|
||||||
|
mach_msg_descriptor_t *saddr, *eaddr;
|
||||||
|
|
||||||
|
body = (mach_msg_body_t *) (msg + 1);
|
||||||
|
saddr = (mach_msg_descriptor_t *)
|
||||||
|
((mach_msg_base_t *) msg + 1);
|
||||||
|
eaddr = saddr + body->msgh_descriptor_count;
|
||||||
|
|
||||||
|
for ( ; saddr < eaddr; saddr++) {
|
||||||
|
switch (saddr->type.type) {
|
||||||
|
|
||||||
|
case MACH_MSG_PORT_DESCRIPTOR: {
|
||||||
|
mach_msg_port_descriptor_t *dsc;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Destroy port rights carried in the message
|
||||||
|
*/
|
||||||
|
dsc = &saddr->port;
|
||||||
|
mach_msg_destroy_port(dsc->name, dsc->disposition);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case MACH_MSG_OOL_DESCRIPTOR : {
|
||||||
|
mach_msg_ool_descriptor_t *dsc;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Destroy memory carried in the message
|
||||||
|
*/
|
||||||
|
dsc = &saddr->out_of_line;
|
||||||
|
if (dsc->deallocate) {
|
||||||
|
mach_msg_destroy_memory((vm_offset_t)dsc->address,
|
||||||
|
dsc->size);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case MACH_MSG_OOL_PORTS_DESCRIPTOR : {
|
||||||
|
mach_port_t *ports;
|
||||||
|
mach_msg_ool_ports_descriptor_t *dsc;
|
||||||
|
mach_msg_type_number_t j;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Destroy port rights carried in the message
|
||||||
|
*/
|
||||||
|
dsc = &saddr->ool_ports;
|
||||||
|
ports = (mach_port_t *) dsc->address;
|
||||||
|
for (j = 0; j < dsc->count; j++, ports++) {
|
||||||
|
mach_msg_destroy_port(*ports, dsc->disposition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Destroy memory carried in the message
|
||||||
|
*/
|
||||||
|
if (dsc->deallocate) {
|
||||||
|
mach_msg_destroy_memory((vm_offset_t)dsc->address,
|
||||||
|
dsc->count * sizeof(mach_port_t));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
vm_offset_t saddr;
|
vm_offset_t saddr;
|
||||||
vm_offset_t eaddr;
|
vm_offset_t eaddr;
|
||||||
|
|
||||||
@ -142,6 +214,7 @@ __mach_msg_destroy(msg)
|
|||||||
saddr += sizeof(vm_offset_t);
|
saddr += sizeof(vm_offset_t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,15 +226,32 @@ mach_msg_destroy_port(port, type)
|
|||||||
mach_msg_type_name_t type;
|
mach_msg_type_name_t type;
|
||||||
{
|
{
|
||||||
if (MACH_PORT_VALID(port)) switch (type) {
|
if (MACH_PORT_VALID(port)) switch (type) {
|
||||||
case MACH_MSG_TYPE_PORT_SEND:
|
case MACH_MSG_TYPE_MOVE_SEND:
|
||||||
case MACH_MSG_TYPE_PORT_SEND_ONCE:
|
case MACH_MSG_TYPE_MOVE_SEND_ONCE:
|
||||||
(void) __mach_port_deallocate(__mach_task_self(), port);
|
/* destroy the send/send-once right */
|
||||||
|
(void) __mach_port_deallocate(mach_task_self(), port);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MACH_MSG_TYPE_PORT_RECEIVE:
|
case MACH_MSG_TYPE_MOVE_RECEIVE:
|
||||||
(void) __mach_port_mod_refs(__mach_task_self(), port,
|
/* destroy the receive right */
|
||||||
|
(void) __mach_port_mod_refs(mach_task_self(), port,
|
||||||
MACH_PORT_RIGHT_RECEIVE, -1);
|
MACH_PORT_RIGHT_RECEIVE, -1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MACH_MSG_TYPE_MAKE_SEND:
|
||||||
|
/* create a send right and then destroy it */
|
||||||
|
(void) __mach_port_insert_right(mach_task_self(), port,
|
||||||
|
port, MACH_MSG_TYPE_MAKE_SEND);
|
||||||
|
(void) __mach_port_deallocate(mach_task_self(), port);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MACH_MSG_TYPE_MAKE_SEND_ONCE:
|
||||||
|
/* create a send-once right and then destroy it */
|
||||||
|
(void) __mach_port_extract_right(mach_task_self(), port,
|
||||||
|
MACH_MSG_TYPE_MAKE_SEND_ONCE,
|
||||||
|
&port, &type);
|
||||||
|
(void) __mach_port_deallocate(mach_task_self(), port);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,6 +49,12 @@
|
|||||||
/*
|
/*
|
||||||
* HISTORY
|
* HISTORY
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.8 2002/02/17 07:13:32 roland
|
||||||
|
* 2002-02-16 Roland McGrath <roland@frob.com>
|
||||||
|
*
|
||||||
|
* * mach/msgserver.c [NDR_CHAR_ASCII] (mig_reply_header_t): #define as
|
||||||
|
* mig_reply_error_t for OSF Mach variant.
|
||||||
|
*
|
||||||
* Revision 1.7 2001/07/06 04:55:34 aj
|
* Revision 1.7 2001/07/06 04:55:34 aj
|
||||||
* Update to LGPL v2.1.
|
* Update to LGPL v2.1.
|
||||||
*
|
*
|
||||||
@ -93,6 +99,10 @@
|
|||||||
#include <stdlib.h> /* For malloc and free. */
|
#include <stdlib.h> /* For malloc and free. */
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
#ifdef NDR_CHAR_ASCII /* OSF Mach flavors have different names. */
|
||||||
|
# define mig_reply_header_t mig_reply_error_t
|
||||||
|
#endif
|
||||||
|
|
||||||
mach_msg_return_t
|
mach_msg_return_t
|
||||||
__mach_msg_server_timeout (boolean_t (*demux) (mach_msg_header_t *request,
|
__mach_msg_server_timeout (boolean_t (*demux) (mach_msg_header_t *request,
|
||||||
mach_msg_header_t *reply),
|
mach_msg_header_t *reply),
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
sinclude(./aclocal.m4)dnl Autoconf lossage.
|
sinclude(./aclocal.m4)dnl Autoconf lossage.
|
||||||
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
|
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
|
||||||
|
|
||||||
|
### Sanity checks for Mach header installation
|
||||||
|
AC_CHECK_HEADER(mach/mach_types.h,, [AC_MSG_ERROR([cannot find Mach headers])])
|
||||||
|
AC_CHECK_HEADER(mach/mach_types.defs,, [dnl
|
||||||
|
AC_MSG_ERROR([cannot find Mach .defs files])])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl mach_TYPE_CHECK(foo_t, bar_t)
|
dnl mach_TYPE_CHECK(foo_t, bar_t)
|
||||||
dnl
|
dnl
|
||||||
@ -21,6 +26,9 @@ dnl
|
|||||||
mach_TYPE_CHECK(task_t, task_port_t)
|
mach_TYPE_CHECK(task_t, task_port_t)
|
||||||
mach_TYPE_CHECK(thread_t, thread_port_t)
|
mach_TYPE_CHECK(thread_t, thread_port_t)
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl The creation_time field is a GNU Mach addition the other variants lack.
|
||||||
|
dnl
|
||||||
AC_CACHE_CHECK(for creation_time in task_basic_info,
|
AC_CACHE_CHECK(for creation_time in task_basic_info,
|
||||||
libc_cv_mach_task_creation_time, [dnl
|
libc_cv_mach_task_creation_time, [dnl
|
||||||
AC_TRY_COMPILE([#include <mach/task_info.h>], [
|
AC_TRY_COMPILE([#include <mach/task_info.h>], [
|
||||||
@ -30,3 +38,24 @@ long s = i->creation_time.seconds;
|
|||||||
if test $libc_cv_mach_task_creation_time = no; then
|
if test $libc_cv_mach_task_creation_time = no; then
|
||||||
DEFINES="$DEFINES -DNO_CREATION_TIME=1"
|
DEFINES="$DEFINES -DNO_CREATION_TIME=1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl The Darwin variant no longer has <mach/mach.defs>
|
||||||
|
dnl but instead has several constituent .defs files.
|
||||||
|
dnl In this scenario we will presume there is a <mach/mach_interface.h>
|
||||||
|
dnl that contains an #include for each constituent header file,
|
||||||
|
dnl but we don't do a check for that here because in a bare
|
||||||
|
dnl environment the compile against those headers will fail.
|
||||||
|
dnl
|
||||||
|
mach_interface_list=
|
||||||
|
for ifc in mach mach4 \
|
||||||
|
clock_priv host_priv host_security ledger lock_set \
|
||||||
|
processor processor_set task thread_act vm_map \
|
||||||
|
memory_object memory_object_default default_pager \
|
||||||
|
; do
|
||||||
|
AC_CHECK_HEADER(mach/${ifc}.defs, [dnl
|
||||||
|
mach_interface_list="$mach_interface_list $ifc"])
|
||||||
|
done
|
||||||
|
if test "x$mach_interface_list" = x; then
|
||||||
|
AC_MSG_ERROR([what manner of Mach is this?])
|
||||||
|
fi
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Machine-specific definition for spin locks. PowerPC version.
|
/* Machine-specific definition for spin locks. PowerPC version.
|
||||||
Copyright (C) 1994, 1997 Free Software Foundation, Inc.
|
Copyright (C) 1994,97,2002 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -40,9 +40,9 @@ __spin_unlock (__spin_lock_t *__lock)
|
|||||||
{
|
{
|
||||||
long int __locked;
|
long int __locked;
|
||||||
__asm__ __volatile__ ("\
|
__asm__ __volatile__ ("\
|
||||||
0: lwarx %0,0,%1
|
0: lwarx %0,0,%1\n\
|
||||||
stwcx. %2,0,%1
|
stwcx. %2,0,%1\n\
|
||||||
bne- 0b
|
bne- 0b\n\
|
||||||
" : "=&r" (__locked) : "r" (__lock), "r" (0) : "cr0");
|
" : "=&r" (__locked) : "r" (__lock), "r" (0) : "cr0");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,9 +53,9 @@ __spin_try_lock (register __spin_lock_t *__lock)
|
|||||||
{
|
{
|
||||||
long int __rtn;
|
long int __rtn;
|
||||||
__asm__ __volatile__ ("\
|
__asm__ __volatile__ ("\
|
||||||
0: lwarx %0,0,%1
|
0: lwarx %0,0,%1\n\
|
||||||
stwcx. %2,0,%1
|
stwcx. %2,0,%1\n\
|
||||||
bne- 0b
|
bne- 0b\n\
|
||||||
" : "=&r" (__rtn) : "r" (__lock), "r" (1) : "cr0");
|
" : "=&r" (__rtn) : "r" (__lock), "r" (1) : "cr0");
|
||||||
return !__rtn;
|
return !__rtn;
|
||||||
}
|
}
|
||||||
@ -67,9 +67,9 @@ __spin_lock_locked (__spin_lock_t *__lock)
|
|||||||
{
|
{
|
||||||
long int __rtn;
|
long int __rtn;
|
||||||
__asm__ __volatile__ ("\
|
__asm__ __volatile__ ("\
|
||||||
0: lwarx %0,0,%1
|
0: lwarx %0,0,%1\n\
|
||||||
stwcx. %0,0,%1
|
stwcx. %0,0,%1\n\
|
||||||
bne- 0b
|
bne- 0b\n\
|
||||||
" : "=&r" (__rtn) : "r" (__lock) : "cr0");
|
" : "=&r" (__rtn) : "r" (__lock) : "cr0");
|
||||||
return __rtn;
|
return __rtn;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user