Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
9390c384
Commit
9390c384
authored
May 09, 2017
by
antirez
Browse files
Modules TSC: Add mutex for server.lruclock.
Only useful for when no atomic builtins are available.
parent
ece65871
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
9390c384
...
...
@@ -1432,6 +1432,7 @@ void initServerConfig(void) {
server
.
lua_time_limit
=
LUA_SCRIPT_TIME_LIMIT
;
unsigned
int
lruclock
=
getLRUClock
();
pthread_mutex_init
(
&
server
.
lruclock_mutex
,
NULL
);
atomicSet
(
server
.
lruclock
,
lruclock
);
resetServerSaveParams
();
...
...
src/server.h
View file @
9390c384
...
...
@@ -861,6 +861,7 @@ struct redisServer {
dict
*
orig_commands
;
/* Command table before command renaming. */
aeEventLoop
*
el
;
unsigned
int
lruclock
;
/* Clock for LRU eviction */
pthread_mutex_t
lruclock_mutex
;
int
shutdown_asap
;
/* SHUTDOWN needed ASAP */
int
activerehashing
;
/* Incremental rehash in serverCron() */
int
active_defrag_running
;
/* Active defragmentation running (holds current scan aggressiveness) */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment