POSIX-Layer Data Structures

The resource manager library defines (in <sys/iofunc.h>) several key structures that are related to the POSIX-layer support routines:

iofunc_ocb_t (Open Control Block) structure
Contains per-open data, such as the current position into a file (the lseek() offset).
iofunc_attr_t (attribute) structure
Since a resource manager may be responsible for more than one device (e.g., devc-ser* may be responsible for /dev/ser1, /dev/ser2, /dev/ser3, etc.), the attributes structure holds data on a per-name basis. This structure contains such items as the user and group ID of the owner of the device, the last modification time, etc.
iofunc_mount_t (mount) structure
Contains per-mountpoint data items that are global to the entire mount device. Filesystem (block I/O device) managers use this structure; a resource manager for a device typically won't have a mount structure.
Note: Be sure to #include <sys/iofunc.h> before <sys/resmgr.h>, or else the data structures won't be defined properly.

This picture may help explain their interrelationships:

Figure 1. A resource manager is responsible for three data structures.

If three clients open two paths associated with a resource manager, the data structures are linked like this:

Figure 2. Multiple clients with multiple OCBs, all linked to one mount structure.