mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Debug option for ea_free
This commit is contained in:
parent
6ba06dc4df
commit
e654efd354
10
lib/route.h
10
lib/route.h
@ -11,6 +11,7 @@
|
||||
#define _BIRD_LIB_ROUTE_H_
|
||||
|
||||
#undef RT_SOURCE_DEBUG
|
||||
#define EA_FREE_DEBUG
|
||||
|
||||
#include "lib/type.h"
|
||||
#include "lib/rcu.h"
|
||||
@ -588,6 +589,10 @@ struct ea_free_deferred {
|
||||
|
||||
void ea_free_deferred(struct deferred_call *dc);
|
||||
|
||||
#ifdef EA_FREE_DEBUG
|
||||
#define ea_free_later _ea_free_later_internal
|
||||
#endif
|
||||
|
||||
static inline ea_list *ea_free_later(ea_list *r)
|
||||
{
|
||||
if (!r)
|
||||
@ -602,6 +607,11 @@ static inline ea_list *ea_free_later(ea_list *r)
|
||||
return r;
|
||||
}
|
||||
|
||||
#ifdef EA_FREE_DEBUG
|
||||
#undef ea_free_later
|
||||
#define ea_free_later(x) ( log(L_INFO "EA free request %p at %s:%d", (x), __FILE__, __LINE__), _ea_free_later_internal(x) )
|
||||
#endif
|
||||
|
||||
#define ea_free ea_free_later
|
||||
|
||||
static inline ea_list *ea_lookup_tmp(ea_list *r, u32 squash_upto, enum ea_stored oid)
|
||||
|
Loading…
Reference in New Issue
Block a user