diff options
author | David Lamparter <equinox@diac24.net> | 2019-11-14 00:21:10 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2019-12-13 06:22:34 +0100 |
commit | 33de8d1dd02dfb53f125c8213c896bc62f6c6d8e (patch) | |
tree | 649fe6c9e0d636d644e2341c3133554b9b746752 /lib/frrcu.c | |
parent | lib: make rcu_free() NULL-safe (diff) | |
download | frr-33de8d1dd02dfb53f125c8213c896bc62f6c6d8e.tar.xz frr-33de8d1dd02dfb53f125c8213c896bc62f6c6d8e.zip |
lib: completely get rid of the MTYPE alias hack
Sometimes the easiest solution is hardest to find... the whole point of
all this "static const", aliasing, & co. was to make "MTYPE_FOO" usable
without adding the extra & as in "&MTYPE_FOO". Making it a size-1 array
does that perfectly through the magic of ISO C array decay...
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/frrcu.c')
-rw-r--r-- | lib/frrcu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/frrcu.c b/lib/frrcu.c index d65a4a98b..7e6475b64 100644 --- a/lib/frrcu.c +++ b/lib/frrcu.c @@ -206,7 +206,7 @@ void rcu_thread_unprepare(struct rcu_thread *rt) rcu_bump(); if (rt != &rcu_thread_main) /* this free() happens after seqlock_release() below */ - rcu_free_internal(&_mt_RCU_THREAD, rt, rcu_head); + rcu_free_internal(MTYPE_RCU_THREAD, rt, rcu_head); rcu_threads_del(&rcu_threads, rt); seqlock_release(&rt->rcu); @@ -269,7 +269,7 @@ static void rcu_bump(void) * "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(&_mt_RCU_NEXT, rn, head_free); + rcu_free_internal(MTYPE_RCU_NEXT, rn, head_free); /* Only allow the RCU sweeper to run after these 2 items are queued. * |