2002-12-17  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/socket.S: Use SINGLE_THREAD_P
	macro instead of comparing %gs:MULTIPLE_THREADS_OFFSET directly.

	* iconvdata/iso-ir-165.c: Likewise.
	* iconvdata/jis0208.c: Likewise.
	* iconvdata/jis0212.c: Likewise.
This commit is contained in:
Ulrich Drepper 2002-12-17 02:03:18 +00:00
parent 64ab2317a8
commit bd499a3b46
11 changed files with 2043 additions and 2006 deletions

View File

@ -1,3 +1,8 @@
2002-12-17 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/i386/socket.S: Use SINGLE_THREAD_P
macro instead of comparing %gs:MULTIPLE_THREADS_OFFSET directly.
2002-12-16 Ulrich Drepper <drepper@redhat.com>
* sysdeps/posix/getaddrinfo.c (gaih_inet): If __nss_lookup_function
@ -6,6 +11,9 @@
2002-12-16 Art Haas <ahaas@airmail.net>
* io/ftw.c: Convert GCC extension initializer syntax to C99.
* iconvdata/iso-ir-165.c: Likewise.
* iconvdata/jis0208.c: Likewise.
* iconvdata/jis0212.c: Likewise.
2002-12-16 Ulrich Drepper <drepper@redhat.com>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,18 @@
2002-12-17 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
Define meaningfully for assembler as well.
* pthreadP.h (struct pthread_functions): Remove
ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
and ptr_pthread_attr_init_2_1 fields.
* init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
* forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
(FORWARD3): Define using FORWARD4.
(pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
versions.
* pt-system.c: Remove duplicate stdlib.h include.
2002-12-16 Ulrich Drepper <drepper@redhat.com>
* sem_init.c: Define sem_init@GLIBC_2.0.

View File

@ -30,7 +30,7 @@ struct pthread_functions __libc_pthread_functions attribute_hidden;
#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2)
# define FORWARD3(name, rettype, decl, params, defaction, version) \
# define FORWARD4(name, export, rettype, decl, params, defaction, version) \
rettype \
__noexport_##name decl \
{ \
@ -39,7 +39,10 @@ __noexport_##name decl \
\
return __libc_pthread_functions.ptr_##name params; \
} \
compat_symbol (libc, __noexport_##name, name, version)
compat_symbol (libc, __noexport_##name, export, version)
# define FORWARD3(name, rettype, decl, params, defaction, version) \
FORWARD4 (name, name, rettype, decl, params, defaction, version)
# define FORWARD2(name, decl, params, defretval, version) \
FORWARD3 (name, int, decl, params, return defretval, version)
@ -50,7 +53,13 @@ compat_symbol (libc, __noexport_##name, name, version)
FORWARD (pthread_attr_destroy, (pthread_attr_t *attr), (attr), 0);
FORWARD2 (pthread_attr_init, (pthread_attr_t *attr), (attr), 0, GLIBC_2_1);
#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_1)
FORWARD4 (pthread_attr_init_2_0, pthread_attr_init, int,
(pthread_attr_t *attr), (attr), 0, GLIBC_2_0);
#endif
FORWARD4 (pthread_attr_init_2_1, pthread_attr_init, int,
(pthread_attr_t *attr), (attr), 0, GLIBC_2_1);
FORWARD (pthread_attr_getdetachstate,
(const pthread_attr_t *attr, int *detachstate), (attr, detachstate),

View File

@ -56,7 +56,8 @@ extern void __libc_setup_tls (size_t tcbsize, size_t tcbalign);
static struct pthread_functions pthread_functions =
{
.ptr_pthread_attr_destroy = __pthread_attr_destroy,
.ptr_pthread_attr_init = __pthread_attr_init_2_1,
.ptr_pthread_attr_init_2_0 = __pthread_attr_init_2_0,
.ptr_pthread_attr_init_2_1 = __pthread_attr_init_2_1,
.ptr_pthread_attr_getdetachstate = __pthread_attr_getdetachstate,
.ptr_pthread_attr_setdetachstate = __pthread_attr_setdetachstate,
.ptr_pthread_attr_getinheritsched = __pthread_attr_getinheritsched,

View File

@ -20,7 +20,6 @@
#include <errno.h>
#include <stdlib.h>
#include <sysdep.h>
#include <stdlib.h>
#include "pthreadP.h"

View File

@ -72,7 +72,8 @@ extern int __pthread_debug attribute_hidden;
struct pthread_functions
{
int (*ptr_pthread_attr_destroy) (pthread_attr_t *);
int (*ptr_pthread_attr_init) (pthread_attr_t *);
int (*ptr_pthread_attr_init_2_0) (pthread_attr_t *);
int (*ptr_pthread_attr_init_2_1) (pthread_attr_t *);
int (*ptr_pthread_attr_getdetachstate) (const pthread_attr_t *, int *);
int (*ptr_pthread_attr_setdetachstate) (pthread_attr_t *, int);
int (*ptr_pthread_attr_getinheritsched) (const pthread_attr_t *, int *);

View File

@ -76,11 +76,15 @@
# define POPCARGS_4 POPCARGS_2
# define POPCARGS_5 POPCARGS_2
# define SINGLE_THREAD_P \
# ifndef ASSEMBLER
# define SINGLE_THREAD_P \
__builtin_expect (THREAD_GETMEM (THREAD_SELF, \
header.data.multiple_threads) == 0, 1)
# else
# define SINGLE_THREAD_P cmpl $0, %gs:MULTIPLE_THREADS_OFFSET
# endif
#else
#elif !defined ASSEMBLER
/* This code should never be used but we define it anyhow. */
# define SINGLE_THREAD_P (1)

View File

@ -43,7 +43,7 @@
.globl __socket
ENTRY (__socket)
#if defined NEED_CANCELLATION && defined CENABLE
cmpl $0, %gs:MULTIPLE_THREADS_OFFSET
SINGLE_THREAD_P
jne 1f
#endif