I would think it’s the other way around. If you have separate subsystems for events of types A, B, C, etc. there’s no easy way you can have a process wait for “an event of type A or C, whichever comes first”.
There also is the thing that, sometimes, different types of event are identical types, lower down in the stack. A simple example are keyboard and mouse events generated from USB devices.
Why would the low-level USB stack have to do a switch on device type to figure out what subsystem to post an event to?
There also is the thing that, sometimes, different types of event are identical types, lower down in the stack. A simple example are keyboard and mouse events generated from USB devices.
Why would the low-level USB stack have to do a switch on device type to figure out what subsystem to post an event to?