diff options
author | Roland McGrath <roland@gnu.org> | 2005-02-16 12:31:10 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2005-02-16 12:31:10 +0000 |
commit | 833861be818bb5d45ab0c47370b84068dfb2fedf (patch) | |
tree | 2f1754a415c378f6b067f9158cc42df24d4641d2 /nptl/sysdeps | |
parent | c397a0064061e28a00eea873669e59f3983db791 (diff) |
import later fedora-branch tweaks
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r-- | nptl/sysdeps/alpha/tls.h | 9 | ||||
-rw-r--r-- | nptl/sysdeps/generic/lowlevellock.h | 2 | ||||
-rw-r--r-- | nptl/sysdeps/i386/Makefile | 2 | ||||
-rw-r--r-- | nptl/sysdeps/i386/tls.h | 14 | ||||
-rw-r--r-- | nptl/sysdeps/ia64/tls.h | 9 | ||||
-rw-r--r-- | nptl/sysdeps/powerpc/tls.h | 9 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/pthread.h | 4 | ||||
-rw-r--r-- | nptl/sysdeps/s390/tls.h | 9 | ||||
-rw-r--r-- | nptl/sysdeps/sh/tls.h | 9 | ||||
-rw-r--r-- | nptl/sysdeps/sparc/tls.h | 9 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S | 11 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S | 11 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S | 11 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S | 11 | ||||
-rw-r--r-- | nptl/sysdeps/x86_64/tls.h | 9 |
15 files changed, 32 insertions, 97 deletions
diff --git a/nptl/sysdeps/alpha/tls.h b/nptl/sysdeps/alpha/tls.h index fa3c832a68..bc6630953f 100644 --- a/nptl/sysdeps/alpha/tls.h +++ b/nptl/sysdeps/alpha/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/Alpha version. - Copyright (C) 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2003 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 @@ -23,7 +23,6 @@ # include <dl-sysdep.h> #ifndef __ASSEMBLER__ -# include <stdbool.h> # include <stddef.h> # include <stdint.h> @@ -31,11 +30,7 @@ typedef union dtv { size_t counter; - struct - { - void *val; - bool is_static; - } pointer; + void *pointer; } dtv_t; #else /* __ASSEMBLER__ */ diff --git a/nptl/sysdeps/generic/lowlevellock.h b/nptl/sysdeps/generic/lowlevellock.h index 7f95daadad..9cffca83e6 100644 --- a/nptl/sysdeps/generic/lowlevellock.h +++ b/nptl/sysdeps/generic/lowlevellock.h @@ -76,7 +76,7 @@ __generic_mutex_unlock (int *mutex) /* Adding 0x80000000 to the counter results in 0 if and only if there are not other interested threads - we can return (this is the fastpath). */ - if (atomic_add_zero (mutex, 0x80000000)) + if (atomic_add_zero (0x80000000, mutex)) return; /* There are other threads waiting for this mutex, wake one of them diff --git a/nptl/sysdeps/i386/Makefile b/nptl/sysdeps/i386/Makefile index 2f0d88f303..693fb0569f 100644 --- a/nptl/sysdeps/i386/Makefile +++ b/nptl/sysdeps/i386/Makefile @@ -22,6 +22,4 @@ endif ifeq ($(subdir),nptl) CFLAGS-pthread_create.c += -mpreferred-stack-boundary=4 -CFLAGS-tst-align.c += -mpreferred-stack-boundary=4 -CFLAGS-tst-align2.c += -mpreferred-stack-boundary=4 endif diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h index e243f8b2cf..18b038f93e 100644 --- a/nptl/sysdeps/i386/tls.h +++ b/nptl/sysdeps/i386/tls.h @@ -22,7 +22,6 @@ #include <dl-sysdep.h> #ifndef __ASSEMBLER__ -# include <stdbool.h> # include <stddef.h> # include <stdint.h> # include <stdlib.h> @@ -33,11 +32,7 @@ typedef union dtv { size_t counter; - struct - { - void *val; - bool is_static; - } pointer; + void *pointer; } dtv_t; @@ -402,12 +397,9 @@ union user_desc_init #define CALL_THREAD_FCT(descr) \ ({ void *__res; \ int __ignore1, __ignore2; \ - asm volatile ("pushl %%eax\n\t" \ - "pushl %%eax\n\t" \ - "pushl %%eax\n\t" \ - "pushl %%gs:%P4\n\t" \ + asm volatile ("pushl %%gs:%P4\n\t" \ "call *%%gs:%P3\n\t" \ - "addl $16, %%esp" \ + "addl $4, %%esp" \ : "=a" (__res), "=c" (__ignore1), "=d" (__ignore2) \ : "i" (offsetof (struct pthread, start_routine)), \ "i" (offsetof (struct pthread, arg))); \ diff --git a/nptl/sysdeps/ia64/tls.h b/nptl/sysdeps/ia64/tls.h index a435f966ca..4591a415c0 100644 --- a/nptl/sysdeps/ia64/tls.h +++ b/nptl/sysdeps/ia64/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. nptl/IA-64 version. - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 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 @@ -22,7 +22,6 @@ #include <dl-sysdep.h> #ifndef __ASSEMBLER__ -# include <stdbool.h> # include <stddef.h> # include <stdint.h> # include <stdlib.h> @@ -33,11 +32,7 @@ typedef union dtv { size_t counter; - struct - { - void *val; - bool is_static; - } pointer; + void *pointer; } dtv_t; diff --git a/nptl/sysdeps/powerpc/tls.h b/nptl/sysdeps/powerpc/tls.h index a7f69074e9..ce7f5bd53d 100644 --- a/nptl/sysdeps/powerpc/tls.h +++ b/nptl/sysdeps/powerpc/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/PowerPC version. - Copyright (C) 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2003 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 @@ -23,7 +23,6 @@ # include <dl-sysdep.h> #ifndef __ASSEMBLER__ -# include <stdbool.h> # include <stddef.h> # include <stdint.h> @@ -31,11 +30,7 @@ typedef union dtv { size_t counter; - struct - { - void *val; - bool is_static; - } pointer; + void *pointer; } dtv_t; #else /* __ASSEMBLER__ */ diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h index 57024e1e84..5046a6976b 100644 --- a/nptl/sysdeps/pthread/pthread.h +++ b/nptl/sysdeps/pthread/pthread.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004 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 @@ -661,7 +661,7 @@ extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) /* Function used in the macros. */ struct __jmp_buf_tag; -extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROW; +extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROW; /* Mutex handling. */ diff --git a/nptl/sysdeps/s390/tls.h b/nptl/sysdeps/s390/tls.h index e93f3d080c..c9b991df32 100644 --- a/nptl/sysdeps/s390/tls.h +++ b/nptl/sysdeps/s390/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/s390 version. - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 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 @@ -22,7 +22,6 @@ #include <dl-sysdep.h> #ifndef __ASSEMBLER__ -# include <stdbool.h> # include <stddef.h> # include <stdint.h> # include <stdlib.h> @@ -33,11 +32,7 @@ typedef union dtv { size_t counter; - struct - { - void *val; - bool is_static; - } pointer; + void *pointer; } dtv_t; diff --git a/nptl/sysdeps/sh/tls.h b/nptl/sysdeps/sh/tls.h index e883bae993..db490ab7ee 100644 --- a/nptl/sysdeps/sh/tls.h +++ b/nptl/sysdeps/sh/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/SH version. - Copyright (C) 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2003 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 @@ -23,7 +23,6 @@ # include <dl-sysdep.h> #ifndef __ASSEMBLER__ -# include <stdbool.h> # include <stddef.h> # include <stdint.h> @@ -31,11 +30,7 @@ typedef union dtv { size_t counter; - struct - { - void *val; - bool is_static; - } pointer; + void *pointer; } dtv_t; typedef struct diff --git a/nptl/sysdeps/sparc/tls.h b/nptl/sysdeps/sparc/tls.h index 8f54a0bb23..8980f9fc0c 100644 --- a/nptl/sysdeps/sparc/tls.h +++ b/nptl/sysdeps/sparc/tls.h @@ -1,5 +1,5 @@ /* Definitions for thread-local data handling. NPTL/sparc version. - Copyright (C) 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2003 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 @@ -22,7 +22,6 @@ #include <dl-sysdep.h> #ifndef __ASSEMBLER__ -# include <stdbool.h> # include <stddef.h> # include <stdint.h> # include <stdlib.h> @@ -32,11 +31,7 @@ typedef union dtv { size_t counter; - struct - { - void *val; - bool is_static; - } pointer; + void *pointer; } dtv_t; typedef struct diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S index 71e96d2228..3d67329bd1 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +/* 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. @@ -65,14 +65,9 @@ __new_sem_post: #endif addl $_GLOBAL_OFFSET_TABLE_, %ebx #if USE___THREAD -# ifdef NO_TLS_DIRECT_SEG_REFS - movl errno@gotntpoff(%ebx), %edx - addl %gs:0, %edx + movl %gs:0, %edx + subl errno@gottpoff(%ebx), %edx movl $EINVAL, (%edx) -# else - movl errno@gotntpoff(%ebx), %edx - movl $EINVAL, %gs:(%edx) -# endif #else call __errno_location@plt movl $EINVAL, (%eax) diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S index 318b53a873..5b24476936 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -158,14 +158,9 @@ sem_timedwait: #endif addl $_GLOBAL_OFFSET_TABLE_, %ebx #if USE___THREAD -# ifdef NO_TLS_DIRECT_SEG_REFS - movl errno@gotntpoff(%ebx), %edx - addl %gs:0, %edx + movl %gs:0, %edx + subl errno@gottpoff(%ebx), %edx movl %esi, (%edx) -# else - movl errno@gotntpoff(%ebx), %edx - movl %esi, %gs:(%edx) -# endif #else call __errno_location@plt movl %esi, (%eax) diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S index d36a1088fb..a7c405d95f 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +/* 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. @@ -55,14 +55,9 @@ __new_sem_trywait: #endif addl $_GLOBAL_OFFSET_TABLE_, %ecx #if USE___THREAD -# ifdef NO_TLS_DIRECT_SEG_REFS - movl errno@gotntpoff(%ecx), %edx - addl %gs:0, %edx + movl %gs:0, %edx + subl errno@gottpoff(%ecx), %edx movl $EAGAIN, (%edx) -# else - movl errno@gotntpoff(%ecx), %edx - movl $EAGAIN, %gs:(%edx) -# endif #else call __errno_location@plt movl $EAGAIN, (%eax) diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S index 1605b69b69..b7674dc3ba 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +/* 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. @@ -102,14 +102,9 @@ __new_sem_wait: #endif addl $_GLOBAL_OFFSET_TABLE_, %ebx #if USE___THREAD -# ifdef NO_TLS_DIRECT_SEG_REFS - movl errno@gotntpoff(%ebx), %edx - addl %gs:0, %edx + movl %gs:0, %edx + subl errno@gottpoff(%ebx), %edx movl %esi, (%edx) -# else - movl errno@gotntpoff(%ebx), %edx - movl %esi, %gs:(%edx) -# endif #else call __errno_location@plt movl %esi, (%eax) diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h index 12da9dc81f..3d6111f4e3 100644 --- a/nptl/sysdeps/x86_64/tls.h +++ b/nptl/sysdeps/x86_64/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. nptl/x86_64 version. - Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 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 @@ -22,7 +22,6 @@ #include <asm/prctl.h> /* For ARCH_SET_FS. */ #ifndef __ASSEMBLER__ -# include <stdbool.h> # include <stddef.h> # include <stdint.h> # include <stdlib.h> @@ -32,11 +31,7 @@ typedef union dtv { size_t counter; - struct - { - void *val; - bool is_static; - } pointer; + void *pointer; } dtv_t; |