Introduction

A kernel extension (or kext) is a dynamically loaded bundle of executable code that runs in kernel space. You can create a kext to perform low-level tasks that cannot be performed in user space. Kexts typically belong to one of three categories:

This document is a primary resource for kext programming in OS X. It describes the structure of a kext and demonstrates the process for developing a kext, from creating an Xcode project to packaging your kext for distribution.

Who Should Read This Document?

This document is intended for developers who are developing a kernel extension for OS X. Because kext development has numerous pitfalls, you are encouraged to stay away from creating a kext unless you absolutely have to. Read “Deciding Whether to Create a Kernel Extension” to make sure a kext is the correct solution for your needs.

If you are developing a driver for a USB or FireWire device, it can and should run in user space. See USB Device Interface Guide and FireWire Device Interface Guide for details.

Organization of This Document

This document contains the following chapters:

See Also