Commit e7ed3985 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Cater for the older kevent(2) API still in use on NetBSD

Fixes: #3642
parent 3c399b85
...@@ -113,11 +113,11 @@ vwk_thread(void *priv) ...@@ -113,11 +113,11 @@ vwk_thread(void *priv)
now = VTIM_real(); now = VTIM_real();
for (kp = ke, j = 0; j < n; j++, kp++) { for (kp = ke, j = 0; j < n; j++, kp++) {
assert(kp->filter == EVFILT_READ); assert(kp->filter == EVFILT_READ);
if (ke[j].udata == vwk) { if ((uintptr_t)ke[j].udata == (uintptr_t)vwk) {
assert(read(vwk->pipe[0], &c, 1) == 1); assert(read(vwk->pipe[0], &c, 1) == 1);
continue; continue;
} }
CAST_OBJ_NOTNULL(wp, ke[j].udata, WAITED_MAGIC); CAST_OBJ_NOTNULL(wp, (void*)ke[j].udata, WAITED_MAGIC);
Lck_Lock(&vwk->mtx); Lck_Lock(&vwk->mtx);
AN(Wait_HeapDelete(w, wp)); AN(Wait_HeapDelete(w, wp));
Lck_Unlock(&vwk->mtx); Lck_Unlock(&vwk->mtx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment