diff --git a/rm_services.h b/rm_services.h
index 67c1670391fa2ca1a2ae1a2eda505fbefd80fac3..a00292bf43a20c0efc2e935c96b06c4c90772c06 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;
} Rm_ServiceRespInfo;
/**
* property defined.
* b) The default alignment of 1 if no alignment is specified in the policy
* for the resource.
- * This value is only valid if resourceBase is set to
- * #RM_RESOURCE_BASE_UNSPECIFIED */
+ * This value is only valid if resourceBase is set to #RM_RESOURCE_BASE_UNSPECIFIED */
#define RM_RESOURCE_ALIGNMENT_UNSPECIFIED (-1)
/** Alignment of the resource affected by the service request. Only valid
* if resourceBase is set to #RM_RESOURCE_BASE_UNSPECIFIED.
* #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. */
+ * components after a service request resulted in a blocking operation.
+ * If no callback function is provided the RM instance will block until
+ * the service response is ready. */
Rm_ServiceCallback callback;
} Rm_ServiceReqInfo;
* 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);