summary refs log tree commit diff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-21 06:49:52 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-21 06:49:52 +0000
commit98cbe360d947b59e7a5eda068581f4cfeb4b99b3 (patch)
treecea10cb9c398de637781b09112ca635518cf3944 /linuxthreads
parent4aebaa6bd906383aca1b7a5e1251b0d1652f9f7c (diff)
downloadglibc-98cbe360d947b59e7a5eda068581f4cfeb4b99b3.tar.gz
glibc-98cbe360d947b59e7a5eda068581f4cfeb4b99b3.tar.xz
glibc-98cbe360d947b59e7a5eda068581f4cfeb4b99b3.zip
Update.
	* misc/sys/cdefs.h: Define __restrict_arr.
	* include/sys/time.h: Add restrict where required by AGd4.
	* inet/arpa/inet.h: Likewise.
	* io/sys/stat.h: Likewise.
	* io/sys/statvfs.h: Likewise.
	* misc/search.h: Likewise.
	* misc/sys/select.h: Likewise.
	* posix/glob.h: Likewise.
	* posix/regex.h: Likewise.
	* posix/spawn.h: Likewise.
	* posix/unistd.h: Likewise.
	* rt/aio.h: Likewise.
	* signal/signal.h: Likewise.
	* socket/sys/socket.h: Likewise.
	* stdlib/ucontext.h: Likewise.
	* streams/stropts.h: Likewise.
	* string/string.h: Likewise.
	* time/time.h: Likewise.
	* time/sys/time.h: Likewise.

	* posix/spawn.h: Add declarations for posix_spawnattr_getscheparam
	and posix_spawnattr_setscheparam.

	* libio/stdio.h: Make cuserid prototype again available for all
	XPG versions.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog6
-rw-r--r--linuxthreads/semaphore.h6
-rw-r--r--linuxthreads/sysdeps/pthread/pthread.h128
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h9
4 files changed, 87 insertions, 62 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 187d3a571b..498cebb415 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,9 @@
+2000-08-20  Ulrich Drepper  <drepper@redhat.com>
+
+	* semaphore.h: Add restrict where required by AGd4.
+	* sysdeps/pthread/pthread.h: Likewise.
+	* sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
+
 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
 
 	* Makefile (tests): Add ex12.  Add rule to build it.
diff --git a/linuxthreads/semaphore.h b/linuxthreads/semaphore.h
index 583b65ea18..f611f48323 100644
--- a/linuxthreads/semaphore.h
+++ b/linuxthreads/semaphore.h
@@ -72,7 +72,8 @@ extern int sem_wait (sem_t *__sem) __THROW;
 
 #ifdef __USE_XOPEN2K
 /* Similar to `sem_wait' but wait only until ABSTIME.  */
-extern int sem_timedwait (sem_t *__sem, __const struct timespec *__abstime)
+extern int sem_timedwait (sem_t *__restrict __sem,
+			  __const struct timespec *__restrict __abstime)
      __THROW;
 #endif
 
@@ -83,7 +84,8 @@ extern int sem_trywait (sem_t *__sem) __THROW;
 extern int sem_post (sem_t *__sem) __THROW;
 
 /* Get current value of SEM and store it in *SVAL.  */
-extern int sem_getvalue (sem_t *__sem, int *__sval) __THROW;
+extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)
+     __THROW;
 
 __END_DECLS
 
diff --git a/linuxthreads/sysdeps/pthread/pthread.h b/linuxthreads/sysdeps/pthread/pthread.h
index b017007f80..28c8354b37 100644
--- a/linuxthreads/sysdeps/pthread/pthread.h
+++ b/linuxthreads/sysdeps/pthread/pthread.h
@@ -155,10 +155,10 @@ enum
 /* Create a thread with given attributes ATTR (or default attributes
    if ATTR is NULL), and call function START_ROUTINE with given
    arguments ARG.  */
-extern int pthread_create (pthread_t *__thread,
-			   __const pthread_attr_t *__attr,
+extern int pthread_create (pthread_t *__restrict __thread,
+			   __const pthread_attr_t *__restrict __attr,
 			   void *(*__start_routine) (void *),
-			   void *__arg) __THROW;
+			   void *__restrict __arg) __THROW;
 
 /* Obtain the identifier of the current thread.  */
 extern pthread_t pthread_self (void) __THROW;
@@ -201,37 +201,41 @@ extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
 					int *__detachstate) __THROW;
 
 /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM.  */
-extern int pthread_attr_setschedparam (pthread_attr_t *__attr,
-				       __const struct sched_param *__param)
-     __THROW;
+extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
+				       __const struct sched_param *__restrict
+				       __param) __THROW;
 
 /* Return in *PARAM the scheduling parameters of *ATTR.  */
-extern int pthread_attr_getschedparam (__const pthread_attr_t *__attr,
-				       struct sched_param *__param) __THROW;
+extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
+				       __attr,
+				       struct sched_param *__restrict __param)
+     __THROW;
 
 /* Set scheduling policy in *ATTR according to POLICY.  */
 extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
      __THROW;
 
 /* Return in *POLICY the scheduling policy of *ATTR.  */
-extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__attr,
-					int *__policy) __THROW;
+extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
+					__attr, int *__restrict __policy)
+     __THROW;
 
 /* Set scheduling inheritance mode in *ATTR according to INHERIT.  */
 extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
 					 int __inherit) __THROW;
 
 /* Return in *INHERIT the scheduling inheritance mode of *ATTR.  */
-extern int pthread_attr_getinheritsched (__const pthread_attr_t *__attr,
-					 int *__inherit) __THROW;
+extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
+					 __attr, int *__restrict __inherit)
+     __THROW;
 
 /* Set scheduling contention scope in *ATTR according to SCOPE.  */
 extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
      __THROW;
 
 /* Return in *SCOPE the scheduling contention scope of *ATTR.  */
-extern int pthread_attr_getscope (__const pthread_attr_t *__attr,
-				  int *__scope) __THROW;
+extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
+				  int *__restrict __scope) __THROW;
 
 #ifdef __USE_UNIX98
 /* Set the size of the guard area at the bottom of the thread.  */
@@ -239,8 +243,9 @@ extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
 				      size_t __guardsize) __THROW;
 
 /* Get the size of the guard area at the bottom of the thread.  */
-extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
-				      size_t *__guardsize) __THROW;
+extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict
+				      __attr, size_t *__restrict __guardsize)
+     __THROW;
 #endif
 
 /* Set the starting address of the stack of the thread to be created.
@@ -251,8 +256,9 @@ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
 				      void *__stackaddr) __THROW;
 
 /* Return the previously set address for the stack.  */
-extern int pthread_attr_getstackaddr (__const pthread_attr_t *__attr,
-				      void **__stackaddr) __THROW;
+extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
+				      __attr, void **__restrict __stackaddr)
+     __THROW;
 
 /* Add information about the minimum stack size needed for the thread
    to be started.  This size must never be less than PTHREAD_STACK_SIZE
@@ -261,8 +267,9 @@ extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
 				      size_t __stacksize) __THROW;
 
 /* Return the currently used minimal stack size.  */
-extern int pthread_attr_getstacksize (__const pthread_attr_t *__attr,
-				      size_t *__stacksize) __THROW;
+extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
+				      __attr, size_t *__restrict __stacksize)
+     __THROW;
 
 /* Functions for scheduling control.  */
 
@@ -273,8 +280,10 @@ extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
      __THROW;
 
 /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD.  */
-extern int pthread_getschedparam (pthread_t __target_thread, int *__policy,
-				  struct sched_param *__param) __THROW;
+extern int pthread_getschedparam (pthread_t __target_thread,
+				  int *__restrict __policy,
+				  struct sched_param *__restrict __param)
+     __THROW;
 
 #ifdef __USE_UNIX98
 /* Determine level of concurrency.  */
@@ -296,9 +305,9 @@ extern int pthread_yield (void) __THROW;
 
 /* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the
    default values if later is NULL.  */
-extern int pthread_mutex_init (pthread_mutex_t *__mutex,
-			       __const pthread_mutexattr_t *__mutex_attr)
-     __THROW;
+extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex,
+			       __const pthread_mutexattr_t *__restrict
+			       __mutex_attr) __THROW;
 
 /* Destroy MUTEX.  */
 extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __THROW;
@@ -311,9 +320,9 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __THROW;
 
 #ifdef __USE_XOPEN2K
 /* Wait until lock becomes available, or specified time passes. */
-extern int pthread_mutex_timedlock (pthread_mutex_t *__mutex,
-				    __const struct timespec *__abstime)
-     __THROW;
+extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
+				    __const struct timespec *__restrict
+				    __abstime) __THROW;
 #endif
 
 /* Unlock MUTEX.  */
@@ -330,8 +339,9 @@ extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __THROW;
 extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW;
 
 /* Get the process-shared flag of the mutex attribute ATTR.  */
-extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *__attr,
-					 int *__pshared) __THROW;
+extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
+					 __restrict __attr,
+					 int *__restrict __pshared) __THROW;
 
 /* Set the process-shared flag of the mutex attribute ATTR.  */
 extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
@@ -345,8 +355,8 @@ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
      __THROW;
 
 /* Return in *KIND the mutex kind attribute in *ATTR.  */
-extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__attr,
-				      int *__kind) __THROW;
+extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
+				      __attr, int *__restrict __kind) __THROW;
 #endif
 
 
@@ -354,8 +364,9 @@ extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__attr,
 
 /* Initialize condition variable COND using attributes ATTR, or use
    the default values if later is NULL.  */
-extern int pthread_cond_init (pthread_cond_t *__cond,
-			      __const pthread_condattr_t *__cond_attr) __THROW;
+extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
+			      __const pthread_condattr_t *__restrict
+			      __cond_attr) __THROW;
 
 /* Destroy condition variable COND.  */
 extern int pthread_cond_destroy (pthread_cond_t *__cond) __THROW;
