Home
last modified time | relevance | path

Searched refs:type (Results 1 – 25 of 73) sorted by relevance

123

/redis-3.2.3/src/
H A Dbio.c133 pthread_mutex_lock(&bio_mutex[type]); in bioCreateBackgroundJob()
134 listAddNodeTail(bio_jobs[type],job); in bioCreateBackgroundJob()
135 bio_pending[type]++; in bioCreateBackgroundJob()
146 if (type >= BIO_NUM_OPS) { in bioProcessBackgroundJobs()
157 pthread_mutex_lock(&bio_mutex[type]); in bioProcessBackgroundJobs()
171 pthread_cond_wait(&bio_condvar[type],&bio_mutex[type]); in bioProcessBackgroundJobs()
175 ln = listFirst(bio_jobs[type]); in bioProcessBackgroundJobs()
182 if (type == BIO_CLOSE_FILE) { in bioProcessBackgroundJobs()
194 listDelNode(bio_jobs[type],ln); in bioProcessBackgroundJobs()
195 bio_pending[type]--; in bioProcessBackgroundJobs()
[all …]
H A Ddict.h77 dictType *type; member
104 if ((d)->type->valDestructor) \
105 (d)->type->valDestructor((d)->privdata, (entry)->v.val)
108 if ((d)->type->valDup) \
124 if ((d)->type->keyDestructor) \
125 (d)->type->keyDestructor((d)->privdata, (entry)->key)
128 if ((d)->type->keyDup) \
135 (((d)->type->keyCompare) ? \
136 (d)->type->keyCompare((d)->privdata, key1, key2) : \
139 #define dictHashKey(d, key) (d)->type->hashFunction(key)
[all …]
H A Dredis-check-rdb.c178 int type, rdbver; in redis_check_rdb() local
208 if ((type = rdbLoadType(&rdb)) == -1) goto eoferr; in redis_check_rdb()
211 if (type == RDB_OPCODE_EXPIRETIME) { in redis_check_rdb()
219 if ((type = rdbLoadType(&rdb)) == -1) goto eoferr; in redis_check_rdb()
223 } else if (type == RDB_OPCODE_EXPIRETIME_MS) { in redis_check_rdb()
231 } else if (type == RDB_OPCODE_EOF) { in redis_check_rdb()
234 } else if (type == RDB_OPCODE_SELECTDB) { in redis_check_rdb()
241 } else if (type == RDB_OPCODE_RESIZEDB) { in redis_check_rdb()
251 } else if (type == RDB_OPCODE_AUX) { in redis_check_rdb()
268 if (!rdbIsObjectType(type)) { in redis_check_rdb()
[all …]
H A Dsort.c40 so->type = type; in createSortOperation()
113 if (o->type != OBJ_HASH) goto noobj; in lookupKeyByPattern()
119 if (o->type != OBJ_STRING) goto noobj; in lookupKeyByPattern()
295 sortval->type == OBJ_SET && in sortCommand()
305 if (sortval->type == OBJ_ZSET) in sortCommand()
309 switch(sortval->type) { in sortCommand()
335 if ((sortval->type == OBJ_ZSET || sortval->type == OBJ_LIST) && in sortCommand()
371 } else if (sortval->type == OBJ_LIST) { in sortCommand()
381 } else if (sortval->type == OBJ_SET) { in sortCommand()
430 } else if (sortval->type == OBJ_ZSET) { in sortCommand()
[all …]
H A Dbio.h32 void bioCreateBackgroundJob(int type, void *arg1, void *arg2, void *arg3);
33 unsigned long long bioPendingJobsOfType(int type);
34 void bioWaitPendingJobsLE(int type, unsigned long long num);
35 time_t bioOlderJobOfType(int type);
H A Dobject.c39 robj *createObject(int type, void *ptr) { in createObject() argument
41 o->type = type; in createObject()
64 o->type = OBJ_STRING; in createEmbeddedStringObject()
166 serverAssert(o->type == OBJ_STRING); in dupStringObject()
304 switch(o->type) { in decrRefCount()
342 int checkType(client *c, robj *o, int type) { in checkType() argument
343 if (o->type != type) { in checkType()
351 serverAssertWithInfo(NULL,o,o->type == OBJ_STRING); in isObjectRepresentableAsLongLong()
370 serverAssertWithInfo(NULL,o,o->type == OBJ_STRING); in tryObjectEncoding()
472 serverAssertWithInfo(NULL,a,a->type == OBJ_STRING && b->type == OBJ_STRING); in compareStringObjectsWithFlags()
[all …]
H A Dsds.c87 if (type == SDS_TYPE_5 && initlen == 0) type = SDS_TYPE_8; in sdsnewlen()
97 switch(type) { in sdsnewlen()
106 *fp = type; in sdsnewlen()
113 *fp = type; in sdsnewlen()
120 *fp = type; in sdsnewlen()
127 *fp = type; in sdsnewlen()
217 if (type == SDS_TYPE_5) type = SDS_TYPE_8; in sdsMakeRoomFor()
220 if (oldtype==type) { in sdsMakeRoomFor()
232 s[-1] = type; in sdsMakeRoomFor()
254 if (oldtype==type) { in sdsRemoveFreeSpace()
[all …]
H A Drdb.c82 return rdbWriteRaw(rdb,&type,1); in rdbSaveType()
89 unsigned char type; in rdbLoadType() local
91 return type; in rdbLoadType()
146 int type; in rdbLoadLen() local
150 type = (buf[0]&0xC0)>>6; in rdbLoadLen()
151 if (type == RDB_ENCVAL) { in rdbLoadLen()
526 switch (o->type) { in rdbSaveObjectType()
564 int type; in rdbLoadObjectType() local
567 return type; in rdbLoadObjectType()
574 if (o->type == OBJ_STRING) { in rdbSaveObject()
[all …]
H A Dredis-cli.c209 int type; member
249 tmp.type = CLI_HELP_GROUP; in cliInitHelp()
257 tmp.type = CLI_HELP_COMMAND; in cliInitHelp()
296 new->type = CLI_HELP_COMMAND; in cliIntegrateHelp()
553 switch (r->type) { in cliFormatReplyTTY()
667 switch (r->type) { in cliFormatReplyRaw()
718 switch (r->type) { in cliFormatReplyCSV()
1981 if(!strcmp(type, "string")) { in toIntType()
2078 int type, *types=NULL; in findBigKeys() local
2130 counts[type]++; in findBigKeys()
[all …]
H A Ddb.c441 } else if (o->type == OBJ_SET) { in scanCallback()
444 } else if (o->type == OBJ_HASH) { in scanCallback()
449 } else if (o->type == OBJ_ZSET) { in scanCallback()
502 serverAssert(o == NULL || o->type == OBJ_SET || o->type == OBJ_HASH || in scanGenericCommand()
580 } else if (o->type == OBJ_SET) { in scanGenericCommand()
587 } else if (o->type == OBJ_HASH || o->type == OBJ_ZSET) { in scanGenericCommand()
639 if (o && (o->type == OBJ_ZSET || o->type == OBJ_HASH)) { in scanGenericCommand()
685 char *type; in typeCommand() local
689 type = "none"; in typeCommand()
691 switch(o->type) { in typeCommand()
[all …]
/redis-3.2.3/tests/
H A Dinstances.tcl39 proc exec_instance {type cfgfile} {
40 if {$type eq "redis"} {
42 } elseif {$type eq "sentinel"} {
64 set dirname "${type}_${j}"
274 foreach type $instance_types {
399 lset ::${type}_instances $id $d
428 foreach_${type}_id id {
442 proc kill_instance {type id} {
472 proc instance_is_killed {type id} {
478 proc restart_instance {type id} {
[all …]
/redis-3.2.3/deps/hiredis/
H A Ddict.h62 dictType *type; member
80 if ((ht)->type->valDestructor) \
81 (ht)->type->valDestructor((ht)->privdata, (entry)->val)
84 if ((ht)->type->valDup) \
91 if ((ht)->type->keyDestructor) \
92 (ht)->type->keyDestructor((ht)->privdata, (entry)->key)
95 if ((ht)->type->keyDup) \
102 (((ht)->type->keyCompare) ? \
103 (ht)->type->keyCompare((ht)->privdata, key1, key2) : \
106 #define dictHashKey(ht, key) (ht)->type->hashFunction(key)
[all …]
H A Dtest.c22 enum connection_type type; member
89 if (config.type == CONN_TCP) { in connect()
91 } else if (config.type == CONN_UNIX) { in connect()
93 } else if (config.type == CONN_FD) { in connect()
354 test_cond(reply->type == REDIS_REPLY_STATUS && in test_blocking_connection()
385 test_cond(reply->type == REDIS_REPLY_NIL) in test_blocking_connection()
398 test_cond(reply->type == REDIS_REPLY_ARRAY && in test_blocking_connection()
411 test_cond(reply->type == REDIS_REPLY_ARRAY && in test_blocking_connection()
707 cfg.type = CONN_TCP; in main()
715 cfg.type = CONN_UNIX; in main()
[all …]
H A Dsds.c87 if (type == SDS_TYPE_5 && initlen == 0) type = SDS_TYPE_8; in sdsnewlen()
97 switch(type) { in sdsnewlen()
106 *fp = type; in sdsnewlen()
113 *fp = type; in sdsnewlen()
120 *fp = type; in sdsnewlen()
127 *fp = type; in sdsnewlen()
217 if (type == SDS_TYPE_5) type = SDS_TYPE_8; in sdsMakeRoomFor()
220 if (oldtype==type) { in sdsMakeRoomFor()
232 s[-1] = type; in sdsMakeRoomFor()
254 if (oldtype==type) { in sdsRemoveFreeSpace()
[all …]
H A Dhiredis.c67 r->type = type; in createReplyObject()
76 switch(r->type) { in freeReplyObject()
101 r = createReplyObject(task->type); in createStringObject()
113 task->type == REDIS_REPLY_STRING); in createStringObject()
205 r->err = type; in __redisReaderSetError()
347 cur->type = -1; in moveToNextTask()
512 if (cur->type < 0) { in processItem()
541 switch(cur->type) { in processItem()
632 r->rstack[0].type = -1; in redisReaderGetReply()
976 c->err = type; in __redisSetError()
[all …]
H A Ddict.c47 static int _dictInit(dict *ht, dictType *type, void *privDataPtr);
73 static dict *dictCreate(dictType *type, void *privDataPtr) { in dictCreate() argument
75 _dictInit(ht,type,privDataPtr); in dictCreate()
80 static int _dictInit(dict *ht, dictType *type, void *privDataPtr) { in _dictInit() argument
82 ht->type = type; in _dictInit()
97 _dictInit(&n, ht->type, ht->privdata); in dictExpand()
/redis-3.2.3/tests/unit/type/
H A Dlist.tcl137 test "BRPOPLPUSH - $type" {
506 test "LPUSHX, RPUSHX - $type" {
513 test "LINSERT - $type" {
560 assert_encoding $type mylist
565 assert_encoding $type mylist
571 assert_encoding $type mylist
688 test "Mass RPOP/LPOP - $type" {
706 test "LRANGE basics - $type" {
735 proc trim_list {type min max} {
743 test "LTRIM basics - $type" {
[all …]
H A Dset.tcl114 foreach {type} {hashtable intset} {
135 if {$type eq "hashtable"} {
155 assert_encoding $type setres
162 assert_encoding $type setres
203 if {$type eq {intset}} {
289 test "SPOP basics - $type" {
291 assert_encoding $type myset
298 assert_encoding $type myset
303 test "SRANDMEMBER - $type" {
314 foreach {type contents} {
[all …]
/redis-3.2.3/tests/support/
H A Dutil.tcl1 proc randstring {min max {type binary}} {
4 if {$type eq {binary}} {
7 } elseif {$type eq {alpha}} {
10 } elseif {$type eq {compr}} {
148 proc findKeyWithType {r type} { argument
154 if {[{*}$r type $k] eq $type} {
187 set t [{*}$r type $k]
203 set t [{*}$r type $k]
268 set type [{*}$r type $k]
269 append o [csvstring $db] , [csvstring $k] , [csvstring $type] ,
[all …]
H A Dredis.tcl203 set type [read $fd 1]
204 switch -exact -- $type {
211 if {$type eq {}} {
215 return -code error "Bad protocol, '$type' as reply type byte"
225 proc ::redis::redis_call_callback {id type reply} {
265 "Bad protocol, $type as reply type byte"
/redis-3.2.3/tests/unit/
H A Dbitfield.tcl94 set type "i$bits"
97 set type "u$bits"
124 set res1 [r bitfield bits overflow fail set $type 0 $value]
125 set res2 [r bitfield bits overflow fail incrby $type 0 $increment]
129 fail "OW not detected where needed: $type $value+$increment"
133 fail "OW detected where NOT needed: $type $value+$increment"
146 set type "i$bits"
149 set type "u$bits"
171 r bitfield bits overflow wrap set $type 0 $value
172 r bitfield bits overflow wrap incrby $type 0 $increment
[all …]
H A Dscripting.tcl6 test {EVAL - Lua integer -> Redis protocol type conversion} {
10 test {EVAL - Lua string -> Redis protocol type conversion} {
64 test {EVAL - Redis integer -> Lua type conversion} {
68 return {type(foo),foo}
72 test {EVAL - Redis bulk -> Lua type conversion} {
76 return {type(foo),foo}
80 test {EVAL - Redis multi bulk -> Lua type conversion} {
87 return {type(foo),foo[1],foo[2],foo[3],# foo}
94 return {type(foo),foo['ok']}
102 return {type(foo),foo['err']}
[all …]
/redis-3.2.3/tests/sentinel/tests/includes/
H A Dinit-tests.tcl4 foreach type {redis sentinel} {
5 foreach_${type}_id id {
6 if {[get_instance_attrib $type $id pid] == -1} {
7 puts -nonewline "$type/$id "
9 restart_instance $type $id
/redis-3.2.3/tests/cluster/tests/includes/
H A Dinit-tests.tcl4 foreach type {redis} {
5 foreach_${type}_id id {
6 if {[get_instance_attrib $type $id pid] == -1} {
7 puts -nonewline "$type/$id "
9 restart_instance $type $id
/redis-3.2.3/deps/lua/src/
H A Dlua_cjson.c143 json_token_type_t type; member
880 token->type = T_ERROR; in json_set_token_error()
941 token->type = T_STRING; in json_next_string_token()
1000 token->type = T_NUMBER; in json_next_number_token()
1038 if (token->type == T_END) { in json_next_token()
1065 token->type = T_BOOLEAN; in json_next_token()
1070 token->type = T_BOOLEAN; in json_next_token()
1075 token->type = T_NULL; in json_next_token()
1106 if (token->type == T_ERROR) in json_throw_parse_error()
1227 switch (token->type) { in json_process_value()
[all …]

123