Neels Hofmeyr | 7fc312c | 2016-09-16 01:44:52 +0200 | [diff] [blame] | 1 | /* OpenBSC allocation contexts initialization code */ |
| 2 | /* (C) 2011-2016 by sysmocom s.f.m.c. GmbH <info@sysmocom.de> |
| 3 | * All Rights Reserved |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU Affero General Public License as published by |
| 7 | * the Free Software Foundation; either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU Affero General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Affero General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | * |
| 18 | */ |
Harald Welte (local) | 8751ee9 | 2009-08-15 02:30:58 +0200 | [diff] [blame] | 19 | |
Neels Hofmeyr | 7fc312c | 2016-09-16 01:44:52 +0200 | [diff] [blame] | 20 | #include <osmocom/core/talloc.h> |
| 21 | |
| 22 | extern void *tall_bsc_ctx; |
Harald Welte (local) | 8751ee9 | 2009-08-15 02:30:58 +0200 | [diff] [blame] | 23 | extern void *tall_fle_ctx; |
| 24 | extern void *tall_locop_ctx; |
Sylvain Munaut | 28c4716 | 2009-12-24 00:27:26 +0100 | [diff] [blame] | 25 | extern void *tall_authciphop_ctx; |
Harald Welte (local) | 8751ee9 | 2009-08-15 02:30:58 +0200 | [diff] [blame] | 26 | extern void *tall_gsms_ctx; |
| 27 | extern void *tall_subscr_ctx; |
| 28 | extern void *tall_sub_req_ctx; |
| 29 | extern void *tall_call_ctx; |
| 30 | extern void *tall_paging_ctx; |
| 31 | extern void *tall_sigh_ctx; |
| 32 | extern void *tall_tqe_ctx; |
| 33 | extern void *tall_trans_ctx; |
| 34 | extern void *tall_map_ctx; |
| 35 | extern void *tall_upq_ctx; |
Harald Welte | 4d02dae | 2009-12-24 10:04:09 +0100 | [diff] [blame] | 36 | extern void *tall_ctr_ctx; |
Harald Welte (local) | 8751ee9 | 2009-08-15 02:30:58 +0200 | [diff] [blame] | 37 | |
Neels Hofmeyr | a50599e | 2016-05-11 13:53:47 +0200 | [diff] [blame] | 38 | void talloc_ctx_init(void *ctx_root) |
Harald Welte (local) | 8751ee9 | 2009-08-15 02:30:58 +0200 | [diff] [blame] | 39 | { |
Neels Hofmeyr | a73e5f1 | 2016-09-16 01:49:08 +0200 | [diff] [blame] | 40 | msgb_talloc_ctx_init(ctx_root, 0); |
Neels Hofmeyr | a50599e | 2016-05-11 13:53:47 +0200 | [diff] [blame] | 41 | tall_fle_ctx = talloc_named_const(ctx_root, 0, "bs11_file_list_entry"); |
| 42 | tall_locop_ctx = talloc_named_const(ctx_root, 0, "loc_updating_oper"); |
| 43 | tall_authciphop_ctx = talloc_named_const(ctx_root, 0, "auth_ciph_oper"); |
| 44 | tall_gsms_ctx = talloc_named_const(ctx_root, 0, "sms"); |
| 45 | tall_subscr_ctx = talloc_named_const(ctx_root, 0, "subscriber"); |
| 46 | tall_sub_req_ctx = talloc_named_const(ctx_root, 0, "subscr_request"); |
| 47 | tall_call_ctx = talloc_named_const(ctx_root, 0, "gsm_call"); |
| 48 | tall_paging_ctx = talloc_named_const(ctx_root, 0, "paging_request"); |
| 49 | tall_sigh_ctx = talloc_named_const(ctx_root, 0, "signal_handler"); |
| 50 | tall_tqe_ctx = talloc_named_const(ctx_root, 0, "subch_txq_entry"); |
| 51 | tall_trans_ctx = talloc_named_const(ctx_root, 0, "transaction"); |
| 52 | tall_map_ctx = talloc_named_const(ctx_root, 0, "trau_map_entry"); |
| 53 | tall_upq_ctx = talloc_named_const(ctx_root, 0, "trau_upq_entry"); |
| 54 | tall_ctr_ctx = talloc_named_const(ctx_root, 0, "counter"); |
Harald Welte (local) | 8751ee9 | 2009-08-15 02:30:58 +0200 | [diff] [blame] | 55 | } |