X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-bp.c;h=2ae3408c25fd42cc6788c6ec8664c91cf9868d87;hp=7412b5b6add6b0edfb4e7ca53966487fe9fb3664;hb=4d676753007f54e45b7e0307244ffc876a953874;hpb=b7b6a8f52c051dca78161908670e3f51b9b33080 diff --git a/urcu-bp.c b/urcu-bp.c index 7412b5b..2ae3408 100644 --- a/urcu-bp.c +++ b/urcu-bp.c @@ -24,6 +24,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include @@ -35,11 +36,14 @@ #include #include +#include "urcu/wfqueue.h" #include "urcu/map/urcu-bp.h" - #include "urcu/static/urcu-bp.h" + /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */ +#undef _LGPL_SOURCE #include "urcu-bp.h" +#define _LGPL_SOURCE #ifndef MAP_ANONYMOUS #define MAP_ANONYMOUS MAP_ANON @@ -369,9 +373,10 @@ end: assert(!ret); } -void rcu_bp_exit() +void rcu_bp_exit(void) { - munmap(registry_arena.p, registry_arena.len); + if (registry_arena.p) + munmap(registry_arena.p, registry_arena.len); } /*