diff options
Diffstat (limited to 'freebsd/sys/kern/kern_mtxpool.c')
-rw-r--r-- | freebsd/sys/kern/kern_mtxpool.c | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/freebsd/sys/kern/kern_mtxpool.c b/freebsd/sys/kern/kern_mtxpool.c index df1b1132..e778ec31 100644 --- a/freebsd/sys/kern/kern_mtxpool.c +++ b/freebsd/sys/kern/kern_mtxpool.c @@ -41,7 +41,7 @@ * * Disadvantages: * - should generally only be used as leaf mutexes. - * - pool/pool dependancy ordering cannot be depended on. + * - pool/pool dependency ordering cannot be depended on. * - possible L1 cache mastersip contention between cpus. */ @@ -61,9 +61,6 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_MTXPOOL, "mtx_pool", "mutex pool"); /* Pool sizes must be a power of two */ -#ifndef MTX_POOL_LOCKBUILDER_SIZE -#define MTX_POOL_LOCKBUILDER_SIZE 128 -#endif #ifndef MTX_POOL_SLEEP_SIZE #define MTX_POOL_SLEEP_SIZE 128 #endif @@ -80,13 +77,6 @@ struct mtx_pool { struct mtx mtx_pool_ary[1]; }; -#ifndef __rtems__ -static struct mtx_pool_lockbuilder { - struct mtxpool_header mtx_pool_header; - struct mtx mtx_pool_ary[MTX_POOL_LOCKBUILDER_SIZE]; -} lockbuilder_pool; -#endif /* __rtems__ */ - #define mtx_pool_size mtx_pool_header.mtxpool_size #define mtx_pool_mask mtx_pool_header.mtxpool_mask #define mtx_pool_shift mtx_pool_header.mtxpool_shift @@ -94,7 +84,6 @@ static struct mtx_pool_lockbuilder { #ifndef __rtems__ struct mtx_pool *mtxpool_sleep; -struct mtx_pool *mtxpool_lockbuilder; #endif /* __rtems__ */ #if UINTPTR_MAX == UINT64_MAX /* 64 bits */ @@ -173,15 +162,6 @@ mtx_pool_destroy(struct mtx_pool **poolp) #ifndef __rtems__ static void -mtx_pool_setup_static(void *dummy __unused) -{ - mtx_pool_initialize((struct mtx_pool *)&lockbuilder_pool, - "lockbuilder mtxpool", MTX_POOL_LOCKBUILDER_SIZE, - MTX_DEF | MTX_NOWITNESS | MTX_QUIET); - mtxpool_lockbuilder = (struct mtx_pool *)&lockbuilder_pool; -} - -static void mtx_pool_setup_dynamic(void *dummy __unused) { mtxpool_sleep = mtx_pool_create("sleep mtxpool", @@ -211,18 +191,6 @@ mtx_pool_alloc(struct mtx_pool *pool) } #ifndef __rtems__ -/* - * The lockbuilder pool must be initialized early because the lockmgr - * and sx locks depend on it. The sx locks are used in the kernel - * memory allocator. The lockmgr subsystem is initialized by - * SYSINIT(..., SI_SUB_LOCKMGR, ...). - * - * We can't call malloc() to dynamically allocate the sleep pool - * until after kmeminit() has been called, which is done by - * SYSINIT(..., SI_SUB_KMEM, ...). - */ -SYSINIT(mtxpooli1, SI_SUB_MTX_POOL_STATIC, SI_ORDER_FIRST, - mtx_pool_setup_static, NULL); SYSINIT(mtxpooli2, SI_SUB_MTX_POOL_DYNAMIC, SI_ORDER_FIRST, mtx_pool_setup_dynamic, NULL); #endif /* __rtems__ */ |