+ wlist_del ((WL *)&signals [w->signum - 1].head, (WL)w);
+ ev_stop (EV_A_ (W)w);
+
+ if (!signals [w->signum - 1].head)
+ signal (w->signum, SIG_DFL);
+}
+
+void
+ev_idle_start (EV_P_ struct ev_idle *w)
+{
+ if (ev_is_active (w))
+ return;
+
+ ev_start (EV_A_ (W)w, ++idlecnt);
+ array_needsize (idles, idlemax, idlecnt, );
+ idles [idlecnt - 1] = w;
+}
+
+void
+ev_idle_stop (EV_P_ struct ev_idle *w)
+{
+ ev_clear_pending (EV_A_ (W)w);
+ if (ev_is_active (w))
+ return;
+
+ idles [w->active - 1] = idles [--idlecnt];
+ ev_stop (EV_A_ (W)w);
+}
+
+void
+ev_prepare_start (EV_P_ struct ev_prepare *w)
+{
+ if (ev_is_active (w))
+ return;
+
+ ev_start (EV_A_ (W)w, ++preparecnt);
+ array_needsize (prepares, preparemax, preparecnt, );
+ prepares [preparecnt - 1] = w;
+}
+
+void
+ev_prepare_stop (EV_P_ struct ev_prepare *w)
+{
+ ev_clear_pending (EV_A_ (W)w);
+ if (ev_is_active (w))
+ return;
+
+ prepares [w->active - 1] = prepares [--preparecnt];
+ ev_stop (EV_A_ (W)w);
+}
+
+void
+ev_check_start (EV_P_ struct ev_check *w)
+{
+ if (ev_is_active (w))
+ return;
+
+ ev_start (EV_A_ (W)w, ++checkcnt);
+ array_needsize (checks, checkmax, checkcnt, );
+ checks [checkcnt - 1] = w;
+}
+
+void
+ev_check_stop (EV_P_ struct ev_check *w)
+{
+ ev_clear_pending (EV_A_ (W)w);
+ if (ev_is_active (w))
+ return;
+
+ checks [w->active - 1] = checks [--checkcnt];
+ ev_stop (EV_A_ (W)w);
+}
+
+void
+ev_child_start (EV_P_ struct ev_child *w)
+{
+ if (ev_is_active (w))
+ return;
+
+ ev_start (EV_A_ (W)w, 1);
+ wlist_add ((WL *)&childs [w->pid & (PID_HASHSIZE - 1)], (WL)w);
+}
+
+void
+ev_child_stop (EV_P_ struct ev_child *w)
+{
+ ev_clear_pending (EV_A_ (W)w);
+ if (ev_is_active (w))
+ return;
+
+ wlist_del ((WL *)&childs [w->pid & (PID_HASHSIZE - 1)], (WL)w);
+ ev_stop (EV_A_ (W)w);