Changeset View
Changeset View
Standalone View
Standalone View
lib/libthr/thread/thr_mutex.c
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <pthread.h> | #include <pthread.h> | ||||
#include <pthread_np.h> | #include <pthread_np.h> | ||||
#include "un-namespace.h" | #include "un-namespace.h" | ||||
#include "thr_private.h" | #include "thr_private.h" | ||||
_Static_assert(sizeof(struct pthread_mutex) <= PAGE_SIZE, | _Static_assert(sizeof(struct pthread_mutex) <= THR_PAGE_SIZE_MIN, | ||||
"pthread_mutex is too large for off-page"); | "pthread_mutex is too large for off-page"); | ||||
/* | /* | ||||
* For adaptive mutexes, how many times to spin doing trylock2 | * For adaptive mutexes, how many times to spin doing trylock2 | ||||
* before entering the kernel to block | * before entering the kernel to block | ||||
*/ | */ | ||||
#define MUTEX_ADAPTIVE_SPINS 2000 | #define MUTEX_ADAPTIVE_SPINS 2000 | ||||
▲ Show 20 Lines • Show All 1,136 Lines • Show Last 20 Lines |