Return a system resource to the resource database
#include <sys/rsrcdbmgr.h> #include <sys/rsrcdbmsg.h> int rsrcdbmgr_detach( rsrc_request_t *list, int count );
- An array of rsrc_request_t structures that describe the resources that you want to return. For information about this structure, see the documentation for rsrcdbmgr_attach().
- The number of entries in the array.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The rsrcdbmgr_detach() function returns count resources in list to the database of available system resources. You must return the resource with the same start, end, and flags (type) that were issued for the resource when it was allocated with rsrcdbmgr_attach() .
- An error occurred; errno is set.
- Invalid argument, or the resource is in use by a process, isn't found in the database, or can't be returned to the system.
- Insufficient memory to allocate internal data structures.
- The calling process doesn't have the required permission; see procmgr_ability() .
See the examples in rsrcdbmgr_attach() .