Commit 756a6b86 authored by Howard Chu's avatar Howard Chu
Browse files

ITS#8261 change sl_mem_detach to sl_mem_setctx

parent 94d6581b
......@@ -1861,7 +1861,7 @@ LDAP_SLAPD_V (BerMemoryFunctions) slap_sl_mfuncs;
LDAP_SLAPD_F (void) slap_sl_mem_init LDAP_P(( void ));
LDAP_SLAPD_F (void *) slap_sl_mem_create LDAP_P((
ber_len_t size, int stack, void *ctx, int flag ));
LDAP_SLAPD_F (void) slap_sl_mem_detach LDAP_P(( void *ctx, void *memctx ));
LDAP_SLAPD_F (void) slap_sl_mem_setctx LDAP_P(( void *ctx, void *memctx ));
LDAP_SLAPD_F (void) slap_sl_mem_destroy LDAP_P(( void *key, void *data ));
LDAP_SLAPD_F (void *) slap_sl_context LDAP_P(( void *ptr ));
......
......@@ -279,16 +279,17 @@ slap_sl_mem_create(
}
/*
* Separate memory context from thread context. Future users must
* Assign memory context to thread context. Use NULL to detach
* current memory context from thread. Future users must
* know the context, since ch_free/slap_sl_context() cannot find it.
*/
void
slap_sl_mem_detach(
slap_sl_mem_setctx(
void *thrctx,
void *memctx
)
{
SET_MEMCTX(thrctx, NULL, 0);
SET_MEMCTX(thrctx, memctx, slap_sl_mem_destroy);
}
void *
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment