Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change return value of aeTimeProc callback function to long long. #1057

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ae.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ static int processTimeEvents(aeEventLoop *eventLoop) {
}

if (te->when <= now) {
int retval;
long long retval;

id = te->id;
te->refcount++;
Expand Down
2 changes: 1 addition & 1 deletion src/ae.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct aeEventLoop;

/* Types and data structures */
typedef void aeFileProc(struct aeEventLoop *eventLoop, int fd, void *clientData, int mask);
typedef int aeTimeProc(struct aeEventLoop *eventLoop, long long id, void *clientData);
typedef long long aeTimeProc(struct aeEventLoop *eventLoop, long long id, void *clientData);
typedef void aeEventFinalizerProc(struct aeEventLoop *eventLoop, void *clientData);
typedef void aeBeforeSleepProc(struct aeEventLoop *eventLoop);
typedef void aeAfterSleepProc(struct aeEventLoop *eventLoop, int numevents);
Expand Down
2 changes: 1 addition & 1 deletion src/evict.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ int overMaxmemoryAfterAlloc(size_t moremem) {
* eviction cycles until the "maxmemory" condition has resolved or there are no
* more evictable items. */
static int isEvictionProcRunning = 0;
static int evictionTimeProc(struct aeEventLoop *eventLoop, long long id, void *clientData) {
static long long evictionTimeProc(struct aeEventLoop *eventLoop, long long id, void *clientData) {
UNUSED(eventLoop);
UNUSED(id);
UNUSED(clientData);
Expand Down
2 changes: 1 addition & 1 deletion src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -9114,7 +9114,7 @@ typedef struct ValkeyModuleTimer {

/* This is the timer handler that is called by the main event loop. We schedule
* this timer to be called when the nearest of our module timers will expire. */
int moduleTimerHandler(struct aeEventLoop *eventLoop, long long id, void *clientData) {
long long moduleTimerHandler(struct aeEventLoop *eventLoop, long long id, void *clientData) {
UNUSED(eventLoop);
UNUSED(id);
UNUSED(clientData);
Expand Down
2 changes: 1 addition & 1 deletion src/rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ static void connRdmaEventHandler(struct aeEventLoop *el, int fd, void *clientDat
}
}

static int rdmaKeepaliveTimeProc(struct aeEventLoop *el, long long id, void *clientData) {
static long long rdmaKeepaliveTimeProc(struct aeEventLoop *el, long long id, void *clientData) {
struct rdma_cm_id *cm_id = clientData;
RdmaContext *ctx = cm_id->context;
connection *conn = ctx->conn;
Expand Down
2 changes: 1 addition & 1 deletion src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ void cronUpdateMemoryStats(void) {
* a macro is used: run_with_period(milliseconds) { .... }
*/

int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
long long serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
int j;
UNUSED(eventLoop);
UNUSED(id);
Expand Down
4 changes: 2 additions & 2 deletions src/valkey-benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static redisContext *getRedisContext(const char *ip, int port, const char *hosts
static void freeServerConfig(serverConfig *cfg);
static int fetchClusterSlotsConfiguration(client c);
static void updateClusterSlotsConfiguration(void);
int showThroughput(struct aeEventLoop *eventLoop, long long id, void *clientData);
static long long showThroughput(struct aeEventLoop *eventLoop, long long id, void *clientData);

/* Dict callbacks */
static uint64_t dictSdsHash(const void *key);
Expand Down Expand Up @@ -1607,7 +1607,7 @@ tls_usage,
exit(exit_status);
}

int showThroughput(struct aeEventLoop *eventLoop, long long id, void *clientData) {
long long showThroughput(struct aeEventLoop *eventLoop, long long id, void *clientData) {
UNUSED(eventLoop);
UNUSED(id);
benchmarkThread *thread = (benchmarkThread *)clientData;
Expand Down
Loading