summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/module.c4
-rw-r--r--src/redismodule.h8
2 files changed, 12 insertions, 0 deletions
diff --git a/src/module.c b/src/module.c
index 5a6189ebc..e9b95f974 100644
--- a/src/module.c
+++ b/src/module.c
@@ -3760,4 +3760,8 @@ void moduleRegisterCoreAPI(void) {
REGISTER_API(GetBlockedClientPrivateData);
REGISTER_API(AbortBlock);
REGISTER_API(Milliseconds);
+ REGISTER_API(GetThreadSafeContext);
+ REGISTER_API(FreeThreadSafeContext);
+ REGISTER_API(ThreadSafeContextLock);
+ REGISTER_API(ThreadSafeContextUnlock);
}
diff --git a/src/redismodule.h b/src/redismodule.h
index fcd6aeca3..2f2e3c923 100644
--- a/src/redismodule.h
+++ b/src/redismodule.h
@@ -214,6 +214,10 @@ int REDISMODULE_API_FUNC(RedisModule_IsBlockedTimeoutRequest)(RedisModuleCtx *ct
void *REDISMODULE_API_FUNC(RedisModule_GetBlockedClientPrivateData)(RedisModuleCtx *ctx);
int REDISMODULE_API_FUNC(RedisModule_AbortBlock)(RedisModuleBlockedClient *bc);
long long REDISMODULE_API_FUNC(RedisModule_Milliseconds)(void);
+RedisModuleCtx *REDISMODULE_API_FUNC(RedisModule_GetThreadSafeContext)(RedisModuleBlockedClient *bc);
+void REDISMODULE_API_FUNC(RedisModule_FreeThreadSafeContext)(RedisModuleCtx *ctx);
+void REDISMODULE_API_FUNC(RedisModule_ThreadSafeContextLock)(RedisModuleCtx *ctx);
+void REDISMODULE_API_FUNC(RedisModule_ThreadSafeContextUnlock)(RedisModuleCtx *ctx);
/* This is included inline inside each Redis module. */
static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int apiver) __attribute__((unused));
@@ -322,6 +326,10 @@ static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int
REDISMODULE_GET_API(GetBlockedClientPrivateData);
REDISMODULE_GET_API(AbortBlock);
REDISMODULE_GET_API(Milliseconds);
+ REDISMODULE_GET_API(GetThreadSafeContext);
+ REDISMODULE_GET_API(FreeThreadSafeContext);
+ REDISMODULE_GET_API(ThreadSafeContextLock);
+ REDISMODULE_GET_API(ThreadSafeContextUnlock);
RedisModule_SetModuleAttribs(ctx,name,ver,apiver);
return REDISMODULE_OK;