/* Local user routines keep track of which channels are using a given module
resource. They can help make removing modules safer, particularly if
they're in use at the time they have been requested to be removed */
struct localuser {
struct localuser *next;
struct ast_channel *chan;
};
struct module_symbols; /* forward declaration */
struct localuser *ast_localuser_add(struct module_symbols *, struct ast_channel *);
void ast_localuser_remove(struct module_symbols *, struct localuser *);
void ast_hangup_localusers(struct module_symbols *);
/* XXX deprecated macros, only for backward compatibility */
#define LOCAL_USER_ADD(u) do { u = ast_localuser_add(__mod_desc, chan); } while (0)
#define LOCAL_USER_REMOVE(u) ast_localuser_remove(__mod_desc, u)
#define STANDARD_HANGUP_LOCALUSERS ast_hangup_localusers(__mod_desc)
struct module_symbols mod_data; /* forward declaration */
static struct module_symbols *__mod_desc __attribute__ ((__unused__)) = &mod_data; /* used by localuser */