Home
last modified time | relevance | path

Searched refs:n (Results 1 – 25 of 102) sorted by relevance

12345

/redis-3.2.3/src/
H A Dredis-trib.rb325 return n if n.info[:name] == name.downcase
349 masters = @nodes.select{|n| n.has_flag? "master"}
369 … puts "#{n} (#{n.info[:name][0...8]}...) -> #{n.r.dbsize} keys | #{n.slots.length} slots | "+
673 ips[n.info[:host]] = [] if !ips[n.info[:host]]
674 ips[n.info[:host]] << n
890 n = n.ceil
892 n = n.floor
1012 n.info[:w] = weights[n.info[:name]] ? weights[n.info[:name]] : 1
1035 n.info[:balance] = n.slots.length - expected
1058 n.has_flag?("master") && n.info[:w]
[all …]
H A Dpqsort.c73 swapcode(long, a, b, n) in swapfunc()
75 swapcode(char, a, b, n) in swapfunc()
86 #define vecswap(a, b, n) if ((n) > 0) swapfunc((a), (b), (size_t)(n), swaptype) argument
107 if (n < 7) { in _pqsort()
114 pm = (char *) a + (n / 2) * es; in _pqsort()
115 if (n > 7) { in _pqsort()
117 pn = (char *) a + (n - 1) * es; in _pqsort()
118 if (n > 40) { in _pqsort()
119 d = (n / 8) * es; in _pqsort()
152 pn = (char *) a + n * es; in _pqsort()
[all …]
H A Dcluster.h60 #define nodeIsMaster(n) ((n)->flags & CLUSTER_NODE_MASTER) argument
61 #define nodeIsSlave(n) ((n)->flags & CLUSTER_NODE_SLAVE) argument
62 #define nodeInHandshake(n) ((n)->flags & CLUSTER_NODE_HANDSHAKE) argument
63 #define nodeHasAddr(n) (!((n)->flags & CLUSTER_NODE_NOADDR)) argument
64 #define nodeWithoutAddr(n) ((n)->flags & CLUSTER_NODE_NOADDR) argument
65 #define nodeTimedOut(n) ((n)->flags & CLUSTER_NODE_PFAIL) argument
66 #define nodeFailed(n) ((n)->flags & CLUSTER_NODE_FAIL) argument
259 void clusterRedirectClient(client *c, clusterNode *n, int hashslot, int error_code);
/redis-3.2.3/deps/lua/src/
H A Dlua_bit.c48 lua_Number n; member
62 bn.n = lua_tonumber(L, idx); in barg()
79 b = (UBits)(SBits)bn.n; in barg()
106 #define bshl(b, n) (b << n) argument
107 #define bshr(b, n) (b >> n) argument
108 #define bsar(b, n) ((SBits)b >> n) argument
109 #define brol(b, n) ((b << n) | (b >> (32-n))) argument
110 #define bror(b, n) ((b << (32-n)) | (b >> n)) argument
113 UBits b = barg(L, 1); UBits n = barg(L, 2) & 31; BRET(fn(b, n)) }
134 if (n < 0) { n = -n; hexdigits = "0123456789ABCDEF"; } in bit_tohex()
[all …]
H A Dlzio.c29 z->n = size - 1; in luaZ_fill()
36 if (z->n == 0) { in luaZ_lookahead()
52 z->n = 0; in luaZ_init()
58 size_t luaZ_read (ZIO *z, void *b, size_t n) { in luaZ_read() argument
59 while (n) { in luaZ_read()
63 m = (n <= z->n) ? n : z->n; /* min. between n and z->n */ in luaZ_read()
65 z->n -= m; in luaZ_read()
68 n -= m; in luaZ_read()
75 if (n > buff->buffsize) { in luaZ_openspace()
76 if (n < LUA_MINBUFFER) n = LUA_MINBUFFER; in luaZ_openspace()
[all …]
H A Dlundump.c43 #define LoadMem(S,b,n,size) LoadBlock(S,b,(n)*(size)) argument
46 #define LoadVector(S,b,n,size) LoadMem(S,b,n,size) argument
94 f->sizecode=n; in LoadCode()
102 int i,n; in LoadConstants() local
103 n=LoadInt(S); in LoadConstants()
105 f->sizek=n; in LoadConstants()
130 n=LoadInt(S); in LoadConstants()
132 f->sizep=n; in LoadConstants()
139 int i,n; in LoadDebug() local
140 n=LoadInt(S); in LoadDebug()
[all …]
H A Dltable.c50 #define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t)))) argument
60 #define hashmod(t,n) (gnode(t, ((n) % ((sizenode(t)-1)|1)))) argument
154 else n = gnext(n); in findindex()
205 *narray = n; in computesizes()
422 mp = n; in newkey()
445 else n = gnext(n); in luaH_getnum()
458 if (ttisstring(gkey(n)) && rawtsvalue(gkey(n)) == key) in luaH_getstr()
460 else n = gnext(n); in luaH_getstr()
461 } while (n); in luaH_getstr()
486 else n = gnext(n); in luaH_get()
[all …]
H A Dlua_cmsgpack.c35 #define lua_pushunsigned(L, n) lua_pushnumber(L, n) argument
37 #define lua_pushunsigned(L, n) lua_pushinteger(L, n) argument
225 if (n >= 0) { in mp_encode_int()
226 if (n <= 127) { in mp_encode_int()
258 if (n >= -32) { in mp_encode_int()
297 if (n <= 15) { in mp_encode_array()
303 b[2] = n & 0xff; in mp_encode_array()
320 if (n <= 15) { in mp_encode_map()
426 lua_Number n; in table_is_an_array() local
428 lua_Integer n; in table_is_an_array() local
[all …]
H A Dldump.c26 #define DumpMem(b,n,size,D) DumpBlock(b,(n)*(size),D) argument
57 DumpInt(n,D); in DumpVector()
58 DumpMem(b,n,size,D); in DumpVector()
82 int i,n=f->sizek; in DumpConstants() local
83 DumpInt(n,D); in DumpConstants()
84 for (i=0; i<n; i++) in DumpConstants()
106 n=f->sizep; in DumpConstants()
107 DumpInt(n,D); in DumpConstants()
113 int i,n; in DumpDebug() local
117 DumpInt(n,D); in DumpDebug()
[all …]
H A Dlua.h241 LUA_API void (lua_concat) (lua_State *L, int n);
254 #define lua_pop(L,n) lua_settop(L, -(n)-1) argument
258 #define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n))) argument
264 #define lua_isfunction(L,n) (lua_type(L, (n)) == LUA_TFUNCTION) argument
265 #define lua_istable(L,n) (lua_type(L, (n)) == LUA_TTABLE) argument
266 #define lua_islightuserdata(L,n) (lua_type(L, (n)) == LUA_TLIGHTUSERDATA) argument
267 #define lua_isnil(L,n) (lua_type(L, (n)) == LUA_TNIL) argument
268 #define lua_isboolean(L,n) (lua_type(L, (n)) == LUA_TBOOLEAN) argument
269 #define lua_isthread(L,n) (lua_type(L, (n)) == LUA_TTHREAD) argument
270 #define lua_isnone(L,n) (lua_type(L, (n)) == LUA_TNONE) argument
[all …]
H A Dlauxlib.h20 LUALIB_API void (luaL_setn) (lua_State *L, int t, int n);
102 #define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL)) argument
103 #define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL)) argument
104 #define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) argument
105 #define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d))) argument
106 #define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n))) argument
107 #define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, (n), (d))) argument
117 #define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) argument
119 #define luaL_opt(L,f,n,d) (lua_isnoneornil(L,(n)) ? (d) : f(L,(n))) argument
143 #define luaL_addsize(B,n) ((B)->p += (n)) argument
H A Dltable.h14 #define gkey(n) (&(n)->i_key.nk) argument
15 #define gval(n) (&(n)->i_val) argument
16 #define gnext(n) ((n)->i_key.nk.next) argument
18 #define key2tval(n) (&(n)->i_key.tvk) argument
36 LUAI_FUNC int luaH_isdummy (Node *n);
H A Dlmem.h19 #define luaM_reallocv(L,b,on,n,e) \ argument
20 ((cast(size_t, (n)+1) <= MAX_SIZET/(e)) ? /* +1 to avoid warnings */ \
21 luaM_realloc_(L, (b), (on)*(e), (n)*(e)) : \
26 #define luaM_freearray(L, b, n, t) luaM_reallocv(L, (b), n, 0, sizeof(t)) argument
30 #define luaM_newvector(L,n,t) \ argument
31 cast(t *, luaM_reallocv(L, NULL, 0, n, sizeof(t)))
37 #define luaM_reallocvector(L, v,oldn,n,t) \ argument
38 ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t))))
H A Dprint.c26 size_t i,n=ts->tsv.len; in PrintString() local
28 for (i=0; i<n; i++) in PrintString()
77 int pc,n=f->sizecode; in PrintCode() local
78 for (pc=0; pc<n; pc++) in PrintCode()
183 int i,n=f->sizek; in PrintConstants() local
185 for (i=0; i<n; i++) in PrintConstants()
195 int i,n=f->sizelocvars; in PrintLocals() local
197 for (i=0; i<n; i++) in PrintLocals()
206 int i,n=f->sizeupvalues; in PrintUpvalues() local
209 for (i=0; i<n; i++) in PrintUpvalues()
[all …]
H A Dldo.h16 #define luaD_checkstack(L,n) \ argument
17 if ((char *)L->stack_last - (char *)L->top <= (n)*(int)sizeof(TValue)) \
18 luaD_growstack(L, n); \
25 #define restorestack(L,n) ((TValue *)((char *)L->stack + (n))) argument
28 #define restoreci(L,n) ((CallInfo *)((char *)L->base_ci + (n))) argument
49 LUAI_FUNC void luaD_growstack (lua_State *L, int n);
H A Dlzio.h22 #define zgetc(z) (((z)->n--)>0 ? char2int(*(z)->p++) : luaZ_fill(z))
26 size_t n; member
34 #define luaZ_bufflen(buff) ((buff)->n)
36 #define luaZ_resetbuffer(buff) ((buff)->n = 0)
46 LUAI_FUNC char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n);
49 LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */
57 size_t n; /* bytes still unread */ member
H A Dlapi.c41 #define api_checknelems(L, n) api_check(L, (n) <= (L->top - L->base)) argument
117 from->top -= n; in lua_xmove()
261 TValue n; in lua_isnumber() local
314 TValue n; in lua_tonumber() local
324 TValue n; in lua_tointeger() local
493 L->top -= n; in lua_pushcclosure()
494 while (n--) in lua_pushcclosure()
495 setobj2n(L, &cl->c.upvalue[n], L->top+n); in lua_pushcclosure()
993 if (n >= 2) { in lua_concat()
1044 if (!(1 <= n && n <= f->c.nupvalues)) return NULL; in aux_upvalue()
[all …]
/redis-3.2.3/deps/lua/test/
H A Dsieve.lua5 function gen (n)
7 for i=2,n do coroutine.yield(i) end
15 local n = g()
16 if n == nil then return end
17 if math.mod(n, p) ~= 0 then coroutine.yield(n) end
25 local n = x() -- pick a number until done
26 if n == nil then break end
27 print(n) -- must be a prime number
28 x = filter(n, x) -- now remove its multiples
H A Dfib.lua4 function fib(n)
6 if n<2 then
7 return n
9 return fib(n-1)+fib(n-2)
30 local v=f(n)
32 print(s,n,v,t,N)
35 n=arg[1] or 24 -- for other values, do lua fib.lua XX
36 n=tonumber(n)
H A Dsort.lua27 function selectionsort(x,n,f)
29 while i<=n do
31 while j<=n do
52 local n=1
53 while x[n] do n=n+1 end; n=n-1 -- count elements
55 qsort(x,1,n,function (x,y) return x<y end)
57 selectionsort(x,n,function (x,y) return x>y end)
59 qsort(x,1,n,function (x,y) return x<y end)
H A Dfactorial.lua17 return function (n)
18 if n == 0 then return 1
19 else return n*f(n-1) end
30 for n=0,16 do
31 test(n)
/redis-3.2.3/deps/lua/etc/
H A Dstrict.lua24 mt.__newindex = function (t, n, v)
25 if not mt.__declared[n] then
28 error("assign to undeclared variable '"..n.."'", 2)
30 mt.__declared[n] = true
32 rawset(t, n, v)
35 mt.__index = function (t, n)
36 if not mt.__declared[n] and what() ~= "C" then
37 error("variable '"..n.."' is not declared", 2)
39 return rawget(t, n)
/redis-3.2.3/deps/jemalloc/test/src/
H A Dtimer.c61 int n; in timer_ratio() local
64 n = malloc_snprintf(&buf[i], buflen-i, "%"FMTu64, t0 / t1); in timer_ratio()
65 i += n; in timer_ratio()
69 for (j = 0; j < n; j++) in timer_ratio()
73 n = malloc_snprintf(&buf[i], buflen-i, "."); in timer_ratio()
74 i += n; in timer_ratio()
80 n = malloc_snprintf(&buf[i], buflen-i, in timer_ratio()
82 i += n; in timer_ratio()
/redis-3.2.3/tests/cluster/
H A Dcluster.tcl39 foreach n $nodes {
40 if {[has_flag $n myself]} {return $n}
46 proc CI {n field} {
47 get_info_field [R $n cluster info] $field
52 proc cluster_allocate_slots {n} { argument
56 set node [randomInt $n]
60 for {set j 0} {$j < $n} {incr j} {
/redis-3.2.3/deps/jemalloc/src/
H A Dstats.c4 #define CTL_GET(n, v, t) do { \ argument
6 xmallctl(n, v, &sz, NULL, 0); \
9 #define CTL_M2_GET(n, i, v, t) do { \ argument
13 xmallctlnametomib(n, mib, &miblen); \
22 xmallctlnametomib(n, mib, &miblen); \
442 #define OPT_WRITE_BOOL(n) \ in stats_print() argument
456 #define OPT_WRITE_SIZE_T(n) \ in stats_print() argument
459 " opt."#n": %zu\n", sv); \ in stats_print()
461 #define OPT_WRITE_SSIZE_T(n) \ in stats_print() argument
464 " opt."#n": %zd\n", ssv); \ in stats_print()
[all …]

12345