Assert that the lock objects put into the off-page, fit into the page.
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
222c454d33
commit
9e821f2796
@ -34,6 +34,9 @@
|
||||
|
||||
#include "thr_private.h"
|
||||
|
||||
_Static_assert(sizeof(struct pthread_barrier) <= PAGE_SIZE,
|
||||
"pthread_barrier is too large for off-page");
|
||||
|
||||
__weak_reference(_pthread_barrier_init, pthread_barrier_init);
|
||||
__weak_reference(_pthread_barrier_wait, pthread_barrier_wait);
|
||||
__weak_reference(_pthread_barrier_destroy, pthread_barrier_destroy);
|
||||
|
@ -40,6 +40,9 @@
|
||||
|
||||
#include "thr_private.h"
|
||||
|
||||
_Static_assert(sizeof(struct pthread_cond) <= PAGE_SIZE,
|
||||
"pthread_cond too large");
|
||||
|
||||
/*
|
||||
* Prototypes
|
||||
*/
|
||||
|
@ -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
|
||||
|
@ -38,6 +38,9 @@
|
||||
|
||||
#include "thr_private.h"
|
||||
|
||||
_Static_assert(sizeof(struct pthread_spinlock) <= PAGE_SIZE,
|
||||
"pthread_spinlock is too large for off-page");
|
||||
|
||||
#define SPIN_COUNT 100000
|
||||
|
||||
__weak_reference(_pthread_spin_init, pthread_spin_init);
|
||||
|
@ -35,6 +35,9 @@
|
||||
#include "un-namespace.h"
|
||||
#include "thr_private.h"
|
||||
|
||||
_Static_assert(sizeof(struct pthread_rwlock) <= PAGE_SIZE,
|
||||
"pthread_rwlock is too large for off-page");
|
||||
|
||||
__weak_reference(_pthread_rwlock_destroy, pthread_rwlock_destroy);
|
||||
__weak_reference(_pthread_rwlock_init, pthread_rwlock_init);
|
||||
__weak_reference(_pthread_rwlock_rdlock, pthread_rwlock_rdlock);
|
||||
|
Loading…
Reference in New Issue
Block a user