diff options
author | Harald Welte (local) <laflocal@hanuman.gnumonks.org> | 2009-08-15 02:30:58 +0200 |
---|---|---|
committer | Harald Welte (local) <laflocal@hanuman.gnumonks.org> | 2009-08-15 02:30:58 +0200 |
commit | d19e58b13ce7716491d7fe22a91a52cf092b42a7 (patch) | |
tree | e16a267c7fa496ddc102844479be76ce71fc0ab9 /openbsc/src/talloc_ctx.c | |
parent | efc92311e22e67a210429a15c29b396b0561317f (diff) |
move talloc context creation out of on_dso / constructors
the various constructors get called in a non-obvious, linker determined
order, which makes certain objects disappear from the talloc report.
This change moves the talloc context creation into a new talloc_ctx.c file
Diffstat (limited to 'openbsc/src/talloc_ctx.c')
-rw-r--r-- | openbsc/src/talloc_ctx.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/openbsc/src/talloc_ctx.c b/openbsc/src/talloc_ctx.c new file mode 100644 index 000000000..aa9f0b4d7 --- /dev/null +++ b/openbsc/src/talloc_ctx.c @@ -0,0 +1,32 @@ +#include <openbsc/talloc.h> +#include <openbsc/gsm_data.h> + +extern void *tall_fle_ctx; +extern void *tall_locop_ctx; +extern void *tall_gsms_ctx; +extern void *tall_subscr_ctx; +extern void *tall_sub_req_ctx; +extern void *tall_call_ctx; +extern void *tall_paging_ctx; +extern void *tall_sigh_ctx; +extern void *tall_tqe_ctx; +extern void *tall_trans_ctx; +extern void *tall_map_ctx; +extern void *tall_upq_ctx; + +void talloc_ctx_init(void) +{ + tall_fle_ctx = talloc_named_const(tall_bsc_ctx, 0, + "bs11_file_list_entry"); + tall_locop_ctx = talloc_named_const(tall_bsc_ctx, 0, "loc_updating_oper"); + tall_gsms_ctx = talloc_named_const(tall_bsc_ctx, 0, "sms"); + tall_subscr_ctx = talloc_named_const(tall_bsc_ctx, 0, "subscriber"); + tall_sub_req_ctx = talloc_named_const(tall_bsc_ctx, 0, "subscr_request"); + tall_call_ctx = talloc_named_const(tall_bsc_ctx, 0, "gsm_call"); + tall_paging_ctx = talloc_named_const(tall_bsc_ctx, 0, "paging_request"); + tall_sigh_ctx = talloc_named_const(tall_bsc_ctx, 0, "signal_handler"); + tall_tqe_ctx = talloc_named_const(tall_bsc_ctx, 0, "subch_txq_entry"); + tall_trans_ctx = talloc_named_const(tall_bsc_ctx, 0, "transaction"); + tall_map_ctx = talloc_named_const(tall_bsc_ctx, 0, "trau_map_entry"); + tall_upq_ctx = talloc_named_const(tall_bsc_ctx, 0, "trau_upq_entry"); +} |