diff --git a/include/haproxy/shctx-t.h b/include/haproxy/shctx-t.h index 9d23d69d0..da241a9ac 100644 --- a/include/haproxy/shctx-t.h +++ b/include/haproxy/shctx-t.h @@ -51,6 +51,7 @@ struct shared_context { unsigned int nbav; /* number of available blocks */ unsigned int max_obj_size; /* maximum object size (in bytes). */ void (*free_block)(struct shared_block *first, struct shared_block *block, void *data); + void (*reserve_finish)(struct shared_context *shctx); void *cb_data; short int block_size; unsigned char data[VAR_ARRAY]; diff --git a/src/shctx.c b/src/shctx.c index daf7866c9..299f57f2a 100644 --- a/src/shctx.c +++ b/src/shctx.c @@ -110,6 +110,9 @@ struct shared_block *shctx_row_reserve_hot(struct shared_context *shctx, shctx_wrunlock(shctx); + if (shctx->reserve_finish) + shctx->reserve_finish(shctx); + out: return ret; }