Skip to content

Commit

Permalink
Event: change id to idx
Browse files Browse the repository at this point in the history
Signed-off-by: Haomai Wang <[email protected]>
  • Loading branch information
yuyuyu101 committed Jun 29, 2016
1 parent ef7c3e3 commit cb58088
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/msg/async/Event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int EventCenter::init(int n, unsigned i)
// can't init multi times
assert(nevent == 0);

id = i;
idx = i;

#ifdef HAVE_EPOLL
driver = new EpollDriver(cct);
Expand Down Expand Up @@ -143,7 +143,7 @@ EventCenter::~EventCenter()

void EventCenter::set_owner()
{
centers[id] = local_center = this;
centers[idx] = local_center = this;
}

int EventCenter::create_file_event(int fd, int mask, EventCallbackRef ctxt)
Expand Down
6 changes: 3 additions & 3 deletions src/msg/async/Event.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class EventCenter {
int notify_send_fd;
NetHandler net;
EventCallbackRef notify_handler;
unsigned id = 10000;
unsigned idx = 10000;

int process_time_events();
FileEvent *_get_file_event(int fd) {
Expand All @@ -146,9 +146,9 @@ class EventCenter {
~EventCenter();
ostream& _event_prefix(std::ostream *_dout);

int init(int nevent, unsigned id);
int init(int nevent, unsigned idx);
void set_owner();
unsigned get_id() { return id; }
unsigned get_id() { return idx; }

// Used by internal thread
int create_file_event(int fd, int mask, EventCallbackRef ctxt);
Expand Down

0 comments on commit cb58088

Please sign in to comment.