Optimize ev_signal/ev_unsignal operations