mirror of
https://github.com/postgres/postgres.git
synced 2026-01-26 09:41:40 +03:00
Allow passing a pointer to GetNamedDSMSegment()'s init callback.
This commit adds a new "void *arg" parameter to GetNamedDSMSegment() that is passed to the initialization callback function. This is useful for reusing an initialization callback function for multiple DSM segments. Author: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Sami Imseih <samimseih@gmail.com> Discussion: https://postgr.es/m/CAN4CZFMjh8TrT9ZhWgjVTzBDkYZi2a84BnZ8bM%2BfLPuq7Cirzg%40mail.gmail.com
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
#include "lib/dshash.h"
|
||||
|
||||
extern void *GetNamedDSMSegment(const char *name, size_t size,
|
||||
void (*init_callback) (void *ptr),
|
||||
bool *found);
|
||||
void (*init_callback) (void *ptr, void *arg),
|
||||
bool *found, void *arg);
|
||||
extern dsa_area *GetNamedDSA(const char *name, bool *found);
|
||||
extern dshash_table *GetNamedDSHash(const char *name,
|
||||
const dshash_parameters *params,
|
||||
|
||||
Reference in New Issue
Block a user