io_iterator_t enumerator;
kern_return_t result;
result = IOServiceAddMatchingNotification(
mNotifyPort,
kIOMatchedNotification,
You could keep it static, but use the userdata to store the this
pointer in addition to whatever other userdata you want (by packing them into a structure, for example) and then call an object-specific callback from the static version by calling this->someCallback
(where this
is the pointer stored in the userdata, of course).
A non-static
function has an implicit this
parameter, and thus would have the wrong signature for the callback.
Sorry, no easy way to avoid the jump island.