X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/621d5c1985a211662409976d7b49645cad55ea4e..d239ec5960350367a990ff04452924d06e8ee94b:/ae.h diff --git a/ae.h b/ae.h index 4e9503bc..a9db18ed 100644 --- a/ae.h +++ b/ae.h @@ -2,7 +2,7 @@ * for the Jim's event-loop (Jim is a Tcl interpreter) but later translated * it in form of a library for easy reuse. * - * Copyright (c) 2006-2009, Salvatore Sanfilippo + * Copyright (c) 2006-2010, Salvatore Sanfilippo * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -58,6 +58,7 @@ struct aeEventLoop; typedef void aeFileProc(struct aeEventLoop *eventLoop, int fd, void *clientData, int mask); typedef int aeTimeProc(struct aeEventLoop *eventLoop, long long id, void *clientData); typedef void aeEventFinalizerProc(struct aeEventLoop *eventLoop, void *clientData); +typedef void aeBeforeSleepProc(struct aeEventLoop *eventLoop); /* File event structure */ typedef struct aeFileEvent { @@ -93,6 +94,7 @@ typedef struct aeEventLoop { aeTimeEvent *timeEventHead; int stop; void *apidata; /* This is used for polling API specific data */ + aeBeforeSleepProc *beforesleep; } aeEventLoop; /* Prototypes */ @@ -110,5 +112,6 @@ int aeProcessEvents(aeEventLoop *eventLoop, int flags); int aeWait(int fd, int mask, long long milliseconds); void aeMain(aeEventLoop *eventLoop); char *aeGetApiName(void); +void aeSetBeforeSleepProc(aeEventLoop *eventLoop, aeBeforeSleepProc *beforesleep); #endif