libosmocore 1.9.0.192-1c24
Osmocom core library
talloc.h
Go to the documentation of this file.
1
2#pragma once
3#include <talloc.h>
4
12 void *global;
19 void *select;
20};
21
22extern __thread struct osmo_talloc_contexts *osmo_ctx;
23
24/* short-hand #defines for the osmo talloc contexts (OTC) that can be used to pass
25 * to the various _c functions like msgb_alloc_c() */
26#define OTC_GLOBAL (osmo_ctx->global)
27#define OTC_SELECT (osmo_ctx->select)
28
29int osmo_ctx_init(const char *id);
per-thread talloc contexts.
Definition: talloc.h:10
void * global
global per-thread talloc context.
Definition: talloc.h:12
void * select
volatile select-dispatch context.
Definition: talloc.h:19
int osmo_ctx_init(const char *id)
Definition: context.c:26
__thread struct osmo_talloc_contexts * osmo_ctx
Definition: context.c:24