diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2007-03-04 00:05:21 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2007-03-04 00:05:21 +0000 |
commit | 2e10e74697a257cd032d586c0ec7413874758c82 (patch) | |
tree | 7676825293a430eb5638209b66eed5d3c9c6e4be | |
parent | 3b7f26ed578b0550accc53658bff7f7e6b8bd35d (diff) |
2006-03-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
* libpthread/include/pthread/pthread.h: Add the restrict keyword where
appropriate for full compliance.
* libpthread/pthread/pt-internal.h: Likewise.
* libpthread/sysdeps/generic/bits/mutex.h: Likewise.
* libpthread/sysdeps/generic/bits/rwlock.h: Likewise.
* libpthread/TODO: Drop that TODO item.
-rw-r--r-- | pthread/pt-internal.h | 20 | ||||
-rw-r--r-- | sysdeps/generic/bits/mutex.h | 4 | ||||
-rw-r--r-- | sysdeps/generic/bits/rwlock.h | 4 |
3 files changed, 15 insertions, 13 deletions
diff --git a/pthread/pt-internal.h b/pthread/pt-internal.h index e9086956..efd4ffb9 100644 --- a/pthread/pt-internal.h +++ b/pthread/pt-internal.h @@ -165,10 +165,10 @@ extern void __pthread_initialize (void); /* Internal version of pthread_create. Rather than return the new tid, we return the whole __pthread structure in *PTHREAD. */ -extern int __pthread_create_internal (struct __pthread **pthread, - const pthread_attr_t *attr, +extern int __pthread_create_internal (struct __pthread **__restrict pthread, + const pthread_attr_t *__restrict attr, void *(*start_routine)(void *), - void *arg); + void *__restrict arg); /* Allocate a new thread structure and a pthread thread ID (but not a kernel thread or a stack). */ @@ -189,10 +189,11 @@ extern void __pthread_stack_dealloc (void *stackaddr, size_t stacksize); /* Setup thread THREAD's context. */ -extern int __pthread_setup (struct __pthread *thread, +extern int __pthread_setup (struct __pthread *__restrict thread, void (*entry_point)(void *(*)(void *), void *), - void *(*start_routine)(void *), void *arg); + void *(*start_routine)(void *), + void *__restrict arg); /* Allocate a kernel thread (and any miscellaneous system dependent @@ -221,8 +222,8 @@ extern void __pthread_thread_halt (struct __pthread *thread, extern void __pthread_block (struct __pthread *thread); /* Block THREAD until *ABSTIME is reached. */ -extern error_t __pthread_timedblock (struct __pthread *thread, - const struct timespec *abstime); +extern error_t __pthread_timedblock (struct __pthread *__restrict thread, + const struct timespec *__restrict abstime); /* Wakeup THREAD. */ extern void __pthread_wakeup (struct __pthread *thread); @@ -250,8 +251,9 @@ extern error_t __pthread_sigstate_init (struct __pthread *thread); extern void __pthread_sigstate_destroy (struct __pthread *thread); /* Modify thread *THREAD's signal state. */ -extern error_t __pthread_sigstate (struct __pthread *thread, int how, - const sigset_t *set, sigset_t *oset, +extern error_t __pthread_sigstate (struct __pthread *__restrict thread, int how, + const sigset_t *__restrict set, + sigset_t *__restrict oset, int clear_pending); diff --git a/sysdeps/generic/bits/mutex.h b/sysdeps/generic/bits/mutex.h index 2e32d783..feb6d075 100644 --- a/sysdeps/generic/bits/mutex.h +++ b/sysdeps/generic/bits/mutex.h @@ -69,8 +69,8 @@ struct __pthread_mutex # endif _EXTERN_INLINE int -pthread_mutex_init (struct __pthread_mutex *__mutex, - const pthread_mutexattr_t *attr) +pthread_mutex_init (struct __pthread_mutex *__restrict __mutex, + const pthread_mutexattr_t *__restrict attr) { struct __pthread_mutex initialized_mutex = __PTHREAD_MUTEX_INITIALIZER; diff --git a/sysdeps/generic/bits/rwlock.h b/sysdeps/generic/bits/rwlock.h index 5793f65d..fc429b45 100644 --- a/sysdeps/generic/bits/rwlock.h +++ b/sysdeps/generic/bits/rwlock.h @@ -44,8 +44,8 @@ struct __pthread_rwlock _EXTERN_INLINE int -pthread_rwlock_init (struct __pthread_rwlock *__rwlock, - const struct __pthread_rwlockattr *__attr) +pthread_rwlock_init (struct __pthread_rwlock *__restrict __rwlock, + const struct __pthread_rwlockattr *__restrict __attr) { struct __pthread_rwlock initialized_rwlock = __PTHREAD_RWLOCK_INITIALIZER; extern int _pthread_rwlock_init (struct __pthread_rwlock *, |