diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-09-09 06:57:51 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-09-09 06:57:51 +0000 |
commit | f2dd9e63652a559e3a0a5f9fa41d402bbdeb0215 (patch) | |
tree | 82a69e66f42a65516c9e48853458619c41d3b72e /lib/libpthread/thread/thr_private.h | |
parent | 03f1b3ffefcb275dbd07b776e3ca01bf2467597b (diff) | |
download | FreeBSD-src-f2dd9e63652a559e3a0a5f9fa41d402bbdeb0215.zip FreeBSD-src-f2dd9e63652a559e3a0a5f9fa41d402bbdeb0215.tar.gz |
Add code to support pthread spin lock.
Reviewed by: deischen
Diffstat (limited to 'lib/libpthread/thread/thr_private.h')
-rw-r--r-- | lib/libpthread/thread/thr_private.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_private.h b/lib/libpthread/thread/thr_private.h index 2127619..12ebe90 100644 --- a/lib/libpthread/thread/thr_private.h +++ b/lib/libpthread/thread/thr_private.h @@ -402,6 +402,11 @@ struct pthread_barrierattr { int pshared; }; +struct pthread_spinlock { + volatile int s_lock; + pthread_t s_owner; +}; + /* * Flags for condition variables. */ @@ -1093,6 +1098,7 @@ int _pthread_rwlock_init(pthread_rwlock_t *, const pthread_rwlockattr_t *); int _pthread_rwlock_destroy (pthread_rwlock_t *); struct pthread *_pthread_self(void); int _pthread_setspecific(pthread_key_t, const void *); +void _pthread_yield(void); struct pthread *_thr_alloc(struct pthread *); void _thr_exit(char *, int, char *); void _thr_exit_cleanup(void); |