From 62c8ca0ead09ef289faf6517e177fd6f6d7a74a3 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 18 May 2017 09:35:46 +0200 Subject: Fix INVARIANTS support --- freebsd/sys/vm/uma_core.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'freebsd/sys/vm') diff --git a/freebsd/sys/vm/uma_core.c b/freebsd/sys/vm/uma_core.c index 01a46a41..6c85b0e8 100644 --- a/freebsd/sys/vm/uma_core.c +++ b/freebsd/sys/vm/uma_core.c @@ -2204,8 +2204,10 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "uma_zalloc_arg: zone \"%s\"", zone->uz_name); } +#ifndef __rtems__ KASSERT(curthread->td_critnest == 0 || SCHEDULER_STOPPED(), ("uma_zalloc_arg: called with spinlock or critical section held")); +#endif /* __rtems__ */ #ifdef DEBUG_MEMGUARD if (memguard_cmp_zone(zone)) { @@ -2742,8 +2744,10 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata) CTR2(KTR_UMA, "uma_zfree_arg thread %x zone %s", curthread, zone->uz_name); +#ifndef __rtems__ KASSERT(curthread->td_critnest == 0 || SCHEDULER_STOPPED(), ("uma_zfree_arg: called with spinlock or critical section held")); +#endif /* __rtems__ */ /* uma_zfree(..., NULL) does nothing, to match free(9). */ if (item == NULL) -- cgit v1.2.3