@@ -368,16 +379,17 @@ extern int pthread_cond_broadcast (pthread_cond_t *__cond) __THROW;
 
 /* Wait for condition variable COND to be signaled or broadcast.
    MUTEX is assumed to be locked before.  */
-extern int pthread_cond_wait (pthread_cond_t *__cond,
-			      pthread_mutex_t *__mutex) __THROW;
+extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
+			      pthread_mutex_t *__restrict __mutex) __THROW;
 
 /* Wait for condition variable COND to be signaled or broadcast until
    ABSTIME.  MUTEX is assumed to be locked before.  ABSTIME is an
    absolute time specification; zero is the beginning of the epoch
    (00:00:00 GMT, January 1, 1970).  */
-extern int pthread_cond_timedwait (pthread_cond_t *__cond,
-				   pthread_mutex_t *__mutex,
-				   __const struct timespec *__abstime) __THROW;
+extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
+				   pthread_mutex_t *__restrict __mutex,
+				   __const struct timespec *__restrict
+				   __abstime) __THROW;
 
 /* Functions for handling condition variable attributes.  */
 
@@ -388,8 +400,9 @@ extern int pthread_condattr_init (pthread_condattr_t *__attr) __THROW;
 extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW;
 
 /* Get the process-shared flag of the condition variable attribute ATTR.  */
-extern int pthread_condattr_getpshared (__const pthread_condattr_t *__attr,
-					int *__pshared) __THROW;
+extern int pthread_condattr_getpshared (__const pthread_condattr_t *
+					__restrict __attr,
+					int *__restrict __pshared) __THROW;
 
 /* Set the process-shared flag of the condition variable attribute ATTR.  */
 extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
@@ -401,8 +414,9 @@ extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
 
 /* Initialize read-write lock RWLOCK using attributes ATTR, or use
    the default values if later is NULL.  */
-extern int pthread_rwlock_init (pthread_rwlock_t *__rwlock,
-				__const pthread_rwlockattr_t *__attr) __THROW;
+extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
+				__const pthread_rwlockattr_t *__restrict
+				__attr) __THROW;
 
 /* Destroy read-write lock RWLOCK.  */
 extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) __THROW;
@@ -415,9 +429,9 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROW;
 
 #ifdef __USE_XOPEN2K
 /* Try to acquire read lock for RWLOCK or return after specfied time.  */
-extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__rwlock,
-				       __const struct timespec *__abstime)
-     __THROW;
+extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
+				       __const struct timespec *__restrict
+				       __abstime) __THROW;
 #endif
 
 /* Acquire write lock for RWLOCK.  */
@@ -428,9 +442,9 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROW;
 
 #ifdef __USE_XOPEN2K
 /* Try to acquire write lock for RWLOCK or return after specfied time.  */
-extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__rwlock,
-				       __const struct timespec *__abstime)
-     __THROW;
+extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
+				       __const struct timespec *__restrict
+				       __abstime) __THROW;
 #endif
 
 /* Unlock RWLOCK.  */
@@ -446,8 +460,9 @@ extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __THROW;
 extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW;
 
 /* Return current setting of process-shared attribute of ATTR in PSHARED.  */
-extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *__attr,
-					  int *__pshared) __THROW;
+extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
+					  __restrict __attr,
+					  int *__restrict __pshared) __THROW;
 
 /* Set process-shared attribute of ATTR to PSHARED.  */
 extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
@@ -486,9 +501,9 @@ extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __THROW;
 
 /* Barriers are a also a new feature in 1003.1j-2000. */
 
-extern int pthread_barrier_init (pthread_barrier_t *__barrier,
-				 __const pthread_barrierattr_t *__attr,
-				 unsigned int __count) __THROW;
+extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
+				 __const pthread_barrierattr_t *__restrict
+				 __attr, unsigned int __count) __THROW;
 
 extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW;
 
@@ -496,8 +511,9 @@ extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) __THROW;
 
 extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW;
 
-extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *__attr,
-					   int *__pshared) __THROW;
+extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
+					   __restrict __attr,
+					   int *__restrict __pshared) __THROW;
 
 extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
 					   int __pshared) __THROW;
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h b/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h
index 40238561df..b86e75f20e 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h
@@ -1,5 +1,5 @@
 /* Signal handling function for threaded programs.
-   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000 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
@@ -17,7 +17,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _BITS_SIGTHREAD_H 
+#ifndef _BITS_SIGTHREAD_H
 #define _BITS_SIGTHREAD_H	1
 
 #if !defined _SIGNAL_H && !defined _PTHREAD_H
@@ -28,8 +28,9 @@
 
 /* Modify the signal mask for the calling thread.  The arguments have
    the same meaning as for sigprocmask(2). */
-extern int pthread_sigmask (int __how, __const __sigset_t *__newmask,
-			    __sigset_t *__oldmask)__THROW;
+extern int pthread_sigmask (int __how,
+			    __const __sigset_t *__restrict __newmask,
+			    __sigset_t *__restrict __oldmask)__THROW;
 
 /* Send signal SIGNO to the given thread. */
 extern int pthread_kill (pthread_t __thread, int __signo) __THROW;