Deleted Added
full compact
uma_int.h (94631) uma_int.h (95758)
1/*
2 * Copyright (c) 2002, Jeffrey Roberson <jroberson@chesapeake.net>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
1/*
2 * Copyright (c) 2002, Jeffrey Roberson <jroberson@chesapeake.net>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/vm/uma_int.h 94631 2002-04-14 01:56:25Z jeff $
26 * $FreeBSD: head/sys/vm/uma_int.h 95758 2002-04-29 23:45:41Z jeff $
27 *
28 */
29
30/*
31 *
32 * Jeff Roberson <jroberson@chesapeake.net>
33 *
34 * This file includes definitions, structures, prototypes, and inlines that

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

279
280/* Internal prototypes */
281static __inline uma_slab_t hash_sfind(struct uma_hash *hash, u_int8_t *data);
282void *uma_large_malloc(int size, int wait);
283void uma_large_free(uma_slab_t slab);
284
285/* Lock Macros */
286
27 *
28 */
29
30/*
31 *
32 * Jeff Roberson <jroberson@chesapeake.net>
33 *
34 * This file includes definitions, structures, prototypes, and inlines that

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

279
280/* Internal prototypes */
281static __inline uma_slab_t hash_sfind(struct uma_hash *hash, u_int8_t *data);
282void *uma_large_malloc(int size, int wait);
283void uma_large_free(uma_slab_t slab);
284
285/* Lock Macros */
286
287#define ZONE_LOCK_INIT(z) \
288 mtx_init(&(z)->uz_lock, (z)->uz_name, "UMA zone", \
289 MTX_DEF | MTX_DUPOK)
287#define ZONE_LOCK_INIT(z, lc) \
288 do { \
289 if ((lc)) \
290 mtx_init(&(z)->uz_lock, (z)->uz_name, \
291 (z)->uz_name, MTX_DEF | MTX_DUPOK); \
292 else \
293 mtx_init(&(z)->uz_lock, (z)->uz_name, \
294 "UMA zone", MTX_DEF | MTX_DUPOK); \
295 } while (0)
296
290#define ZONE_LOCK_FINI(z) mtx_destroy(&(z)->uz_lock)
291#define ZONE_LOCK(z) mtx_lock(&(z)->uz_lock)
292#define ZONE_UNLOCK(z) mtx_unlock(&(z)->uz_lock)
293
297#define ZONE_LOCK_FINI(z) mtx_destroy(&(z)->uz_lock)
298#define ZONE_LOCK(z) mtx_lock(&(z)->uz_lock)
299#define ZONE_UNLOCK(z) mtx_unlock(&(z)->uz_lock)
300
294#define CPU_LOCK_INIT(z, cpu) \
295 mtx_init(&(z)->uz_cpu[(cpu)].uc_lock, (z)->uz_lname, "UMA cpu", \
296 MTX_DEF | MTX_DUPOK)
301#define CPU_LOCK_INIT(z, cpu, lc) \
302 do { \
303 if ((lc)) \
304 mtx_init(&(z)->uz_cpu[(cpu)].uc_lock, \
305 (z)->uz_lname, (z)->uz_lname, \
306 MTX_DEF | MTX_DUPOK); \
307 else \
308 mtx_init(&(z)->uz_cpu[(cpu)].uc_lock, \
309 (z)->uz_lname, "UMA cpu", \
310 MTX_DEF | MTX_DUPOK); \
311 } while (0)
297
298#define CPU_LOCK_FINI(z, cpu) \
299 mtx_destroy(&(z)->uz_cpu[(cpu)].uc_lock)
300
301#define CPU_LOCK(z, cpu) \
302 mtx_lock(&(z)->uz_cpu[(cpu)].uc_lock)
303
304#define CPU_UNLOCK(z, cpu) \

--- 30 unchanged lines hidden ---
312
313#define CPU_LOCK_FINI(z, cpu) \
314 mtx_destroy(&(z)->uz_cpu[(cpu)].uc_lock)
315
316#define CPU_LOCK(z, cpu) \
317 mtx_lock(&(z)->uz_cpu[(cpu)].uc_lock)
318
319#define CPU_UNLOCK(z, cpu) \

--- 30 unchanged lines hidden ---