Update.
* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add libc_multiple_threads. * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of __libc_multiple_threads to... * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file. * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary versioning. * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once_internal): Define. * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h macros instead of .symver directly. * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise. * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
This commit is contained in:
parent
959c5bbfee
commit
7588880f50
@ -1,5 +1,24 @@
|
|||||||
2003-03-12 Ulrich Drepper <drepper@redhat.com>
|
2003-03-12 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
|
||||||
|
libc_multiple_threads.
|
||||||
|
* sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
|
||||||
|
__libc_multiple_threads to...
|
||||||
|
* sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
|
||||||
|
versioning.
|
||||||
|
* sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/x86_64/pthread_once.S
|
||||||
|
(__pthread_once_internal): Define.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
|
||||||
|
macros instead of .symver directly.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
|
||||||
|
|
||||||
* sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
|
* sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
|
||||||
* sysdeps/x86_64/tcb-offsets.sym: New file.
|
* sysdeps/x86_64/tcb-offsets.sym: New file.
|
||||||
* sysdeps/x86_64/Makefile: New file.
|
* sysdeps/x86_64/Makefile: New file.
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
# 02111-1307 USA. */
|
# 02111-1307 USA. */
|
||||||
|
|
||||||
ifeq ($(subdir),nptl)
|
ifeq ($(subdir),nptl)
|
||||||
sysdep_routines += register-atfork unregister-atfork libc_pthread_init
|
sysdep_routines += register-atfork unregister-atfork libc_pthread_init \
|
||||||
|
libc_multiple_threads
|
||||||
|
|
||||||
libpthread-sysdep_routines += pt-fork
|
libpthread-sysdep_routines += pt-fork
|
||||||
|
|
||||||
|
26
nptl/sysdeps/unix/sysv/linux/libc_multiple_threads.c
Normal file
26
nptl/sysdeps/unix/sysv/linux/libc_multiple_threads.c
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with the GNU C Library; if not, write to the Free
|
||||||
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
|
02111-1307 USA. */
|
||||||
|
|
||||||
|
#include <pthreadP.h>
|
||||||
|
|
||||||
|
#ifndef NOT_IN_libc
|
||||||
|
# ifndef TLS_MULTIPLE_THREADS_IN_TCB
|
||||||
|
int __libc_multiple_threads attribute_hidden;
|
||||||
|
# endif
|
||||||
|
#endif
|
@ -33,7 +33,7 @@ struct fork_handler __pthread_child_handler attribute_hidden;
|
|||||||
#ifdef TLS_MULTIPLE_THREADS_IN_TCB
|
#ifdef TLS_MULTIPLE_THREADS_IN_TCB
|
||||||
void
|
void
|
||||||
#else
|
#else
|
||||||
int __libc_multiple_threads attribute_hidden;
|
extern int __libc_multiple_threads attribute_hidden;
|
||||||
|
|
||||||
int *
|
int *
|
||||||
#endif
|
#endif
|
||||||
|
@ -118,6 +118,10 @@ __pthread_once:
|
|||||||
|
|
||||||
.size __pthread_once,.-__pthread_once
|
.size __pthread_once,.-__pthread_once
|
||||||
|
|
||||||
|
|
||||||
|
.globl __pthread_once_internal
|
||||||
|
__pthread_once_internal = __pthread_once
|
||||||
|
|
||||||
.globl pthread_once
|
.globl pthread_once
|
||||||
pthread_once = __pthread_once
|
pthread_once = __pthread_once
|
||||||
|
|
||||||
|
@ -33,10 +33,10 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
.globl __new_sem_post
|
.globl sem_post
|
||||||
.type __new_sem_post,@function
|
.type sem_post,@function
|
||||||
.align 16
|
.align 16
|
||||||
__new_sem_post:
|
sem_post:
|
||||||
movl $1, %edx
|
movl $1, %edx
|
||||||
LOCK
|
LOCK
|
||||||
xaddl %edx, (%rdi)
|
xaddl %edx, (%rdi)
|
||||||
@ -63,10 +63,4 @@ __new_sem_post:
|
|||||||
|
|
||||||
orl $-1, %eax
|
orl $-1, %eax
|
||||||
retq
|
retq
|
||||||
.size __new_sem_post,.-__new_sem_post
|
.size sem_post,.-sem_post
|
||||||
.symver __new_sem_post, sem_post@@GLIBC_2.1
|
|
||||||
#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
|
|
||||||
.global __old_sem_post
|
|
||||||
__old_sem_post = __new_sem_post
|
|
||||||
.symver __old_sem_post, sem_post@GLIBC_2.0
|
|
||||||
#endif
|
|
||||||
|
@ -33,10 +33,10 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
.globl __new_sem_trywait
|
.globl sem_trywait
|
||||||
.type __new_sem_trywait,@function
|
.type sem_trywait,@function
|
||||||
.align 16
|
.align 16
|
||||||
__new_sem_trywait:
|
sem_trywait:
|
||||||
movl (%rdi), %eax
|
movl (%rdi), %eax
|
||||||
2: testl %eax, %eax
|
2: testl %eax, %eax
|
||||||
jz 1f
|
jz 1f
|
||||||
@ -59,10 +59,5 @@ __new_sem_trywait:
|
|||||||
#endif
|
#endif
|
||||||
orl $-1, %eax
|
orl $-1, %eax
|
||||||
retq
|
retq
|
||||||
.size __new_sem_trywait,.-__new_sem_trywait
|
.size sem_trywait,.-sem_trywait
|
||||||
.symver __new_sem_trywait, sem_trywait@@GLIBC_2.1
|
versioned_symbol(libpthread, __new_sem_trywait, sem_trywait, GLIBC_2_1)
|
||||||
#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
|
|
||||||
.global __old_sem_trywait
|
|
||||||
__old_sem_trywait = __new_sem_trywait
|
|
||||||
.symver __old_sem_trywait, sem_trywait@GLIBC_2.0
|
|
||||||
#endif
|
|
||||||
|
@ -32,10 +32,10 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
.globl __new_sem_wait
|
.globl sem_wait
|
||||||
.type __new_sem_wait,@function
|
.type sem_wait,@function
|
||||||
.align 16
|
.align 16
|
||||||
__new_sem_wait:
|
sem_wait:
|
||||||
3: movl (%rdi), %eax
|
3: movl (%rdi), %eax
|
||||||
2: testl %eax, %eax
|
2: testl %eax, %eax
|
||||||
je 1f
|
je 1f
|
||||||
@ -69,10 +69,4 @@ __new_sem_wait:
|
|||||||
#endif
|
#endif
|
||||||
orl $-1, %eax
|
orl $-1, %eax
|
||||||
retq
|
retq
|
||||||
.size __new_sem_wait,.-__new_sem_wait
|
.size sem_wait,.-sem_wait
|
||||||
.symver __new_sem_wait, sem_wait@@GLIBC_2.1
|
|
||||||
#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
|
|
||||||
.global __old_sem_wait
|
|
||||||
__old_sem_wait = __new_sem_wait
|
|
||||||
.symver __old_sem_wait, sem_wait@GLIBC_2.0
|
|
||||||
#endif
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user