Deleted Added
full compact
27c27
< * $FreeBSD: head/sys/vm/uma_int.h 251894 2013-06-18 04:50:20Z jeff $
---
> * $FreeBSD: head/sys/vm/uma_int.h 252040 2013-06-20 19:08:12Z jeff $
192c192
< struct mtx uk_lock; /* Lock for the keg */
---
> struct mtx_padalign uk_lock; /* Lock for the keg */
284,285c284,286
< const char *uz_name; /* Text name of the zone */
< struct mtx *uz_lock; /* Lock for the zone (keg's lock) */
---
> struct mtx_padalign uz_lock; /* Lock for the zone */
> struct mtx_padalign *uz_lockptr;
> const char *uz_name; /* Text name of the zone */
336a338
> uma_klink_t klink;
338c340,341
< return (LIST_FIRST(&zone->uz_kegs)->kl_keg);
---
> klink = LIST_FIRST(&zone->uz_kegs);
> return (klink != NULL) ? klink->kl_keg : NULL;
360c363
<
---
>
364,366d366
< #define ZONE_LOCK(z) mtx_lock((z)->uz_lock)
< #define ZONE_TRYLOCK(z) mtx_trylock((z)->uz_lock)
< #define ZONE_UNLOCK(z) mtx_unlock((z)->uz_lock)
367a368,382
> #define ZONE_LOCK_INIT(z, lc) \
> do { \
> if ((lc)) \
> mtx_init(&(z)->uz_lock, (z)->uz_name, \
> (z)->uz_name, MTX_DEF | MTX_DUPOK); \
> else \
> mtx_init(&(z)->uz_lock, (z)->uz_name, \
> "UMA zone", MTX_DEF | MTX_DUPOK); \
> } while (0)
>
> #define ZONE_LOCK(z) mtx_lock((z)->uz_lockptr)
> #define ZONE_TRYLOCK(z) mtx_trylock((z)->uz_lockptr)
> #define ZONE_UNLOCK(z) mtx_unlock((z)->uz_lockptr)
> #define ZONE_LOCK_FINI(z) mtx_destroy(&(z)->uz_lock)
>