Deleted Added
full compact
kern_mtxpool.c (139803) kern_mtxpool.c (141616)
1/*-
2 * Copyright (c) 2001 Matthew Dillon. All Rights Reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 30 unchanged lines hidden (view full) ---

39 *
40 * Disadvantages:
41 * - should generally only be used as leaf mutexes.
42 * - pool/pool dependancy ordering cannot be depended on.
43 * - possible L1 cache mastersip contention between cpus.
44 */
45
46#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 Matthew Dillon. All Rights Reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 30 unchanged lines hidden (view full) ---

39 *
40 * Disadvantages:
41 * - should generally only be used as leaf mutexes.
42 * - pool/pool dependancy ordering cannot be depended on.
43 * - possible L1 cache mastersip contention between cpus.
44 */
45
46#include <sys/cdefs.h>
47__FBSDID("$FreeBSD: head/sys/kern/kern_mtxpool.c 139803 2005-01-06 23:34:38Z imp $");
47__FBSDID("$FreeBSD: head/sys/kern/kern_mtxpool.c 141616 2005-02-10 12:02:37Z phk $");
48
49#include <sys/param.h>
50#include <sys/proc.h>
51#include <sys/kernel.h>
52#include <sys/ktr.h>
53#include <sys/lock.h>
54#include <sys/malloc.h>
55#include <sys/mutex.h>
56#include <sys/systm.h>
57
58
48
49#include <sys/param.h>
50#include <sys/proc.h>
51#include <sys/kernel.h>
52#include <sys/ktr.h>
53#include <sys/lock.h>
54#include <sys/malloc.h>
55#include <sys/mutex.h>
56#include <sys/systm.h>
57
58
59MALLOC_DEFINE(M_MTXPOOL, "mtx_pool", "mutex pool");
59static MALLOC_DEFINE(M_MTXPOOL, "mtx_pool", "mutex pool");
60
61/* Pool sizes must be a power of two */
62#ifndef MTX_POOL_LOCKBUILDER_SIZE
63#define MTX_POOL_LOCKBUILDER_SIZE 128
64#endif
65#ifndef MTX_POOL_SLEEP_SIZE
66#define MTX_POOL_SLEEP_SIZE 128
67#endif

--- 151 unchanged lines hidden ---
60
61/* Pool sizes must be a power of two */
62#ifndef MTX_POOL_LOCKBUILDER_SIZE
63#define MTX_POOL_LOCKBUILDER_SIZE 128
64#endif
65#ifndef MTX_POOL_SLEEP_SIZE
66#define MTX_POOL_SLEEP_SIZE 128
67#endif

--- 151 unchanged lines hidden ---