thr_pspinlock.c (5e53a4f90f82c4345f277dd87cc9292f26e04a29) | thr_pspinlock.c (c7904405a8d47f64c3b0e73158572e2dc8ef0217) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2003 David Xu <davidxu@freebsd.org> 5 * Copyright (c) 2016 The FreeBSD Foundation 6 * All rights reserved. 7 * 8 * Portions of this software were developed by Konstantin Belousov --- 27 unchanged lines hidden (view full) --- 36#include "namespace.h" 37#include <errno.h> 38#include <stdlib.h> 39#include <pthread.h> 40#include "un-namespace.h" 41 42#include "thr_private.h" 43 | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2003 David Xu <davidxu@freebsd.org> 5 * Copyright (c) 2016 The FreeBSD Foundation 6 * All rights reserved. 7 * 8 * Portions of this software were developed by Konstantin Belousov --- 27 unchanged lines hidden (view full) --- 36#include "namespace.h" 37#include <errno.h> 38#include <stdlib.h> 39#include <pthread.h> 40#include "un-namespace.h" 41 42#include "thr_private.h" 43 |
44_Static_assert(sizeof(struct pthread_spinlock) <= PAGE_SIZE, | 44_Static_assert(sizeof(struct pthread_spinlock) <= THR_PAGE_SIZE_MIN, |
45 "pthread_spinlock is too large for off-page"); 46 47#define SPIN_COUNT 100000 48 49__weak_reference(_pthread_spin_init, pthread_spin_init); 50__weak_reference(_pthread_spin_destroy, pthread_spin_destroy); 51__weak_reference(_pthread_spin_trylock, pthread_spin_trylock); 52__weak_reference(_pthread_spin_lock, pthread_spin_lock); --- 103 unchanged lines hidden --- | 45 "pthread_spinlock is too large for off-page"); 46 47#define SPIN_COUNT 100000 48 49__weak_reference(_pthread_spin_init, pthread_spin_init); 50__weak_reference(_pthread_spin_destroy, pthread_spin_destroy); 51__weak_reference(_pthread_spin_trylock, pthread_spin_trylock); 52__weak_reference(_pthread_spin_lock, pthread_spin_lock); --- 103 unchanged lines hidden --- |