forked from OpenAtomFoundation/pikiwidb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
381 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
#ifndef __TICK_EPOLL_H__ | ||
#define __TICK_EPOLL_H__ | ||
#ifndef __PIKA_EPOLL_H__ | ||
#define __PIKA_EPOLL_H__ | ||
#include "sys/epoll.h" | ||
#include "status.h" | ||
|
||
typedef struct TickFiredEvent { | ||
typedef struct PikaFiredEvent { | ||
int fd_; | ||
int mask_; | ||
}TickFiredEvent; | ||
}PikaFiredEvent; | ||
|
||
class TickEpoll | ||
class PikaEpoll | ||
{ | ||
|
||
public: | ||
TickEpoll(); | ||
~TickEpoll(); | ||
Status TickAddEvent(int fd, int mask); | ||
void TickDelEvent(int fd); | ||
Status TickModEvent(int fd, int oMask, int mask); | ||
PikaEpoll(); | ||
~PikaEpoll(); | ||
Status PikaAddEvent(int fd, int mask); | ||
void PikaDelEvent(int fd); | ||
Status PikaModEvent(int fd, int oMask, int mask); | ||
|
||
int TickPoll(); | ||
int PikaPoll(); | ||
|
||
TickFiredEvent *firedevent() { return firedevent_; } | ||
PikaFiredEvent *firedevent() { return firedevent_; } | ||
|
||
private: | ||
|
||
int epfd_; | ||
struct epoll_event *events_; | ||
int timeout_; | ||
TickFiredEvent *firedevent_; | ||
PikaFiredEvent *firedevent_; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.