diff options
Diffstat (limited to 'src/lib/libc')
-rw-r--r-- | src/lib/libc/include/thread_private.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libc/include/thread_private.h b/src/lib/libc/include/thread_private.h index 774e0cba1f..98dfaa6322 100644 --- a/src/lib/libc/include/thread_private.h +++ b/src/lib/libc/include/thread_private.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: thread_private.h,v 1.34 2019/01/10 18:45:33 otto Exp $ */ | 1 | /* $OpenBSD: thread_private.h,v 1.35 2019/02/13 13:22:14 mpi Exp $ */ |
2 | 2 | ||
3 | /* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */ | 3 | /* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */ |
4 | 4 | ||
@@ -298,6 +298,10 @@ struct pthread_cond { | |||
298 | struct pthread_mutex *mutex; | 298 | struct pthread_mutex *mutex; |
299 | }; | 299 | }; |
300 | 300 | ||
301 | struct pthread_rwlock { | ||
302 | volatile unsigned int value; | ||
303 | }; | ||
304 | |||
301 | #else | 305 | #else |
302 | 306 | ||
303 | struct pthread_mutex { | 307 | struct pthread_mutex { |
@@ -315,6 +319,13 @@ struct pthread_cond { | |||
315 | struct pthread_mutex *mutex; | 319 | struct pthread_mutex *mutex; |
316 | clockid_t clock; | 320 | clockid_t clock; |
317 | }; | 321 | }; |
322 | |||
323 | struct pthread_rwlock { | ||
324 | _atomic_lock_t lock; | ||
325 | pthread_t owner; | ||
326 | struct pthread_queue writers; | ||
327 | int readers; | ||
328 | }; | ||
318 | #endif /* FUTEX */ | 329 | #endif /* FUTEX */ |
319 | 330 | ||
320 | struct pthread_mutex_attr { | 331 | struct pthread_mutex_attr { |