adb: fdevent: delete FDE_CREATED.

am: e546f6816e

Change-Id: I3f89664e32fe80af05e5ebc35d333533bfd97745
This commit is contained in:
Josh Gao 2019-07-09 13:37:32 -07:00 committed by android-build-merger
commit f46ca64f08
3 changed files with 0 additions and 9 deletions

View File

@ -33,9 +33,6 @@ std::string dump_fde(const fdevent* fde) {
if (fde->state & FDE_PENDING) {
state += "P";
}
if (fde->state & FDE_CREATED) {
state += "C";
}
if (fde->state & FDE_READ) {
state += "R";
}

View File

@ -43,7 +43,6 @@
#define FDE_ACTIVE 0x0100
#define FDE_PENDING 0x0200
#define FDE_CREATED 0x0400
typedef void (*fd_func)(int fd, unsigned events, void *userdata);
typedef void (*fd_func2)(struct fdevent* fde, unsigned events, void* userdata);

View File

@ -105,7 +105,6 @@ fdevent* fdevent_context_poll::Create(unique_fd fd, std::variant<fd_func, fd_fun
auto pair = poll_node_map_.emplace(fde->fd.get(), PollNode(fde));
CHECK(pair.second) << "install existing fd " << fde->fd.get();
fde->state |= FDE_CREATED;
return fde;
}
@ -115,10 +114,6 @@ unique_fd fdevent_context_poll::Destroy(fdevent* fde) {
return {};
}
if (!(fde->state & FDE_CREATED)) {
LOG(FATAL) << "destroying fde not created by fdevent_create(): " << dump_fde(fde);
}
unique_fd result = std::move(fde->fd);
if (fde->state & FDE_ACTIVE) {
poll_node_map_.erase(result.get());