diff options
author | Neal H. Walfield <neal@gnu.org> | 2008-08-12 13:03:06 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-04-07 23:29:53 +0200 |
commit | f823b025120ff71a8e1e6d3e0686b08fd726d12d (patch) | |
tree | 677a830e03473aeee8711d17835cec401d49ae50 /sysdeps/generic/bits | |
parent | 7b6f91d24d9dcf1f87ab66866bcad5e35afc9b98 (diff) | |
parent | 1b52c5eb6e185eeef966f67a96a2c44146abfbd7 (diff) |
2008-08-12 Neal H. Walfield <neal@gnu.org>
Merge in Samuel Thibault's changes from the main line.
* Makefile.am (libpthread_a_SOURCES): Add pt-getattr.c.
* headers.m4: Link libpthread/include/pthread/pthreadtypes.h to
sysroot/include/pthread/pthreadtypes.h and
libpthread/sysdeps/${arch}/bits/spin-lock-inline.h. to
sysroot/include/bits/spin-lock-inline.h.
* include/pthread/pthread.h: Include <sys/cdefs.h>.
(__extern_inline): If not defined, define appropriately.
2008-08-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
* include/pthread/pthreadtypes.h (__pthread_inheritsched): Remove
comma at end of enumeration.
2008-08-03 Samuel Thibault <samuel.thibault@ens-lyon.org>
* Makefile (sysdeps_headers): Add spin-lock-inline.h.
(SYSDEP_PATH): Move sysdeps/ia32 right after
sysdeps/$(MICROKERNEL)/ia32.
* include/pthread/pthread.h: Include <bits/spin-lock-inline.h>.
* sysdeps/ia32/bits/spin-lock.h: Move inlines to...
* sysdeps/ia32/bits/spin-lock-inline.h: ... new file.
2008-08-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
* sysdeps/generic/bits/mutex.h: Do not include <errno.h> and
<stddef.h>
* sysdeps/ia32/bits/memory.h (__memory_barrier): Add memory clobber.
* sysdeps/ia32/bits/spin-lock.h (__pthread_spin_trylock,
__pthread_spin_unlock): Add memory clobbers.
* sysdeps/l4/hurd/ia32/pt-setup.c (stack_setup): Fix reservation of
stack room for initial frame.
2008-07-18 Samuel Thibault <samuel.thibault@ens-lyon.org>
* Makefile (sysdeps_headers): add pthread/pthreadtypes.h
2008-06-27 Samuel Thibault <samuel.thibault@ens-lyon.org>
* include/pthread/pthread.h: Do not define __need_clockid_t, include
<time.h>, and define clockid_t if __clockid_defined is not defined.
Include <pthread/pthreadtypes.h>
(pthread_equal): New extern inline.
(pthread_cleanup_push, pthread_cleanup_pop): New macros.
(__pthread_process_shared, __pthread_inheritsched,
__pthread_contentionscope, __pthread_detachstate,
__pthread_mutex_protocol, __pthread_mutex_type,
pthread_attr_t, pthread_mutex_attr_t, pthread_mutex_t,
pthread_condattr_t, pthread_cond_t, pthread_spinlock_t,
pthread_rwlockattr_t, pthread_rwlock_t, pthread_barrierattr_t,
pthread_barrier_t, pthread_key_t, pthread_once_t): Move enums and
typedefs to...
* include/pthread/pthreadtypes.h: ... new file.
* sysdeps/generic/bits/cancelation.h (pthread_cleanup_push): Rename
macro to __pthread_cleanup_push.
(pthread_cleanup_pop): Rename macro to __pthread_cleanup_pop.
* sysdeps/generic/bits/barrier-attr.h (__pthread_process_shared):
Forward-declare enum.
* sysdeps/generic/bits/condition-attr.h (__pthread_process_shared):
Likewise.
* sysdeps/generic/bits/mutex-attr.h (__pthread_mutex_protocol,
__pthread_process_shared, __pthread_mutex_type):
Likewise.
* sysdeps/generic/bits/rwlock-attr.h (__pthread_process_shared):
Likewise.
* sysdeps/generic/bits/thread-attr.h (__pthread_detachstate,
__pthread_inheritsched, __pthread_contentionscope):
Likewise.
* sysdeps/generic/bits/pthread.h (pthread_t): Rename type to
__pthread_t.
(pthread_equal): Rename to __pthread_equal.
2008-06-27 Samuel Thibault <samuel.thibault@ens-lyon.org>
* sysdeps/generic/bits/thread-barrier.h: Remove unused file.
2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
* include/pthread/pthread.h (pthread_getattr_np): New declaration.
* pthread/pt-getattr.c: New file.
* Makefile (SRCS): Add pt-getattr.c.
2008-03-16 Samuel Thibault <samuel.thibault@ens-lyon.org>
* include/libc-symbols.h (HAVE_ASM_PREVIOUS_DIRECTIVE): Define.
2008-02-29 Samuel Thibault <samuel.thibault@ens-lyon.org>
* sysdeps/l4/hurd/ia32/pt-setup.c (stack_setup): Align stack on 0x10
for MMX operations.
2008-01-01 Samuel Thibault <samuel.thibault@ens-lyon.org>
* include/pthread/pthread.h (pthread_spin_destroy, pthread_spin_init,
pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock): Use
__extern_inline macro instead of extern __inline.
* sysdeps/ia32/bits/spin-lock.h (__PT_SPIN_INLINE,
__pthread_spin_lock): Likewise
* sysdeps/generic/bits/pthread.h (pthread_equal): Declare ; only
provide inline when __USE_EXTERN_INLINES is defined. Use __extern_inline
macro instead of extern __inline.
* sysdeps/ia32/bits/memory.h (__memory_barrier): Add static to inline.
Diffstat (limited to 'sysdeps/generic/bits')
-rw-r--r-- | sysdeps/generic/bits/barrier-attr.h | 4 | ||||
-rw-r--r-- | sysdeps/generic/bits/cancelation.h | 6 | ||||
-rw-r--r-- | sysdeps/generic/bits/condition-attr.h | 4 | ||||
-rw-r--r-- | sysdeps/generic/bits/mutex-attr.h | 4 | ||||
-rw-r--r-- | sysdeps/generic/bits/mutex.h | 12 | ||||
-rw-r--r-- | sysdeps/generic/bits/pthread.h | 13 | ||||
-rw-r--r-- | sysdeps/generic/bits/rwlock-attr.h | 4 | ||||
-rw-r--r-- | sysdeps/generic/bits/rwlock.h | 2 | ||||
-rw-r--r-- | sysdeps/generic/bits/thread-attr.h | 6 | ||||
-rw-r--r-- | sysdeps/generic/bits/thread-barrier.h | 30 |
10 files changed, 35 insertions, 50 deletions
diff --git a/sysdeps/generic/bits/barrier-attr.h b/sysdeps/generic/bits/barrier-attr.h index 86f3cb02..a9900b71 100644 --- a/sysdeps/generic/bits/barrier-attr.h +++ b/sysdeps/generic/bits/barrier-attr.h @@ -1,5 +1,5 @@ /* Thread barrier attribute type. Generic version. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2008 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 @@ -20,6 +20,8 @@ #ifndef _BITS_BARRIER_ATTR_H #define _BITS_BARRIER_ATTR_H 1 +enum __pthread_process_shared; + /* This structure describes the attributes of a POSIX thread barrier. Note that not all of them are supported on all systems. */ struct __pthread_barrierattr diff --git a/sysdeps/generic/bits/cancelation.h b/sysdeps/generic/bits/cancelation.h index bb6b58a1..f446d595 100644 --- a/sysdeps/generic/bits/cancelation.h +++ b/sysdeps/generic/bits/cancelation.h @@ -1,5 +1,5 @@ /* Cancelation. Generic version. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2008 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 @@ -32,7 +32,7 @@ struct __pthread_cancelation_handler /* Returns the thread local location of the cleanup handler stack. */ struct __pthread_cancelation_handler **__pthread_get_cleanup_stack (void); -#define pthread_cleanup_push(rt, rtarg) \ +#define __pthread_cleanup_push(rt, rtarg) \ { \ struct __pthread_cancelation_handler **__handlers \ = __pthread_get_cleanup_stack (); \ @@ -44,7 +44,7 @@ struct __pthread_cancelation_handler **__pthread_get_cleanup_stack (void); }; \ *__handlers = &__handler; -#define pthread_cleanup_pop(execute) \ +#define __pthread_cleanup_pop(execute) \ if (execute) \ __handler.handler (__handler.arg); \ assert (*__handlers == &__handler); \ diff --git a/sysdeps/generic/bits/condition-attr.h b/sysdeps/generic/bits/condition-attr.h index 2d48dfb6..a1311286 100644 --- a/sysdeps/generic/bits/condition-attr.h +++ b/sysdeps/generic/bits/condition-attr.h @@ -1,5 +1,5 @@ /* Condition attribute type. Generic version. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2008 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,6 +22,8 @@ #include <time.h> +enum __pthread_process_shared; + /* User visible part of a condition attribute variable. */ struct __pthread_condattr { diff --git a/sysdeps/generic/bits/mutex-attr.h b/sysdeps/generic/bits/mutex-attr.h index 420d5d1c..9161cdab 100644 --- a/sysdeps/generic/bits/mutex-attr.h +++ b/sysdeps/generic/bits/mutex-attr.h @@ -20,6 +20,10 @@ #ifndef _BITS_MUTEX_ATTR_H #define _BITS_MUTEX_ATTR_H 1 +enum __pthread_mutex_protocol; +enum __pthread_process_shared; +enum __pthread_mutex_type; + /* This structure describes the attributes of a POSIX mutex attribute. */ struct __pthread_mutexattr diff --git a/sysdeps/generic/bits/mutex.h b/sysdeps/generic/bits/mutex.h index e0ae3db1..f5f3fa94 100644 --- a/sysdeps/generic/bits/mutex.h +++ b/sysdeps/generic/bits/mutex.h @@ -1,5 +1,8 @@ /* Mutex type. Generic version. - Copyright (C) 2000, 2002, 2005, 2008 Free Software Foundation, Inc. + + Copyright (C) 2000, 2002, 2005, 2006, 2007, 2008 + 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 @@ -61,11 +64,4 @@ struct __pthread_mutex # endif #endif /* Not __pthread_mutex_defined. */ -#ifdef _BITS_MUTEX_H - -#include <errno.h> -#include <stddef.h> - -#endif - #endif /* bits/mutex.h */ diff --git a/sysdeps/generic/bits/pthread.h b/sysdeps/generic/bits/pthread.h index 3f9df13d..80e6b096 100644 --- a/sysdeps/generic/bits/pthread.h +++ b/sysdeps/generic/bits/pthread.h @@ -1,5 +1,5 @@ /* Pthread data structures. Generic version. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2008 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 @@ -20,14 +20,19 @@ #ifndef _BITS_PTHREAD_H #define _BITS_PTHREAD_H 1 -typedef int pthread_t; +typedef int __pthread_t; /* Return true if __T1 and __T2 both name the same thread. Otherwise, false. */ -extern __inline int -pthread_equal (pthread_t __t1, pthread_t __t2) +extern int +__pthread_equal (__pthread_t __t1, __pthread_t __t2); + +#ifdef __USE_EXTERN_INLINES +__extern_inline int +__pthread_equal (__pthread_t __t1, __pthread_t __t2) { return __t1 == __t2; } +#endif #endif /* bits/pthread.h */ diff --git a/sysdeps/generic/bits/rwlock-attr.h b/sysdeps/generic/bits/rwlock-attr.h index 44765bd6..dba99f1d 100644 --- a/sysdeps/generic/bits/rwlock-attr.h +++ b/sysdeps/generic/bits/rwlock-attr.h @@ -1,5 +1,5 @@ /* Thread rwlock attribute type. Generic version. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2008 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 @@ -20,6 +20,8 @@ #ifndef _BITS_RWLOCK_ATTR_H #define _BITS_RWLOCK_ATTR_H 1 +enum __pthread_process_shared; + /* This structure describes the attributes of a POSIX thread rwlock. Note that not all of them are supported on all systems. */ struct __pthread_rwlockattr diff --git a/sysdeps/generic/bits/rwlock.h b/sysdeps/generic/bits/rwlock.h index 696f9c25..3d600ec3 100644 --- a/sysdeps/generic/bits/rwlock.h +++ b/sysdeps/generic/bits/rwlock.h @@ -1,5 +1,5 @@ /* rwlock type. Generic version. - Copyright (C) 2002, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2005, 2006, 2007 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 diff --git a/sysdeps/generic/bits/thread-attr.h b/sysdeps/generic/bits/thread-attr.h index 31630221..c3a93fde 100644 --- a/sysdeps/generic/bits/thread-attr.h +++ b/sysdeps/generic/bits/thread-attr.h @@ -1,5 +1,5 @@ /* Thread attribute type. Generic version. - Copyright (C) 2000,02 Free Software Foundation, Inc. + Copyright (C) 2000, 2002, 2008 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,6 +22,10 @@ #include <sched.h> +enum __pthread_detachstate; +enum __pthread_inheritsched; +enum __pthread_contentionscope; + /* This structure describes the attributes of a POSIX thread. Note that not all of them are supported on all systems. */ struct __pthread_attr diff --git a/sysdeps/generic/bits/thread-barrier.h b/sysdeps/generic/bits/thread-barrier.h deleted file mode 100644 index 23d51ae5..00000000 --- a/sysdeps/generic/bits/thread-barrier.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Thread barrier attribute type. Generic version. - Copyright (C) 2002 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_THREAD_BARRIER_H -#define _BITS_THREAD_BARRIER_H 1 - -/* This structure describes the attributes of a POSIX thread barrier. - Note that not all of them are supported on all systems. */ -struct __pthread_attr -{ - enum __ -}; - -#endif /* bits/thread-barrier.h */ |