From f2dd9e63652a559e3a0a5f9fa41d402bbdeb0215 Mon Sep 17 00:00:00 2001 From: davidxu Date: Tue, 9 Sep 2003 06:57:51 +0000 Subject: Add code to support pthread spin lock. Reviewed by: deischen --- include/pthread.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/pthread.h') diff --git a/include/pthread.h b/include/pthread.h index 417e78f..e86b318 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -98,6 +98,7 @@ struct pthread_rwlock; struct pthread_rwlockattr; struct pthread_barrier; struct pthread_barrier_attr; +struct pthread_spinlock; /* * Primitive system data type definitions required by P1003.1c. @@ -118,6 +119,7 @@ typedef struct pthread_rwlock *pthread_rwlock_t; typedef struct pthread_rwlockattr *pthread_rwlockattr_t; typedef struct pthread_barrier *pthread_barrier_t; typedef struct pthread_barrierattr *pthread_barrierattr_t; +typedef struct pthread_spinlock *pthread_spinlock_t; /* * Additional type definitions: @@ -275,6 +277,11 @@ pthread_t pthread_self(void); int pthread_setspecific(pthread_key_t, const void *); int pthread_sigmask(int, const sigset_t *, sigset_t *); +int pthread_spin_init(pthread_spinlock_t *, int); +int pthread_spin_destroy(pthread_spinlock_t *); +int pthread_spin_lock(pthread_spinlock_t *); +int pthread_spin_trylock(pthread_spinlock_t *); +int pthread_spin_unlock(pthread_spinlock_t *); int pthread_cancel(pthread_t); int pthread_setcancelstate(int, int *); int pthread_setcanceltype(int, int *); -- cgit v1.1