Simple examples of device resource managers

The programs that follow are complete but simple examples of a device resource manager.

Note: As you read through this guide, you'll encounter many code snippets. Most of these code snippets have been written so that they can be combined with either of these simple resource managers.

The first two of these simple device resource managers model their functionality after that provided by /dev/null (although they use /dev/sample to avoid conflict with the “real” /dev/null):

The chapters that follow describe how to add more functionality to these simple resource managers.

Note: The QNX Momentics Integrated Development Environment (IDE) includes a sample /dev/sample resource manager that's very similar to the single-threaded one given below. To get the sample in the IDE, choose Help > Welcome, and then click the Samples icon.