--- libev/ev.c 2009/07/14 00:09:59 1.299 +++ libev/ev.c 2009/07/14 20:31:21 1.300 @@ -1842,6 +1842,18 @@ EV_CB_INVOKE ((W)w, revents); } +unsigned int +ev_pending_count (EV_P) +{ + int pri; + unsigned int count = 0; + + for (pri = NUMPRI; pri--; ) + count += pendingcnt [pri]; + + return count; +} + void noinline ev_invoke_pending (EV_P) {