| /redis-3.2.3/tests/support/ |
| H A D | redis.tcl | 46 set ::redis::fd($id) $fd 73 if {$fd eq {}} { 109 fileevent $fd readable [list ::redis::redis_readable $fd $id] 135 flush $fd 139 catch {close $fd} 152 return $fd 164 redis_write $fd $buf 165 redis_write $fd "\r\n" 166 flush $fd 203 set type [read $fd 1] [all …]
|
| H A D | server.tcl | 16 set fd [open $stderr] 17 set buf [read $fd] 18 close $fd 95 set fd [socket $host $port] 96 fconfigure $fd -translation binary 97 puts $fd "PING\r\n" 98 flush $fd 99 set reply [gets $fd] 104 close $fd
|
| /redis-3.2.3/tests/integration/ |
| H A D | redis-cli.tcl | 9 set _ $fd 12 proc close_cli {fd} { 13 close $fd 16 proc read_cli {fd} { 17 set buf [read $fd] 27 puts $fd $buf 28 flush $fd 33 write_cli $fd $cmd 41 set fd [open_cli] 43 close_cli $fd [all …]
|
| H A D | replication-3.tcl | 22 set fd [open /tmp/repldump1.txt w] 23 puts -nonewline $fd $csv1 24 close $fd 25 set fd [open /tmp/repldump2.txt w] 26 puts -nonewline $fd $csv2 27 close $fd 83 set fd [open /tmp/repldump1.txt w] 84 puts -nonewline $fd $csv1 85 close $fd 87 puts -nonewline $fd $csv2 [all …]
|
| H A D | rdb.tcl | 82 set fd [open [file join $server_path dump.rdb] r+] 83 fconfigure $fd -translation binary 84 seek $fd -8 end 85 puts -nonewline $fd "foobar00"; # Corrupt the checksum 86 close $fd
|
| H A D | replication-2.tcl | 75 set fd [open /tmp/repldump1.txt w] 76 puts -nonewline $fd $csv1 77 close $fd 78 set fd [open /tmp/repldump2.txt w] 79 puts -nonewline $fd $csv2 80 close $fd
|
| H A D | replication-psync.tcl | 93 set fd [open /tmp/repldump1.txt w] 94 puts -nonewline $fd $csv1 95 close $fd 96 set fd [open /tmp/repldump2.txt w] 97 puts -nonewline $fd $csv2 98 close $fd
|
| /redis-3.2.3/src/ |
| H A D | anet.h | 58 int anetRead(int fd, char *buf, int count); 66 int anetWrite(int fd, char *buf, int count); 67 int anetNonBlock(char *err, int fd); 68 int anetBlock(char *err, int fd); 69 int anetEnableTcpNoDelay(char *err, int fd); 70 int anetDisableTcpNoDelay(char *err, int fd); 71 int anetTcpKeepAlive(char *err, int fd); 72 int anetSendTimeout(char *err, int fd, long long ms); 74 int anetKeepAlive(char *err, int fd, int interval); 77 int anetFormatPeer(int fd, char *fmt, size_t fmt_len); [all …]
|
| H A D | anet.c | 85 return anetSetBlock(err,fd,1); in anetNonBlock() 88 int anetBlock(char *err, int fd) { in anetBlock() argument 89 return anetSetBlock(err,fd,0); in anetBlock() 529 int fd; in anetGenericAccept() local 531 fd = accept(s,sa,len); in anetGenericAccept() 532 if (fd == -1) { in anetGenericAccept() 542 return fd; in anetGenericAccept() 546 int fd; in anetTcpAccept() local 561 return fd; in anetTcpAccept() 565 int fd; in anetUnixAccept() local [all …]
|
| H A D | ae_evport.c | 109 static int aeApiLookupPending(aeApiState *state, int fd) { in aeApiLookupPending() argument 113 if (state->pending_fds[i] == fd) in aeApiLookupPending() 135 rv = port_associate(portfd, PORT_SOURCE_FD, fd, events, in aeApiAssociate() 152 static int aeApiAddEvent(aeEventLoop *eventLoop, int fd, int mask) { in aeApiAddEvent() argument 164 fullmask = mask | eventLoop->events[fd].mask; in aeApiAddEvent() 165 pfd = aeApiLookupPending(state, fd); in aeApiAddEvent() 188 fprintf(stderr, "del fd %d mask 0x%x\n", fd, mask); in aeApiDelEvent() 190 pfd = aeApiLookupPending(state, fd); in aeApiDelEvent() 217 fullmask = eventLoop->events[fd].mask; in aeApiDelEvent() 230 } else if (aeApiAssociate("aeApiDelEvent", state->portfd, fd, in aeApiDelEvent() [all …]
|
| H A D | ae_epoll.c | 73 static int aeApiAddEvent(aeEventLoop *eventLoop, int fd, int mask) { in aeApiAddEvent() argument 78 int op = eventLoop->events[fd].mask == AE_NONE ? in aeApiAddEvent() 82 mask |= eventLoop->events[fd].mask; /* Merge old events */ in aeApiAddEvent() 85 ee.data.fd = fd; in aeApiAddEvent() 86 if (epoll_ctl(state->epfd,op,fd,&ee) == -1) return -1; in aeApiAddEvent() 90 static void aeApiDelEvent(aeEventLoop *eventLoop, int fd, int delmask) { in aeApiDelEvent() argument 93 int mask = eventLoop->events[fd].mask & (~delmask); in aeApiDelEvent() 98 ee.data.fd = fd; in aeApiDelEvent() 100 epoll_ctl(state->epfd,EPOLL_CTL_MOD,fd,&ee); in aeApiDelEvent() 104 epoll_ctl(state->epfd,EPOLL_CTL_DEL,fd,&ee); in aeApiDelEvent() [all …]
|
| H A D | ae.c | 138 if (fd >= eventLoop->setsize) { in aeCreateFileEvent() 142 aeFileEvent *fe = &eventLoop->events[fd]; in aeCreateFileEvent() 150 if (fd > eventLoop->maxfd) in aeCreateFileEvent() 151 eventLoop->maxfd = fd; in aeCreateFileEvent() 157 if (fd >= eventLoop->setsize) return; in aeDeleteFileEvent() 158 aeFileEvent *fe = &eventLoop->events[fd]; in aeDeleteFileEvent() 161 aeApiDelEvent(eventLoop, fd, mask); in aeDeleteFileEvent() 174 if (fd >= eventLoop->setsize) return 0; in aeGetFileEvents() 175 aeFileEvent *fe = &eventLoop->events[fd]; in aeGetFileEvents() 404 int fd = eventLoop->fired[j].fd; in aeProcessEvents() local [all …]
|
| H A D | syncio.c | 49 ssize_t syncWrite(int fd, char *ptr, ssize_t size, long long timeout) { in syncWrite() argument 61 nwritten = write(fd,ptr,size); in syncWrite() 71 aeWait(fd,AE_WRITABLE,wait); in syncWrite() 85 ssize_t syncRead(int fd, char *ptr, ssize_t size, long long timeout) { in syncRead() argument 98 nread = read(fd,ptr,size); in syncRead() 110 aeWait(fd,AE_READABLE,wait); in syncRead() 125 ssize_t syncReadLine(int fd, char *ptr, ssize_t size, long long timeout) { in syncReadLine() argument 132 if (syncRead(fd,&c,1,timeout) == -1) return -1; in syncReadLine()
|
| H A D | ae_select.c | 62 static int aeApiAddEvent(aeEventLoop *eventLoop, int fd, int mask) { in aeApiAddEvent() argument 65 if (mask & AE_READABLE) FD_SET(fd,&state->rfds); in aeApiAddEvent() 66 if (mask & AE_WRITABLE) FD_SET(fd,&state->wfds); in aeApiAddEvent() 70 static void aeApiDelEvent(aeEventLoop *eventLoop, int fd, int mask) { in aeApiDelEvent() argument 73 if (mask & AE_READABLE) FD_CLR(fd,&state->rfds); in aeApiDelEvent() 74 if (mask & AE_WRITABLE) FD_CLR(fd,&state->wfds); in aeApiDelEvent() 96 eventLoop->fired[numevents].fd = j; in aeApiPoll()
|
| H A D | ae.h | 59 typedef void aeFileProc(struct aeEventLoop *eventLoop, int fd, void *clientData, int mask); 85 int fd; member 107 int aeCreateFileEvent(aeEventLoop *eventLoop, int fd, int mask, 109 void aeDeleteFileEvent(aeEventLoop *eventLoop, int fd, int mask); 110 int aeGetFileEvents(aeEventLoop *eventLoop, int fd); 116 int aeWait(int fd, int mask, long long milliseconds);
|
| H A D | replication.c | 1061 nread = read(fd,buf,readlen); in readSyncBulkPayload() 1189 va_start(ap,fd); in sendSynchronousCommand() 1398 close(fd); in syncWithMaster() 1628 strerror(errno),fd); in syncWithMaster() 1643 close(fd); in syncWithMaster() 1655 int fd; in connectWithMaster() local 1659 if (fd == -1) { in connectWithMaster() 1668 close(fd); in connectWithMaster() 1674 server.repl_transfer_s = fd; in connectWithMaster() 1687 close(fd); in undoConnectWithMaster() [all …]
|
| H A D | ae_kqueue.c | 75 static int aeApiAddEvent(aeEventLoop *eventLoop, int fd, int mask) { in aeApiAddEvent() argument 80 EV_SET(&ke, fd, EVFILT_READ, EV_ADD, 0, 0, NULL); in aeApiAddEvent() 84 EV_SET(&ke, fd, EVFILT_WRITE, EV_ADD, 0, 0, NULL); in aeApiAddEvent() 90 static void aeApiDelEvent(aeEventLoop *eventLoop, int fd, int mask) { in aeApiDelEvent() argument 95 EV_SET(&ke, fd, EVFILT_READ, EV_DELETE, 0, 0, NULL); in aeApiDelEvent() 99 EV_SET(&ke, fd, EVFILT_WRITE, EV_DELETE, 0, 0, NULL); in aeApiDelEvent() 129 eventLoop->fired[j].fd = e->ident; in aeApiPoll()
|
| /redis-3.2.3/tests/ |
| H A D | test_helper.tcl | 230 fileevent $fd readable [list read_from_test_client $fd] 246 proc read_from_test_client fd { argument 247 set bytes [gets $fd] 248 set payload [read $fd $bytes] 256 signal_idle_client $fd 264 signal_idle_client $fd 321 proc signal_idle_client fd { argument 332 set ::active_clients_task($fd) "ASSIGNED: $fd ([lindex $::all_tests $::next_test])" 339 lappend ::idle_clients $fd 390 puts -nonewline $fd $payload [all …]
|
| /redis-3.2.3/deps/hiredis/adapters/ |
| H A D | ae.h | 41 int fd; member 45 static void redisAeReadEvent(aeEventLoop *el, int fd, void *privdata, int mask) { in redisAeReadEvent() argument 46 ((void)el); ((void)fd); ((void)mask); in redisAeReadEvent() 52 static void redisAeWriteEvent(aeEventLoop *el, int fd, void *privdata, int mask) { in redisAeWriteEvent() argument 53 ((void)el); ((void)fd); ((void)mask); in redisAeWriteEvent() 64 aeCreateFileEvent(loop,e->fd,AE_READABLE,redisAeReadEvent,e); in redisAeAddRead() 73 aeDeleteFileEvent(loop,e->fd,AE_READABLE); in redisAeDelRead() 82 aeCreateFileEvent(loop,e->fd,AE_WRITABLE,redisAeWriteEvent,e); in redisAeAddWrite() 91 aeDeleteFileEvent(loop,e->fd,AE_WRITABLE); in redisAeDelWrite() 114 e->fd = c->fd; in redisAeAttach()
|
| H A D | libevent.h | 42 static void redisLibeventReadEvent(int fd, short event, void *arg) { in redisLibeventReadEvent() argument 43 ((void)fd); ((void)event); in redisLibeventReadEvent() 48 static void redisLibeventWriteEvent(int fd, short event, void *arg) { in redisLibeventWriteEvent() argument 49 ((void)fd); ((void)event); in redisLibeventWriteEvent() 102 event_set(&e->rev,c->fd,EV_READ,redisLibeventReadEvent,e); in redisLibeventAttach() 103 event_set(&e->wev,c->fd,EV_WRITE,redisLibeventWriteEvent,e); in redisLibeventAttach()
|
| /redis-3.2.3/deps/hiredis/ |
| H A D | net.c | 58 if (c && c->fd >= 0) { in redisContextCloseFd() 59 close(c->fd); in redisContextCloseFd() 60 c->fd = -1; in redisContextCloseFd() 90 c->fd = s; in redisCreateSocket() 105 if ((flags = fcntl(c->fd, F_GETFL)) == -1) { in redisSetBlocking() 116 if (fcntl(c->fd, F_SETFL, flags) == -1) { in redisSetBlocking() 126 int fd = c->fd; in redisKeepAlive() local 183 wfd[0].fd = c->fd; in redisContextWaitReady() 230 if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, &err, &errlen) == -1) { in redisCheckSocketError() 285 c->fd = s; in _redisContextConnectTcp() [all …]
|
| /redis-3.2.3/utils/ |
| H A D | corrupt_rdb.c | 16 int fd, cycles; in main() local 25 fd = open("dump.rdb",O_RDWR); in main() 26 if (fd == -1) { in main() 30 fstat(fd,&stat); in main() 39 lseek(fd,offset,SEEK_SET); in main() 41 write(fd,buf,writelen); in main()
|
| H A D | build-static-symbols.tcl | 7 set fd [open redis.c] 9 while {[gets $fd line] != -1} { 22 close $fd
|
| /redis-3.2.3/deps/jemalloc/test/unit/ |
| H A D | prof_idump.c | 14 int fd; in prof_dump_open_intercept() local 18 fd = open("/dev/null", O_WRONLY); in prof_dump_open_intercept() 19 assert_d_ne(fd, -1, "Unexpected open() failure"); in prof_dump_open_intercept() 21 return (fd); in prof_dump_open_intercept()
|
| /redis-3.2.3/tests/unit/ |
| H A D | other.tcl | 74 set fd [open /tmp/repldump1.txt w] 75 puts $fd $dump 76 close $fd 78 puts $fd $newdump 79 close $fd 97 set fd [open /tmp/aofdump1.txt w] 98 puts $fd $dump 99 close $fd 100 set fd [open /tmp/aofdump2.txt w] 101 puts $fd $newdump [all …]
|