Recall from Section 4.1 that fusd_register returns a file descriptor for every device that is successfully registered. This file descriptor can be used to activate device callbacks ``manually,'' without passing control of the application to fusd_run(). Whenever the file descriptor becomes readable according to select(2), it should be passed to fusd_dispatch(), which in turn will activate callbacks in the same way that fusd_run() does. In other words, an application can:
fusd_dispatch() returns 0 if at least one callback was successfully activated. On error, -1 is returned with errno set appropriately. fusd_dispatch() will never block--if no messages are available from the kernel, it will return -1 with errno set to EAGAIN.