Resource manager design

QNX SDP8.0Customizing a BSPConfigurationDeveloper

The resource manager layer is implemented as a library that's statically linked with the hardware library. We currently provide a single-threaded manager, libi2c-master.

On startup, the resmgr layer does the following:

i2c_master_getfuncs(&masterf)
masterf.init()
masterf.set_bus_speed()

The resource manager then makes itself run in the background.

Here's how the resource manager handles these devctl() commands:

  • DCMD_I2C_DRIVER_INFO calls masterf.driver_info().
  • DCMD_I2C_SET_BUS_SPEED only updates the state of the current connection.
  • DCMD_I2C_SEND, DCMD_I2C_RECV, and DCMD_I2C_SENDRECV result in the following:
    if (bus_speed has changed)
        masterf.set_bus_speed() 
    masterf.set_slave_address()
    masterf.send() or masterf.recv()
      
    

The resource manager thread remains occupied until the transaction is complete and replies to the client.

You can terminate the resource manager by sending a SIGTERM to it.

Page updated: