]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/rm-lld.git/blobdiff - rm_services.h
Added Linux example and updated release notes
[keystone-rtos/rm-lld.git] / rm_services.h
index 67c1670391fa2ca1a2ae1a2eda505fbefd80fac3..a00292bf43a20c0efc2e935c96b06c4c90772c06 100644 (file)
@@ -65,6 +65,9 @@ typedef enum {
     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 */
@@ -84,9 +87,9 @@ typedef struct {
      *  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
@@ -101,6 +104,12 @@ typedef struct {
     /** 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;
 
 /** 
@@ -141,20 +150,24 @@ typedef struct {
  *     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;
 
@@ -209,8 +222,6 @@ typedef struct {
  *      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);