mirror of
https://github.com/fluencelabs/redis
synced 2025-06-29 17:01:33 +00:00
Added a server.arch_bits field instead of computing it at runtime for INFO.
This commit is contained in:
@ -798,6 +798,7 @@ void createSharedObjects(void) {
|
||||
}
|
||||
|
||||
void initServerConfig() {
|
||||
server.arch_bits = (sizeof(long) == 8) ? 64 : 32;
|
||||
server.port = REDIS_SERVERPORT;
|
||||
server.bindaddr = NULL;
|
||||
server.unixsocket = NULL;
|
||||
@ -1257,7 +1258,7 @@ sds genRedisInfoString(void) {
|
||||
"redis_version:%s\r\n"
|
||||
"redis_git_sha1:%s\r\n"
|
||||
"redis_git_dirty:%d\r\n"
|
||||
"arch_bits:%s\r\n"
|
||||
"arch_bits:%d\r\n"
|
||||
"multiplexing_api:%s\r\n"
|
||||
"gcc_version:%d.%d.%d\r\n"
|
||||
"process_id:%ld\r\n"
|
||||
@ -1300,7 +1301,7 @@ sds genRedisInfoString(void) {
|
||||
,REDIS_VERSION,
|
||||
redisGitSHA1(),
|
||||
strtol(redisGitDirty(),NULL,10) > 0,
|
||||
(sizeof(long) == 8) ? "64" : "32",
|
||||
server.arch_bits,
|
||||
aeGetApiName(),
|
||||
#ifdef __GNUC__
|
||||
__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__,
|
||||
|
@ -381,6 +381,7 @@ struct sharedObjectsStruct {
|
||||
/* Global server state structure */
|
||||
struct redisServer {
|
||||
pthread_t mainthread;
|
||||
int arch_bits;
|
||||
int port;
|
||||
char *bindaddr;
|
||||
char *unixsocket;
|
||||
|
Reference in New Issue
Block a user