}
}
-void aeMain(aeEventLoop *eventLoop)
-{
+void aeMain(aeEventLoop *eventLoop) {
eventLoop->stop = 0;
while (!eventLoop->stop)
aeProcessEvents(eventLoop, AE_ALL_EVENTS);
}
+
+char *aeGetApiName(void) {
+ return aeApiName();
+}
int aeProcessEvents(aeEventLoop *eventLoop, int flags);
int aeWait(int fd, int mask, long long milliseconds);
void aeMain(aeEventLoop *eventLoop);
+char *aeGetApiName(void);
#endif
}
return numevents;
}
+
+static char *aeApiName(void) {
+ return "epoll";
+}
}
return numevents;
}
+
+static char *aeApiName(void) {
+ return "kqueue";
+}
}
return numevents;
}
+
+static char *aeApiName(void) {
+ return "select";
+}
#define HAVE_EPOLL 1
#endif
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined (__NetBSD__)
#define HAVE_KQUEUE 1
#endif
info = sdscatprintf(sdsempty(),
"redis_version:%s\r\n"
"arch_bits:%s\r\n"
+ "multiplexing_api:%s\r\n"
"uptime_in_seconds:%d\r\n"
"uptime_in_days:%d\r\n"
"connected_clients:%d\r\n"
"role:%s\r\n"
,REDIS_VERSION,
(sizeof(long) == 8) ? "64" : "32",
+ aeGetApiName(),
uptime,
uptime/(3600*24),
listLength(server.clients)-listLength(server.slaves),
-# TODO # test pipelining
+# test-redis.tcl
+# Redis test suite. Copyright (C) 2009 Salvatore Sanfilippo antirez@gmail.com
+# This softare is released under the BSD License. See the COPYING file for
+# more information.
set tcl_precision 17
source redis.tcl