Kernel Threads

Unlike a user space application, a driver doesn't have a main thread that is always running while the driver is active. Instead, a driver typically executes on existing threads in response to certain events. For example, when a user space process makes a control request through the driver's user client, the driver executes within the context of the calling thread owned by the user process. Similarly, when a driver's hardware generates an interrupt, the driver's secondary interrupt handler is executed from the work loop thread. Because a driver executes in response to such events, if a driver isn't handling an event, such as a control request or an interrupt handler, it will typically have no code executing on any thread in the ...

Get OS X and iOS Kernel Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.