a function taking a ``struct memtype *`` argument can be called with an
``MTYPE_name`` argument (as opposed to ``&MTYPE_name``.)
+ .. note::
+
+ As ``MTYPE_name`` is a variable assigned from ``&_mt_name`` and not a
+ constant expression, it cannot be used as initializer for static
+ variables. In the case please fall back to ``&_mt_name``.
+
.. c:macro:: DECLARE_MGROUP(name)
This macro forward-declares a memory group and should be placed in a
rcu_bump();
if (rt != &rcu_thread_main)
/* this free() happens after seqlock_release() below */
- rcu_free_internal(MTYPE_RCU_THREAD, rt, rcu_head);
+ rcu_free_internal(&_mt_RCU_THREAD, rt, rcu_head);
rcu_threads_del(&rcu_threads, rt);
seqlock_release(&rt->rcu);
* "last item is being deleted - start over" case, and then we may end
* up accessing old RCU queue items that are already free'd.
*/
- rcu_free_internal(MTYPE_RCU_NEXT, rn, head_free);
+ rcu_free_internal(&_mt_RCU_NEXT, rn, head_free);
/* Only allow the RCU sweeper to run after these 2 items are queued.
*