libevent is a lightweight C I/O framework by Niels Provos. It's level-triggered only.
Level triggering, Edge triggering
Ref. Triggering means making a circuit active.
- In level triggering the circuit will become active when the gating or clock pulse is on a particular level.
- In edge triggering the circuit becomes active at negative or positive edge of the clock signal.
Ref. In systems programming, an interrupt is a signal to the processor emitted by hardware or software indicating an event that needs immediate attention.
Edge-triggered interrupts do not suffer the problems that level-triggered interrupts have with sharing. Service of a low-priority device can be postponed arbitrarily, and interrupts will continue to be received from the high-priority devices that are being serviced. If there is a device that the CPU does not know how to service, it may cause a spurious interrupt, or even periodic spurious interrupts, but it does not interfere with the interrupt signalling of the other devices. However, it is fairly easy for an edge triggered interrupt to be missed - for example if interrupts have to be masked for a period - and unless there is some type of hardware latch that records the event it is impossible to recover. Such problems caused many "lockups" in early computer hardware because the processor did not know it was expected to do something. More modern hardware often has one or more interrupt status registers that latch the interrupt requests; well written edge-driven interrupt software often checks such registers to ensure events are not missed.