Skip to content

Instantly share code, notes, and snippets.

@postwait
Created September 23, 2013 22:00
Show Gist options
  • Select an option

  • Save postwait/6677558 to your computer and use it in GitHub Desktop.

Select an option

Save postwait/6677558 to your computer and use it in GitHub Desktop.
net_activity(vc, thread);
// If there are no more bytes to write, signal write complete,
ink_assert(ntodo >= 0);
if (s->vio.ntodo() <= 0) {
write_signal_done(VC_EVENT_WRITE_COMPLETE, nh, vc);
return;
} else if (!signalled) {
if (write_signal_and_update(VC_EVENT_WRITE_READY, vc) != EVENT_CONT) {
return;
}
// change of lock... don't look at shared variables!
if (lock.m.m_ptr != s->vio.mutex.m_ptr) {
write_reschedule(nh, vc);
return;
}
}
if (!buf.reader()->read_avail()) {
write_disable(nh, vc);
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment