adb: fdevent: delete FDE_CREATED.

All fdevents must be created by fdevent_create/fdevent_context::Create
now, so this flag is meaningless.

Test: none
Change-Id: I8489afad07bdb267ddfdb0dbb25d40d3a62f55f6
This commit is contained in:
Josh Gao 2019-07-08 17:57:30 -07:00
parent 95eef6b097
commit e546f6816e
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());