summaryrefslogtreecommitdiffstats
path: root/include/pthread.h
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-09-09 06:57:51 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-09-09 06:57:51 +0000
commitf2dd9e63652a559e3a0a5f9fa41d402bbdeb0215 (patch)
tree82a69e66f42a65516c9e48853458619c41d3b72e /include/pthread.h
parent03f1b3ffefcb275dbd07b776e3ca01bf2467597b (diff)
downloadFreeBSD-src-f2dd9e63652a559e3a0a5f9fa41d402bbdeb0215.zip
FreeBSD-src-f2dd9e63652a559e3a0a5f9fa41d402bbdeb0215.tar.gz
Add code to support pthread spin lock.
Reviewed by: deischen
Diffstat (limited to 'include/pthread.h')
-rw-r--r--include/pthread.h7
1 files changed, 7 insertions, 0 deletions
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 *);
OpenPOWER on IntegriCloud