diff --git a/rm_services.h b/rm_services.h
index 07a72cf650276b6bff975f2cfec14a31c6123f96..ec9c21e79c30b13f8858540658623bd4b1086035 100644 (file)
--- a/rm_services.h
+++ b/rm_services.h
Rm_service_RESOURCE_ALLOCATE_USE,
/** RM resource free service */
Rm_service_RESOURCE_FREE,
+ /** RM resource status service - returns the reference count for specified
+ * resource. */
+ Rm_service_RESOURCE_STATUS,
/** RM NameServer map resource to name service */
Rm_service_RESOURCE_MAP_TO_NAME,
/** RM NameServer get resource by name service */
* result originated. Used by application to sort responses, received
* via callback function, from RM instances located on the same core. */
Rm_Handle rmHandle;
- /** Service request state. The state can be an approval, denial, or error.
- * The latter codes start at #RM_OK, #RM_SERVICE_DENIED_BASE, and
- * #RM_ERROR_BASE, respectively. */
+ /** Service request state. State values can be found in rm.h starting
+ * with #RM_SERVICE_PROCESSING, #RM_SERVICE_DENIED_BASE, and
+ * #RM_ERROR_LIBFDT_START */
int32_t serviceState;
/** The service ID is returned to the application in order to match service
* responses received at a later time via the provided callback function
/** The resource length starting at base allocated, freed, or mapped to
* NameServer name. */
uint32_t resourceLength;
+/** resourceNumOwners is not valid unless >= 0 */
+#define RM_RESOURCE_NUM_OWNERS_INVALID (-1)
/** Current number of owners for the returned resource. A value greater
* than one means the resource is being shared. This value is only valid
* if the serviceState is RM_SERVICE_APPROVED or RM_SERVICE_APPROVED_STATIC. */
int32_t resourceNumOwners;
+/** instAllocCount is not valid unless >= 0 */
+#define RM_INST_ALLOC_COUNT_INVALID (-1)
+ /** Number of times the requesting instance has allocated the returned resource.
+ * This value is only valid if the serviceState is RM_SERVICE_APPROVED or
+ * RM_SERVICE_APPROVED_STATIC */
+ int32_t instAllocCount;
} Rm_ServiceRespInfo;
/**
* #RM_RESOURCE_ALIGNMENT_UNSPECIFIED can be substituted. */
int32_t resourceAlignment;
/** The NameServer name associated, or to be associated, with a resource.
- * If the service type is #Rm_service_RESOURCE_GET_BY_NAME and the
- * #resourceBase and #resourceLength fields are not NULL a error will
- * occur. */
+ * The NameServer name has precedence over #resourceBase and #resourceLength
+ * for all resource modification service types as well as
+ * #Rm_service_RESOURCE_GET_BY_NAME. If the NameServer name and the base
+ * and length are not NULL the resource information retrieved from the
+ * NameServer entry for the name will replace the values present in
+ * #resourceBase and #resourceLength */
const char *resourceNsName;
/** Callback function used by RM to provide responses back to application
* components after a service request resulted in a blocking operation.
* Success - Rm_ServiceHandle and result = #RM_OK
* @retval
* Failure - NULL Rm_ServiceHandle and result = #RM_ERROR_SERVICE_HANDLE_MEM_ALLOC_FAILED
- * @retval
- * Failure - NULL Rm_ServiceHandle and result = #RM_ERROR_SERVICE_HANDLE_ALREADY_OPENED
*/
Rm_ServiceHandle *Rm_serviceOpenHandle(Rm_Handle rmHandle, int32_t *result);