diff options
Diffstat (limited to 'buffer_iocp.c')
-rw-r--r-- | buffer_iocp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/buffer_iocp.c b/buffer_iocp.c index 5071a9db..b52f84d6 100644 --- a/buffer_iocp.c +++ b/buffer_iocp.c @@ -111,7 +111,7 @@ pin_release(struct event_overlapped *eo, unsigned flag) /** IOCP callback invoked when a read operation is finished. */ static void -read_completed(struct event_overlapped *eo, uintptr_t _, ev_ssize_t nBytes) +read_completed(struct event_overlapped *eo, uintptr_t _, ev_ssize_t nBytes, int ok) { struct buffer_overlapped *buf_o = upcast_overlapped(eo); struct evbuffer_overlapped *buf = buf_o->buf; @@ -120,6 +120,8 @@ read_completed(struct event_overlapped *eo, uintptr_t _, ev_ssize_t nBytes) struct evbuffer_iovec iov[2]; int n_vec; + // XXXX use ok + EVBUFFER_LOCK(evbuf, EVTHREAD_WRITE); buf->read_in_progress = 0; evbuffer_unfreeze(evbuf, 0); @@ -145,8 +147,9 @@ read_completed(struct event_overlapped *eo, uintptr_t _, ev_ssize_t nBytes) /** IOCP callback invoked when a write operation is finished. */ static void -write_completed(struct event_overlapped *eo, uintptr_t _, ev_ssize_t nBytes) +write_completed(struct event_overlapped *eo, uintptr_t _, ev_ssize_t nBytes, int ok) { + // XXX use ok struct buffer_overlapped *buf_o = upcast_overlapped(eo); struct evbuffer_overlapped *buf = buf_o->buf; |