summaryrefslogtreecommitdiff
path: root/accel-pppd/triton/triton.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-09-22 21:48:17 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-09-22 21:48:17 +0400
commitd36fc2b235ddaaa3fbb84a46ef520a0a207293df (patch)
tree075126d1a4a0e133dde1ff55e6403334799c0202 /accel-pppd/triton/triton.c
parent731682bcb429470d366903adf7056151a94816b7 (diff)
downloadaccel-ppp-d36fc2b235ddaaa3fbb84a46ef520a0a207293df.tar.gz
accel-ppp-d36fc2b235ddaaa3fbb84a46ef520a0a207293df.zip
triton: make level triggered events oneshot (EPOLLONESHOT)
Diffstat (limited to 'accel-pppd/triton/triton.c')
-rw-r--r--accel-pppd/triton/triton.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/accel-pppd/triton/triton.c b/accel-pppd/triton/triton.c
index 5d6f31d1..f550db26 100644
--- a/accel-pppd/triton/triton.c
+++ b/accel-pppd/triton/triton.c
@@ -207,9 +207,11 @@ static void ctx_thread(struct _triton_context_t *ctx)
h->pending = 0;
events = h->trig_epoll_events;
spin_unlock(&ctx->lock);
-
+
__sync_sub_and_fetch(&triton_stat.md_handler_pending, 1);
+ h->armed = 0;
+
if ((events & (EPOLLIN | EPOLLERR | EPOLLHUP)) && (h->epoll_event.events & EPOLLIN)) {
if (h->ud && h->ud->read) {
if (h->ud->read(h->ud))
@@ -224,6 +226,8 @@ static void ctx_thread(struct _triton_context_t *ctx)
}
}
+ md_rearm(h);
+
continue;
}