diff options
author | kib <kib@FreeBSD.org> | 2016-04-08 10:21:43 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-04-08 10:21:43 +0000 |
commit | 21446f2890b124fd46c7f3b1244f0f24d80670b3 (patch) | |
tree | f9ffd2a1454f197b9f128f06e224492882967f53 /lib/libthr/thread/thr_mutex.c | |
parent | e099b3defecad889c8551888e1fb721a4dedab27 (diff) | |
download | FreeBSD-src-21446f2890b124fd46c7f3b1244f0f24d80670b3.zip FreeBSD-src-21446f2890b124fd46c7f3b1244f0f24d80670b3.tar.gz |
Assert that the lock objects put into the off-page, fit into the page.
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'lib/libthr/thread/thr_mutex.c')
-rw-r--r-- | lib/libthr/thread/thr_mutex.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c index 865e4cf..f732a63 100644 --- a/lib/libthr/thread/thr_mutex.c +++ b/lib/libthr/thread/thr_mutex.c @@ -51,6 +51,9 @@ #include "thr_private.h" +_Static_assert(sizeof(struct pthread_mutex) <= PAGE_SIZE, + "pthread_mutex is too large for off-page"); + /* * For adaptive mutexes, how many times to spin doing trylock2 * before entering the kernel to block |