mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
MINOR: shctx: Add new reserve_finish callback call to shctx_row_reserve_hot
This patch adds a reserve_finish callback that can be defined by the subsystems that require a shared_context. It is called at the end of shctx_row_reserve_hot after the shared_context lock is released.
This commit is contained in:
parent
11df806c88
commit
1cd91b4f2a
@ -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];
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user