| 51 | } |
| 52 | |
| 53 | int |
| 54 | NetHandler::startIO(NetEvent *ne) |
| 55 | { |
| 56 | ink_assert(this->mutex->thread_holding == this_ethread()); |
| 57 | ink_assert(ne->get_thread() == this_ethread()); |
| 58 | int res = 0; |
| 59 | |
| 60 | PollDescriptor *pd = get_PollDescriptor(this->thread); |
| 61 | if (ne->ep.start(pd, ne, this, EVENTIO_READ | EVENTIO_WRITE) < 0) { |
| 62 | res = errno; |
| 63 | // EEXIST should be ok, though it should have been cleared before we got back here |
| 64 | if (errno != EEXIST) { |
| 65 | Dbg(dbg_ctl_iocore_net, "NetHandler::startIO : failed on EventIO::start, errno = [%d](%s)", errno, strerror(errno)); |
| 66 | return -res; |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | if (ne->read.triggered == 1) { |
| 71 | read_ready_list.enqueue(ne); |
| 72 | } |
| 73 | ne->nh = this; |
| 74 | return res; |
| 75 | } |
| 76 | |
| 77 | void |
| 78 | NetHandler::stopIO(NetEvent *ne) |
no test coverage detected