Jump to main content
Index
Advanced search
  1. Home
  2. QNX Software Development Platform

    QNX SDP is a cross-compiling and debugging environment, including an IDE and command-line tools, for building binary images and programs for target boards running QNX Neutrino 7.1.

  3. Programming

  4. Getting Started with QNX Neutrino

    Getting Started with QNX Neutrino: A Guide for Realtime Programmers is intended to introduce you to the QNX Neutrino RTOS and help you develop applications and resource managers for it.

  5. Resource Managers

    In this chapter, we'll take a look at what you need to understand in order to write a resource manager. Resource managers are another distintive feature of QNX Neutrino that allow you to access services through standard POSIX calls.

  6. Handler routines

    Not all outcalls correspond to client messages—some are synthesized by the kernel, and some by the library.

  • QNX Momentics IDE User's Guide

    This User's Guide describes version 7.1 of the Integrated Development Environment (IDE) that's part of the QNX Momentics tool suite.

  • QNX Software Development Platform

    QNX SDP is a cross-compiling and debugging environment, including an IDE and command-line tools, for building binary images and programs for target boards running QNX Neutrino 7.1.

    • Quickstart Guide

    • OS Components & Operations

    • Audio & Graphics API

    • Multimedia

    • Networking Middleware

    • Programming

      • Getting Started with QNX Neutrino

        Getting Started with QNX Neutrino: A Guide for Realtime Programmers is intended to introduce you to the QNX Neutrino RTOS and help you develop applications and resource managers for it.

        • Processes and Threads

        • Message Passing

          In this chapter, we'll look at the most distinctive feature of QNX Neutrino, message passing. Message passing lies at the heart of the operating system's microkernel architecture, giving the OS its modularity.

        • Clocks, Timers, and Getting a Kick Every So Often

          It's time to take a look at everything related to time in the QNX Neutrino RTOS. We'll see how and why you'd use timers and the theory behind them. Then we'll take a look at getting and setting the realtime clock.

        • Interrupts

          In this chapter, we'll take a look at interrupts, how we deal with them under QNX Neutrino, their impact on scheduling and realtime, and some interrupt-management strategies.

        • Resource Managers

          In this chapter, we'll take a look at what you need to understand in order to write a resource manager. Resource managers are another distintive feature of QNX Neutrino that allow you to access services through standard POSIX calls.

          • What is a resource manager?

            A resource manager is simply a program with some well-defined characteristics.

          • The client's view

            We've already seen a hint of what the client expects. It expects a file-descriptor-based interface, using standard POSIX functions.

          • The resource manager's view

            Let's look at things from the resource manager's perspective.

          • The resource manager library

            Before we get too far into all the issues surrounding resource managers, we have to get acquainted with the QNX Neutrino resource manager library.

          • Writing a resource manager

            Now that we've introduced the basics—how the client looks at the world, how the resource manager looks at the world, and an overview of the two cooperating layers in the library, it's time to focus on the details.

          • Handler routines

            Not all outcalls correspond to client messages—some are synthesized by the kernel, and some by the library.

            • General notes

              Each handler function gets passed an internal context block (the ctp argument) that should be treated as read-only, except for the iov member. This context block contains a few items of interest, as described above in resmgr_context_t internal context block. Also, each function gets passed a pointer to the message (in the msg argument). You'll be using this message pointer extensively, as that contains the parameters that the client's C library call has placed there for your use.

            • Connect functions notes

              Before we dive into the individual messages, however, it's worth pointing out that the connect functions all have an identical message structure (rearranged slightly, see <sys/iomsg.h> for the original):

          • Alphabetical listing of connect and I/O functions

            This section gives an alphabetical listing of the connect and I/O function entry points that you can fill in (the two tables passed to resmgr_attach()). Remember that if you simply call iofunc_func_init(), all these entries will be filled in with the appropriate defaults; you'd want to modify a particular entry only if you wish to handle that particular message. In the Examples section, below, you'll see some examples of the common functions.

          • Examples

            I'm now going to show you a number of cookbook examples you can cut and paste into your code, to use as a basis for your projects. These aren't complete resource managers—you'll need to add the thread pool and dispatch skeleton shown immediately below, and ensure that your versions of the I/O functions are placed into the I/O functions table after you've done the iofunc_func_init(), in order to override the defaults!

          • Advanced topics

            Now that we've covered the basics of resource managers, it's time to look at some more complicated aspects.

          • Summary

            Writing a resource manager is by far the most complicated task that we've discussed in this book.

        • Sample Programs

          This appendix contains the complete versions of some of the sample programs discussed in this book.

        • Glossary

      • Programmer's Guide

        The QNX Neutrino Programmer's Guide covers a variety of topics that might interest developers who are building applications that will run under the QNX Neutrino RTOS.

      • The QNX Neutrino Cookbook: Recipes for Programmers
      • Writing a Resource Manager
    • Sensor Framework

    • System Security Guide

      The QNX System Security Guide is intended for both system integrators who are responsible for the security of a QNX Neutrino RTOS system and developers who want to create a QNX Neutrino resource manager free from vulnerabilities.

    • Utilities & Libraries

  • QNX Hypervisor

    The QNX Hypervisor allows you to run multiple OSs on a target system so you can separate critical and non-critical functions, support a wide variety of applications, and reduce hardware costs.

  • QNX Software in the Cloud

    QNX Software in the Cloud enables developers to use the QNX software in Amazon Web Services (AWS) and Microsoft Azure (Azure).

  • QNX Advanced Virtualization Frameworks User's Guide

    This User's Guide is aimed at all systems integrators and developers who want to design and build embedded systems using the QNX Advanced Virtualization Frameworks.

  • Typographical Conventions, Support, and Licensing

    This section describes the typographical conventions used throughout the documentation and explains how to obtain technical support.

Handler routines

Not all outcalls correspond to client messages—some are synthesized by the kernel, and some by the library.

I've organized this section into the following:

  • general notes
  • connect functions notes

This section is followed by an alphabetical listing of connect and I/O messages.

Page updated: March 12, 2026
Related information
  • Resource Managers (System Architecture)
  • Writing a Resource Manager