Converted boolean variables to ints
authorJustin Sobota <jsobota@ti.com>
Fri, 8 Mar 2013 20:42:17 +0000 (15:42 -0500)
committerJustin Sobota <jsobota@ti.com>
Fri, 8 Mar 2013 20:42:17 +0000 (15:42 -0500)
12 files changed:
include/rm_allocatorloc.h
include/rm_internal.h
include/rm_loc.h
include/rm_policyloc.h
include/rm_treeloc.h
rm.h
src/rm.c
src/rm_allocator.c
src/rm_policy.c
src/rm_transport.c
src/rm_tree.c
test/rm_test.c

index a6f48e0e4bd7e9015a11b910e5afec8bf9effe29..cd6c9ce5b0a8703a00a2bf0328d1fd06f671035d 100644 (file)
@@ -44,9 +44,6 @@
 extern "C" {
 #endif
 
-/* Standard includes */
-#include <stdbool.h>
-
 /* RM external includes */
 #include <ti/drv/rm/rm.h>
 
index 5221a84f3379167c3b72e05799e770e3beaa1391..9d27365a8a4ca82f68c780b8b9d529dd1a5b7028 100644 (file)
 extern "C" {
 #endif
 
-/* Standard includes */
-#include <stdbool.h>
-
 /* RM external includes */
 #include <ti/drv/rm/rm.h>
 
+/* RM true/false definitions */
+#define RM_FALSE 0
+#define RM_TRUE  1
+
 /* RM resource information */
 typedef struct {
     /* Resource name */
index 69e197d72bfc38890a408b57f273ba8c86b2e19f..7843a9ebee42a3602c8525bcf6dfb0610c3e0deb 100644 (file)
@@ -87,7 +87,7 @@ typedef struct Rm_Transaction_s {
     /* Transaction state.  The codes are defined in rm.h */
     int32_t                  state;
     /* Transaction has been forwarded to CD or Server instance.  Waiting for response */
-    bool                     hasBeenForwarded;
+    int8_t                   hasBeenForwarded;
     /* Name of the RM instance the service originated from */
     char                     serviceSrcInstName[RM_NAME_MAX_CHARS];    
     /* Resource information */
@@ -135,12 +135,12 @@ typedef struct {
     Rm_InstType       instType;
     /* Instance lock status.  Instance locks if static request fails when
      * checked against global policy */
-    bool              isLocked;
-    /* Pointer to the serviceHandle opened from the instance */
-    Rm_ServiceHandle *serviceHandle;
+    int8_t            isLocked;
     /* Tracks whether the instance has registered with a CD or Server.
      * Applicable to CD and Client instances */
-    bool              registeredWithDelegateOrServer;
+    int8_t            registeredWithDelegateOrServer;    
+    /* Pointer to the serviceHandle opened from the instance */
+    Rm_ServiceHandle *serviceHandle;
     /* Linked list of transports registered by the application */
     Rm_Transport     *transports;
     /* Service transaction sequence number tracker */
index bcc6473a60a2d34d2fc444415ebb8598100d6d7e..bf08ced2b246cde760f9691fc943b59ffa00b99d 100644 (file)
@@ -149,16 +149,16 @@ typedef struct {
 
 Rm_PolicyValidInstNode *rmPolicyGetValidInstNode(Rm_PolicyValidInstTree *validInstTree, char *instName);
 Rm_PolicyValidInstNode *rmPolicyGetLinuxInstNode(Rm_PolicyValidInstTree *validInstTree);
-bool     rmPolicyCheckPrivilege(Rm_PolicyCheckCfg *privilegeCfg, int32_t *result);
+int rmPolicyCheckPrivilege(Rm_PolicyCheckCfg *privilegeCfg, int32_t *result);
 uint32_t rmPolicyGetResourceBase(void *policyDtb, Rm_PolicyValidInstNode *validInstNode, 
                                  int32_t resourceOffset, uint32_t allocType, 
                                  int32_t *result);
 uint32_t rmPolicyGetResourceAlignment(void *policyDtb, int32_t resourceOffset);
-int32_t  rmPolicyGetResourceOffset(void *policyDtb, char *resourceName);
-int32_t  rmPolicyValidatePolicyResourceNames(void *policyDtb, void *allocatorList);
-int32_t  rmPolicyValidatePolicy(void *policyDtb, Rm_PolicyValidInstTree *validInstTree);
-Rm_PolicyValidInstTree *rmPolicyCreateValidInstTree(void *policyDtb, bool addLinux, int32_t *result);
-void     rmPolicyFreeValidInstTree(Rm_PolicyValidInstTree *validInstTree);
+int32_t rmPolicyGetResourceOffset(void *policyDtb, char *resourceName);
+int32_t rmPolicyValidatePolicyResourceNames(void *policyDtb, void *allocatorList);
+int32_t rmPolicyValidatePolicy(void *policyDtb, Rm_PolicyValidInstTree *validInstTree);
+Rm_PolicyValidInstTree *rmPolicyCreateValidInstTree(void *policyDtb, int addLinux, int32_t *result);
+void rmPolicyFreeValidInstTree(Rm_PolicyValidInstTree *validInstTree);
 
 #ifdef __cplusplus
 }
index 5ef078cfcc2ccacac7e3b2687513dc0694f34ace..1fae8c8135602a499e58a4707c24aadb53c6e264 100644 (file)
@@ -46,7 +46,6 @@ extern "C" {
 
 /* Standard includes */
 #include <stdint.h>
-#include <stdbool.h>
 
 /* RM external includes */
 #include <ti/drv/rm/rm.h>
@@ -101,7 +100,7 @@ typedef struct _Rm_PolicyValidInstNode {
     /* TRUE: Delete this valid instance node once the allocRefCount
      *       reaches zero
      * FALSE: Do not delete */
-    bool                              deletePending;
+    int8_t                            deletePending;
 } Rm_PolicyValidInstNode;
 
 /* Valid instance tree root entry type definition */
diff --git a/rm.h b/rm.h
index b417d6785dd3f31c87dd48a54732c214ad8057f9..3f85dbf7405b5a74537338f35618f3a61773d1d9 100644 (file)
--- a/rm.h
+++ b/rm.h
@@ -48,7 +48,6 @@ extern "C" {
 
 /* Standard includes */
 #include <stdint.h>
-#include <stdbool.h>
 
 /**  @mainpage Resource Manager
  *
@@ -432,11 +431,11 @@ typedef struct {
  *      Server instance handle.
  *
  *  @param]in]  printResources
- *      TRUE  - Resource ownership details will be printed for all
- *              tracked resources
- *      FALSE - Resource ownership details will not be printed.  Only
- *              the number of allocated resource ranges will be 
- *              returned.
+ *      Non-zero - Resource ownership details will be printed for all
+ *                 tracked resources
+ *      0        - Resource ownership details will not be printed.  Only
+ *                 the number of allocated resource ranges will be 
+ *                 returned.
  *
  *  @retval
  *      Success - Total number of allocated resource nodes owners.  Effectively
@@ -444,7 +443,7 @@ typedef struct {
  *  @retval
  *      Failure - #RM_ERROR_INVALID_RES_STATUS_INSTANCE  
  */
-int32_t Rm_resourceStatus(Rm_Handle rmServerHandle, bool printResources);
+int32_t Rm_resourceStatus(Rm_Handle rmServerHandle, int printResources);
 
 /**
  *  @b Description
@@ -498,9 +497,9 @@ Rm_Handle Rm_init(const Rm_InitCfg *initCfg, int32_t *result);
  *      Instance handle.
  *
  *  @param[in]  ignorePendingServices
- *      TRUE - The instance will be deleted despite any services pending <br>
- *      FALSE - The instance will not be deleted due to at least one service
- *              pending.
+ *      Non-zero - The instance will be deleted despite any services pending <br>
+ *      0        - The instance will not be deleted due to at least one service
+ *                 pending.
  *
  *  @retval
  *      Success - #RM_OK
@@ -511,7 +510,7 @@ Rm_Handle Rm_init(const Rm_InitCfg *initCfg, int32_t *result);
  *  @retval
  *      Failure - #RM_ERROR_CANT_DELETE_PENDING_TRANSACTIONS 
  */
-int32_t Rm_delete(Rm_Handle rmHandle, bool ignorePendingServices);
+int32_t Rm_delete(Rm_Handle rmHandle, int ignorePendingServices);
 
 /**
  *  @b Description
index e445fb47b961c284eb13adc6bdcd25455c89973e..82441b0806334783d9c0179ddb69c189a8387745 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
@@ -42,7 +42,6 @@
 /* Standard includes */
 #include <stdint.h>
 #include <string.h>
-#include <stdbool.h>
 
 /* RM external includes */
 #include <ti/drv/rm/rm.h>
@@ -343,7 +342,7 @@ static void transactionForwarder (Rm_Inst *rmInst, Rm_Transaction *transaction)
             transaction->state = RM_ERROR_TRANSPORT_SEND_ERROR;
             goto errorExit;
         }              
-        transaction->hasBeenForwarded = true;
+        transaction->hasBeenForwarded = RM_TRUE;
         /* Transaction not deleted.  Waiting for response from RM CD or Server */
     }        
 errorExit: 
@@ -837,7 +836,7 @@ void rmProcessRouter (Rm_Inst *rmInst, Rm_Transaction *transaction)
  *              returned as well.  This function is only available on
  *              server instances.
  */
-int32_t Rm_resourceStatus(Rm_Handle rmServerHandle, bool printResources)
+int32_t Rm_resourceStatus(Rm_Handle rmServerHandle, int printResources)
 {
     Rm_Inst         *rmInst = (Rm_Inst *)rmServerHandle;
     Rm_Allocator    *allocator = rmInst->u.server.allocators;
@@ -972,7 +971,7 @@ Rm_Handle Rm_init(const Rm_InitCfg *initCfg, int32_t *result)
     Rm_Inst *rmInst = NULL;
     void    *globalResourceDtb = NULL;
     void    *linuxResourceDtb = NULL;
-    bool     addLinux = false;
+    int      addLinux = RM_FALSE;
 
     *result = RM_OK;
     
@@ -990,8 +989,8 @@ Rm_Handle Rm_init(const Rm_InitCfg *initCfg, int32_t *result)
     /* Create and initialize instance */
     rmInst = Rm_osalMalloc (sizeof(Rm_Inst));
     memset ((void *) rmInst, 0, sizeof(Rm_Inst));
-    rmInst->isLocked = false;
-    rmInst->registeredWithDelegateOrServer = false;
+    rmInst->isLocked = RM_FALSE;
+    rmInst->registeredWithDelegateOrServer = RM_FALSE;
     rmInst->transactionSeqNum = transactionInitSequenceNum();
 
     rmInst->instType = initCfg->instType;    
@@ -1008,7 +1007,7 @@ Rm_Handle Rm_init(const Rm_InitCfg *initCfg, int32_t *result)
 
         if (initCfg->instCfg.serverCfg.linuxDtb) {
             linuxResourceDtb = initCfg->instCfg.serverCfg.linuxDtb;
-            addLinux = true;
+            addLinux = RM_TRUE;
         }
 
         /* Create valid instance list from policy.  Must be done prior to parsing
@@ -1093,7 +1092,7 @@ errorExit:
  *              as long as all transports have been unregistered
  *              and the service handle has been closed
  */
-int32_t Rm_delete(Rm_Handle rmHandle, bool ignorePendingServices)
+int32_t Rm_delete(Rm_Handle rmHandle, int ignorePendingServices)
 {
     Rm_Inst *rmInst = (Rm_Inst *)rmHandle;
 
index d3f700a3dbf76c61acde23de3f9efeb8c9c0f896..230e646e4be562b90ac312941f31740ac27e3c3b 100644 (file)
@@ -210,18 +210,18 @@ static void allocatorResNodeOwnerAdd(Rm_ResourceNode *node, void *serviceInstNod
  * DESCRIPTION: Returns TRUE if the owners of two resource nodes 
  *              are equivalent.  Otherwise, returns FALSE.
  */
-static bool allocatorResNodeOwnerCompare(Rm_ResourceNode *node1, Rm_ResourceNode *node2)
+static int allocatorResNodeOwnerCompare(Rm_ResourceNode *node1, Rm_ResourceNode *node2)
 {
     Rm_Owner *node1Owners = node1->ownerList;
     Rm_Owner *node2Owners = node2->ownerList;
-    bool      matchedInst;
+    int       matchedInst;
 
     if (node1->allocationCount == node2->allocationCount) {
         while (node1Owners) {
-            matchedInst = false;
+            matchedInst = RM_FALSE;
             while (node2Owners) {
                 if (node1Owners->instNameNode == node2Owners->instNameNode) {
-                    matchedInst = true;
+                    matchedInst = RM_TRUE;
                     break;
                 }
                 node2Owners = node2Owners->nextOwner;
@@ -232,15 +232,15 @@ static bool allocatorResNodeOwnerCompare(Rm_ResourceNode *node1, Rm_ResourceNode
                 node1Owners = node1Owners->nextOwner;
             }
             else {
-                return(false);
+                return(RM_FALSE);
             }                
         }
     }
     else {
-        return(false);
+        return(RM_FALSE);
     }  
     
-    return(true);
+    return(RM_TRUE);
 }
 
 /* FUNCTION PURPOSE: Deletes an owner from an allocator resource
@@ -328,17 +328,17 @@ static void allocatorResNodeOwnerClear(Rm_ResourceNode *node)
  *              in the list of resource node owners.  Otherwise,
  *              returns FALSE.
  */
-static bool allocatorResNodeIsOwnedBy(Rm_ResourceNode *node, void *serviceInstNode)
+static int allocatorResNodeIsOwnedBy(Rm_ResourceNode *node, void *serviceInstNode)
 {
     Rm_Owner *owner = node->ownerList;
 
     while (owner) {
         if (owner->instNameNode == serviceInstNode) {
-            return(true);           
+            return(RM_TRUE);           
         }
         owner = owner->nextOwner;
     }
-    return(false);
+    return(RM_FALSE);
 }
 
 /* FUNCTION PURPOSE: Preallocates an allocator resource
@@ -358,10 +358,10 @@ static int32_t allocatorPreAllocate(Rm_Handle rmHandle, Rm_Allocator *allocator,
     Rm_ResourceNode   *matchingNode = NULL;
     uint32_t           matchingEnd;
     uint32_t           rangeIndex;
-    bool               resourceFound = false;
+    int                resourceFound = RM_FALSE;
     Rm_PolicyCheckType policyCheckType;
     Rm_PolicyCheckCfg  policyCheckCfg;
-    bool               nodePassesPolicy;
+    int                nodePassesPolicy;
     int32_t            retVal = RM_SERVICE_PROCESSING;    
 
     opInfo->resourceInfo->base = rmPolicyGetResourceBase(opInfo->policy, opInfo->serviceSrcInstNode, 
@@ -401,7 +401,7 @@ static int32_t allocatorPreAllocate(Rm_Handle rmHandle, Rm_Allocator *allocator,
         if (matchingNode) {
             if (!allocatorResNodeIsOwnedBy(matchingNode, opInfo->serviceSrcInstNode)) {
                 /* Attempt to preallocate from node only if not owned by instance requesting the allocation */
-                nodePassesPolicy = false;
+                nodePassesPolicy = RM_FALSE;
                 policyCheckCfg.type = policyCheckType;
                 policyCheckCfg.validInstNode = opInfo->serviceSrcInstNode;
                 policyCheckCfg.resourceBase = findNode.base;
@@ -450,7 +450,7 @@ static int32_t allocatorPreAllocate(Rm_Handle rmHandle, Rm_Allocator *allocator,
                         /* Block of unallocated resources within matchingNode that satisfies
                          * allocate requirements */
                         opInfo->resourceInfo->base = rangeIndex;
-                        resourceFound = true;
+                        resourceFound = RM_TRUE;
                     }     
                 }
             }
@@ -490,9 +490,9 @@ static int32_t allocatorAllocate(Rm_Handle rmHandle, Rm_Allocator *allocator, in
     Rm_ResourceNode    *rightNode = NULL;
     Rm_PolicyCheckType  policyCheckType;    
     Rm_PolicyCheckCfg   policyCheckCfg;
-    bool                allocPassesPolicy;
-    bool                combineLeft = false;
-    bool                combineRight = false;    
+    int                 allocPassesPolicy;
+    int                 combineLeft = RM_FALSE;
+    int                 combineRight = RM_FALSE;    
     uint32_t            findEnd;
     uint32_t            matchingEnd;  
     int32_t             retVal = RM_SERVICE_PROCESSING;
@@ -518,7 +518,7 @@ static int32_t allocatorAllocate(Rm_Handle rmHandle, Rm_Allocator *allocator, in
         if ((findNode.base >= matchingNode->base) && (findEnd <= matchingEnd)) {
             if (opInfo->serviceSrcInstNode == rmPolicyGetLinuxInstNode(rmInst->u.server.globalValidInstTree)) {
                 /* Bypass policy checks since Linux Kernel has full privileges */
-                allocPassesPolicy = true;
+                allocPassesPolicy = RM_TRUE;
             }
             else {
                 policyCheckCfg.policyDtb = opInfo->policy;
@@ -590,11 +590,11 @@ static int32_t allocatorAllocate(Rm_Handle rmHandle, Rm_Allocator *allocator, in
 
                         if (leftNode && allocatorResNodeOwnerCompare(leftNode, matchingNode)) {
                             RB_REMOVE(_Rm_AllocatorResourceTree, allocator->allocatorRootEntry, leftNode);
-                            combineLeft = true;
+                            combineLeft = RM_TRUE;
                         }
                         if (rightNode && allocatorResNodeOwnerCompare(rightNode, matchingNode)) {
                             RB_REMOVE(_Rm_AllocatorResourceTree, allocator->allocatorRootEntry, rightNode);
-                            combineRight = true;
+                            combineRight = RM_TRUE;
                         }
 
                         if (combineLeft && combineRight) {
@@ -749,8 +749,8 @@ static int32_t allocatorFree(Rm_Allocator *allocator, Rm_AllocatorOpInfo *opInfo
     Rm_ResourceNode *matchingNode = NULL;
     Rm_ResourceNode *leftNode = NULL;
     Rm_ResourceNode *rightNode = NULL;
-    bool             combineLeft = false;
-    bool             combineRight = false;
+    int              combineLeft = RM_FALSE;
+    int              combineRight = RM_FALSE;
     uint32_t         findEnd;
     uint32_t         matchingEnd;
     int32_t          retVal;
@@ -782,11 +782,11 @@ static int32_t allocatorFree(Rm_Allocator *allocator, Rm_AllocatorOpInfo *opInfo
 
                         if (leftNode && allocatorResNodeOwnerCompare(leftNode, matchingNode)) {
                             RB_REMOVE(_Rm_AllocatorResourceTree, allocator->allocatorRootEntry, leftNode);
-                            combineLeft = true;
+                            combineLeft = RM_TRUE;
                         }
                         if (rightNode && allocatorResNodeOwnerCompare(rightNode, matchingNode)) {
                             RB_REMOVE(_Rm_AllocatorResourceTree, allocator->allocatorRootEntry, rightNode);
-                            combineRight = true;
+                            combineRight = RM_TRUE;
                         }
 
                         if (combineLeft && combineRight) {
@@ -945,23 +945,23 @@ static int32_t allocatorReserveLinuxResource(Rm_Handle rmHandle, Rm_LinuxAlias *
                                              Rm_LinuxValueRange *linuxValues, Rm_AllocatorOpInfo *opInfo)
 {
     int32_t   retVal = RM_OK;
-    bool      baseFound = false;
-    bool      lengthFound = false;
+    int       baseFound = RM_FALSE;
+    int       lengthFound = RM_FALSE;
     uint32_t  valueIndex = 0;
 
     while ((linuxValues) && (!baseFound || !lengthFound)) {
         if (linuxAlias->baseOffset == valueIndex) {
             opInfo->resourceInfo->base = linuxValues->value;
-            baseFound = true;
+            baseFound = RM_TRUE;
 
             if (linuxAlias->lengthOffset == RM_DTB_UTIL_LINUX_ALIAS_OFFSET_NOT_SET) {
                 opInfo->resourceInfo->length = 1;
-                lengthFound = true;
+                lengthFound = RM_TRUE;
             }
         }
         else if (linuxAlias->lengthOffset == valueIndex) {
             opInfo->resourceInfo->length = linuxValues->value;
-            lengthFound = true;
+            lengthFound = RM_TRUE;
         }
 
         linuxValues = (Rm_LinuxValueRange *)linuxValues->nextValue;
index 8e2a7c74e9a9d54dbc5ed15755aac831cf1cf14b..8e2e34b3eff40a5e512e35e85f7157d99a076654 100644 (file)
@@ -41,7 +41,6 @@
 
 /* Standard includes */
 #include <ctype.h>
-#include <stdbool.h>
 
 /* RM external API includes */
 #include <ti/drv/rm/rm.h>
@@ -113,10 +112,10 @@ static Rm_PolicyPermission *policyParseSubPermission(char *permStrStart, char *p
     uint32_t             permStrLen = (uint32_t)(permStrEnd - permStrStart + 1);
     char                 instNameTemp[RM_NAME_MAX_CHARS];
     uint32_t             instNameIndex;
-    bool                 foundInstName;
-    bool                 instNameComplete;
-    bool                 assignmentLeft;
-    bool                 assignmentRight;
+    int                  foundInstName;
+    int                  instNameComplete;
+    int                  assignmentLeft;
+    int                  assignmentRight;
 
     /* Create a local copy of the sub-permission string */
     permStrPtr = Rm_osalMalloc(permStrLen);
@@ -149,8 +148,8 @@ static Rm_PolicyPermission *policyParseSubPermission(char *permStrStart, char *p
      * Instances names are separated by one or more spaces. */
     permStrPtr = subgroupStart + 1;
     instNameIndex = 0;
-    foundInstName = false;
-    instNameComplete = false;
+    foundInstName = RM_FALSE;
+    instNameComplete = RM_FALSE;
     while (permStrPtr <= subgroupEnd) {
         if ((isspace(*permStrPtr) || (*permStrPtr == RM_POLICY_PERM_SUBGROUP_END))
             && foundInstName) {
@@ -158,13 +157,13 @@ static Rm_PolicyPermission *policyParseSubPermission(char *permStrStart, char *p
              * terminates the instance name.  All other space characters are
              * ignored. */
             instNameTemp[instNameIndex] = '\0';
-            instNameComplete = true
+            instNameComplete = RM_TRUE
         }
         else {
             if (!foundInstName) {
                 /* First non-whitespace character encountered is the start of an
                  * instance name */
-                foundInstName = true;
+                foundInstName = RM_TRUE;
             }
 
             /* Copy the character into the temporary instance name string */
@@ -187,9 +186,9 @@ static Rm_PolicyPermission *policyParseSubPermission(char *permStrStart, char *p
             }
             prevPerm = newPerm;
 
-            instNameComplete = false;
+            instNameComplete = RM_FALSE;
             instNameIndex = 0;
-            foundInstName = false;
+            foundInstName = RM_FALSE;
         }
         else if (instNameIndex == RM_NAME_MAX_CHARS) {
             /* Instance name is longer than max length */
@@ -210,7 +209,7 @@ static Rm_PolicyPermission *policyParseSubPermission(char *permStrStart, char *p
 
     /* Look on left of instance group for permission assignments. */
     permStrPtr = subgroupStart - 1;
-    assignmentLeft = false;
+    assignmentLeft = RM_FALSE;
     while (permStrPtr >= permStrStart)
     {
         if (*permStrPtr == RM_POLICY_PERM_ASSIGNMENT) {
@@ -228,7 +227,7 @@ static Rm_PolicyPermission *policyParseSubPermission(char *permStrStart, char *p
                 return(NULL);
             }
             else {
-                assignmentLeft = true;
+                assignmentLeft = RM_TRUE;
             }
         }
         else if (!isspace(*permStrPtr)) {
@@ -298,7 +297,7 @@ static Rm_PolicyPermission *policyParseSubPermission(char *permStrStart, char *p
 
     /* Look on right of instance group for permission assignments. */
     permStrPtr = subgroupEnd + 1;
-    assignmentRight = false;
+    assignmentRight = RM_FALSE;
     while (permStrPtr < permStrEnd) {
         if (assignmentLeft && (!isspace(*permStrPtr))) {
             /* There should be nothing but spaces on right if assignment was already found on left */
@@ -327,7 +326,7 @@ static Rm_PolicyPermission *policyParseSubPermission(char *permStrStart, char *p
                 return(NULL);                
             }
             else {
-                assignmentRight = true;
+                assignmentRight = RM_TRUE;
             }
         }
         else if (!isspace(*permStrPtr)) {
@@ -545,7 +544,7 @@ Rm_PolicyValidInstNode *rmPolicyGetLinuxInstNode(Rm_PolicyValidInstTree *validIn
  *              permissions for the specified resource in the Policy
  *              DTB.  Otherwise, returns FALSE.
  */
-bool rmPolicyCheckPrivilege(Rm_PolicyCheckCfg *privilegeCfg, int32_t *result)
+int rmPolicyCheckPrivilege(Rm_PolicyCheckCfg *privilegeCfg, int32_t *result)
 {
     int32_t              propertyOffset;
     const char          *propertyName;
@@ -557,7 +556,7 @@ bool rmPolicyCheckPrivilege(Rm_PolicyCheckCfg *privilegeCfg, int32_t *result)
     Rm_PolicyPermission *permissionStart = NULL;
     uint32_t             assignmentEnd;
     uint32_t             resourceEnd = privilegeCfg->resourceBase + privilegeCfg->resourceLength - 1;
-    bool                 foundInstance;
+    int                  foundInstance;
 
     /* Get the resource's assignments */
     propertyOffset = fdt_first_property_offset(privilegeCfg->policyDtb, privilegeCfg->resourceOffset);
@@ -575,7 +574,7 @@ bool rmPolicyCheckPrivilege(Rm_PolicyCheckCfg *privilegeCfg, int32_t *result)
     if (assignment) {
         while (assignment) {
             assignmentEnd = assignment->resourceBase + assignment->resourceLength - 1;
-            foundInstance = false;
+            foundInstance = RM_FALSE;
             if (((privilegeCfg->resourceBase >= assignment->resourceBase) &&
                  (privilegeCfg->resourceBase <= assignmentEnd)) ||
                 ((privilegeCfg->resourceBase < assignment->resourceBase) &&
@@ -587,35 +586,35 @@ bool rmPolicyCheckPrivilege(Rm_PolicyCheckCfg *privilegeCfg, int32_t *result)
                 while (permission) {
                     if ((strncmp(permission->instName, privilegeCfg->validInstNode->name, RM_NAME_MAX_CHARS) == 0) ||
                         (strncmp(permission->instName, Rm_policyAllInstances, RM_NAME_MAX_CHARS) == 0)) {
-                        foundInstance = true;
+                        foundInstance = RM_TRUE;
                         
                         /* Check instance's permissions */
                         if (privilegeCfg->type == Rm_policyCheck_INIT) {
                             if (!RM_policy_GET_PERM(permission->permissionBits, RM_POLICY_PERM_INIT_SHIFT)) {
                                 policyFreeAssignmentPermissions(permissionStart);
                                 rmDtbUtilPolicyFreeAssignments(assignmentStart);
-                                return(false);
+                                return(RM_FALSE);
                             }
                         }
                         else if (privilegeCfg->type == Rm_policyCheck_USE) {
                             if (!RM_policy_GET_PERM(permission->permissionBits, RM_POLICY_PERM_USE_SHIFT)) {
                                 policyFreeAssignmentPermissions(permissionStart);
                                 rmDtbUtilPolicyFreeAssignments(assignmentStart);
-                                return(false);
+                                return(RM_FALSE);
                             }   
                         }
                         else if (privilegeCfg->type == Rm_policyCheck_EXCLUSIVE) {
                             if (!RM_policy_GET_PERM(permission->permissionBits, RM_POLICY_PERM_EXCLUSIVE_SHIFT)) {
                                 policyFreeAssignmentPermissions(permissionStart);
                                 rmDtbUtilPolicyFreeAssignments(assignmentStart);
-                                return(false);
+                                return(RM_FALSE);
                             }   
                         }
                         else if (privilegeCfg->type == Rm_policyCheck_SHARED_LINUX) {
                             if (!RM_policy_GET_PERM(permission->permissionBits, RM_POLICY_PERM_SHARED_LINUX_SHIFT)) {
                                 policyFreeAssignmentPermissions(permissionStart);
                                 rmDtbUtilPolicyFreeAssignments(assignmentStart);
-                                return(false);
+                                return(RM_FALSE);
                             }   
                         }                        
                         break;
@@ -626,7 +625,7 @@ bool rmPolicyCheckPrivilege(Rm_PolicyCheckCfg *privilegeCfg, int32_t *result)
                 policyFreeAssignmentPermissions(permissionStart);
                 if (!foundInstance) {
                     rmDtbUtilPolicyFreeAssignments(assignmentStart);
-                    return(false);
+                    return(RM_FALSE);
                 }
             }
             assignment = assignment->nextAssignment;
@@ -634,10 +633,10 @@ bool rmPolicyCheckPrivilege(Rm_PolicyCheckCfg *privilegeCfg, int32_t *result)
         rmDtbUtilPolicyFreeAssignments(assignmentStart);
     }
     else {
-        return(false);
+        return(RM_FALSE);
     }
     
-    return(true);
+    return(RM_TRUE);
 }
 
 /* FUNCTION PURPOSE: Returns resource base value according to the Policy
@@ -870,7 +869,7 @@ int32_t rmPolicyValidatePolicy(void *policyDtb, Rm_PolicyValidInstTree *validIns
  *              "valid-instances" property at the top of the Policy.
  *              The root entry of the valid instance tree is returned.
  */
-Rm_PolicyValidInstTree *rmPolicyCreateValidInstTree(void *policyDtb, bool addLinux, int32_t *result)
+Rm_PolicyValidInstTree *rmPolicyCreateValidInstTree(void *policyDtb, int addLinux, int32_t *result)
 {
     int32_t                 validInstOffset;
     const char             *validInstName = NULL;
index 8b93933d5b4070ab0debcfacc2531e32321c0d14..6cd585e5d38c7c8adf9d074b9eba0cb0da561298 100644 (file)
@@ -41,7 +41,6 @@
 \r
 /* Standard includes */\r
 #include <string.h>\r
-#include <stdbool.h>\r
 \r
 /* RM external includes */\r
 #include <ti/drv/rm/rm.h>\r
@@ -100,18 +99,18 @@ static Rm_Transport *transportAdd(const Rm_TransportCfg *transportCfg)
  * DESCRIPTION: Returns TRUE if the supplied transport is found in\r
  *              the instance transport list.  Otherwise, returns FALSE\r
  */\r
-static bool transportIsRegistered(Rm_Handle rmHandle, Rm_Transport *transport)\r
+static int transportIsRegistered(Rm_Handle rmHandle, Rm_Transport *transport)\r
 {\r
     Rm_Inst      *rmInst = (Rm_Inst *)rmHandle;\r
     Rm_Transport *transportList = (Rm_Transport *)rmInst->transports;\r
     \r
     while (transportList) {\r
         if (transportList == transport) {\r
-            return(true);             \r
+            return(RM_TRUE);             \r
         }\r
         transportList = transportList->nextTransport;\r
     }\r
-    return (false);\r
+    return (RM_FALSE);\r
 }\r
 \r
 /* FUNCTION PURPOSE: Deletes a transport\r
@@ -240,7 +239,7 @@ Rm_TransportHandle Rm_transportRegister (const Rm_TransportCfg *transportCfg, in
         transport = transportAdd(transportCfg);\r
         if ((transport->remoteInstType == Rm_instType_CLIENT_DELEGATE) ||\r
             (transport->remoteInstType == Rm_instType_SERVER)) {\r
-            rmInst->registeredWithDelegateOrServer = true;\r
+            rmInst->registeredWithDelegateOrServer = RM_TRUE;\r
         }\r
     }\r
 \r
@@ -262,7 +261,7 @@ int32_t Rm_transportUnregister(Rm_TransportHandle transportHandle)
     if (transportIsRegistered(transport->rmHandle, transport)) {\r
         if ((transport->remoteInstType == Rm_instType_CLIENT_DELEGATE) ||\r
             (transport->remoteInstType == Rm_instType_SERVER)) {\r
-            rmInst->registeredWithDelegateOrServer = false;\r
+            rmInst->registeredWithDelegateOrServer = RM_FALSE;\r
         }\r
         transportDelete(transport);\r
     }\r
@@ -327,7 +326,7 @@ int32_t Rm_receivePacket(Rm_TransportHandle transportHandle, const Rm_Packet *pk
                     (resourceRespPkt->requestState != RM_SERVICE_APPROVED)) {\r
                     /* Lock the RM instance since service validated against static policy failed against \r
                      * Server's global policy */\r
-                    rmInst->isLocked = true;\r
+                    rmInst->isLocked = RM_TRUE;\r
                 }\r
                 transaction->state = resourceRespPkt->requestState;\r
 \r
@@ -375,7 +374,7 @@ int32_t Rm_receivePacket(Rm_TransportHandle transportHandle, const Rm_Packet *pk
                     (nsResponsePkt->requestState != RM_SERVICE_APPROVED)) {\r
                     /* Lock the RM instance since service validated against static policy failed against \r
                      * Server's global policy */                    \r
-                    rmInst->isLocked = true;\r
+                    rmInst->isLocked = RM_TRUE;\r
                 }                \r
                 transaction->state = nsResponsePkt->requestState;            \r
             }\r
index 6536c43baa6b32502f5ff0ab22e023f117844f3a..ee5c92468c4850a07d7cfad50b76de379953b959 100644 (file)
 
 /* Standard includes */
 #include <string.h>
-#include <stdbool.h>
 
 /* RM external API includes */
 #include <ti/drv/rm/rm.h>
 
 /* RM internal API includes */
+#include <ti/drv/rm/include/rm_internal.h>
 #include <ti/drv/rm/include/rm_treeloc.h>
 
 /* RM OSAL layer */
@@ -121,7 +121,7 @@ Rm_PolicyValidInstNode *rmPolicyValidInstNodeNew(char *instName)
     
     strncpy(newNode->name, instName, RM_NAME_MAX_CHARS);
     newNode->allocRefCount = 0;
-    newNode->deletePending = false;
+    newNode->deletePending = RM_FALSE;
     
     return(newNode);
 }
index 76b8784ab3fa21ebcee35008659a4abe39a1dd71..5f9fafc1a58ee789701cb3757165d7b376319f71 100644 (file)
@@ -40,7 +40,6 @@
  
 /* Standard Includes */
 #include <string.h>
-#include <stdbool.h>
 
 /* XDC Includes */
 #include <xdc/std.h>
  ************************** RM Test Symbols ***************************
  **********************************************************************/
 
+/* Test FALSE */
+#define RM_TEST_FALSE 0
+/* Test TRUE */
+#define RM_TEST_TRUE  1
+
 /* IPC MessageQ heap name */
 #define MSGQ_HEAP_NAME               "msgQHeapBuf"
 /* IPC MessageQ heap ID */
@@ -364,7 +368,7 @@ void serviceCallback(Rm_ServiceRespInfo *serviceResponse)
     memcpy((void *)&responseInfoQueue[qIndex], (void *)serviceResponse, sizeof(Rm_ServiceRespInfo));
 }
 
-bool waitForResponse(Rm_ServiceRespInfo *respInfo)
+void waitForResponse(Rm_ServiceRespInfo *respInfo)
 {
     uint32_t qIndex = 0;
 
@@ -383,11 +387,10 @@ bool waitForResponse(Rm_ServiceRespInfo *respInfo)
         memcpy((void *)respInfo, (void *)&responseInfoQueue[qIndex], sizeof(Rm_ServiceRespInfo));
         memset((void *)&responseInfoQueue[qIndex], 0, sizeof(Rm_ServiceRespInfo));
     }
-    return(TRUE);
 }
 
 void setRmRequest(Rm_ServiceReqInfo *reqInfo, Rm_ServiceType type, const char *resName, int32_t resBase,
-                  uint32_t resLen, int32_t resAlign, const char *nsName, bool setCallback, Rm_ServiceRespInfo *respInfo)
+                  uint32_t resLen, int32_t resAlign, const char *nsName, int setCallback, Rm_ServiceRespInfo *respInfo)
 {                                                                                
     memset((void *)reqInfo, 0, sizeof(Rm_ServiceReqInfo));                                        
     reqInfo->type = type;                                                                           
@@ -445,7 +448,7 @@ void rmCleanupTsk(UArg arg0, UArg arg1)
 
         Rm_transportUnregister(rmTransportMap[SERVER_TO_CD_MAP_ENTRY].transportHandle);
 
-        result = Rm_delete(rmServerHandle, true);
+        result = Rm_delete(rmServerHandle, RM_TEST_TRUE);
         if (result != RM_OK) {
             System_printf("Core %d: RM server instance delete failed with error %d\n", coreNum, result);
         }        
@@ -458,11 +461,11 @@ void rmCleanupTsk(UArg arg0, UArg arg1)
         Rm_transportUnregister(rmTransportMap[CD_TO_CLIENT_MAP_ENTRY].transportHandle);
         Rm_transportUnregister(rmTransportMap[CLIENT_TO_CD_MAP_ENTRY].transportHandle);
 
-        result = Rm_delete(rmCdHandle, true);
+        result = Rm_delete(rmCdHandle, RM_TEST_TRUE);
         if (result != RM_OK) {
             System_printf("Core %d: RM cd instance delete failed with error %d\n", coreNum, result);
         }  
-        result = Rm_delete(rmClientHandle, true);
+        result = Rm_delete(rmClientHandle, RM_TEST_TRUE);
         if (result != RM_OK) {
             System_printf("Core %d: RM client instance delete failed with error %d\n", coreNum, result);
         }          
@@ -498,7 +501,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
 
     /* BEGIN testing UNSPECIFIED base and alignment requests on Server */               
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_USE, resourceNameGpQ, 
-                 RM_RESOURCE_BASE_UNSPECIFIED, 1, 0, NULL, TRUE, &responseInfo);       
+                 RM_RESOURCE_BASE_UNSPECIFIED, 1, 0, NULL, RM_TEST_TRUE, &responseInfo);       
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s use allocation of %s UNSPECIFIED base %d length %d alignment : ", coreNum,
                                                                                                   rmServerName,
@@ -513,7 +516,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
     }    
                
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_USE, resourceNameGpQ, 
-                 RM_RESOURCE_BASE_UNSPECIFIED, 1, RM_RESOURCE_ALIGNMENT_UNSPECIFIED, NULL, TRUE, &responseInfo);     
+                 RM_RESOURCE_BASE_UNSPECIFIED, 1, RM_RESOURCE_ALIGNMENT_UNSPECIFIED, NULL, RM_TEST_TRUE, &responseInfo);     
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);  
     System_printf("Core %d : %s use allocation of %s UNSPECIFIED base %d length UNSPECIFIED alignment : ", coreNum,
                                                                                                            rmServerName,
@@ -527,7 +530,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
     }     
 
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_USE, resourceNameGpQ, 
-                 RM_RESOURCE_BASE_UNSPECIFIED, 1, 200, NULL, TRUE, &responseInfo);     
+                 RM_RESOURCE_BASE_UNSPECIFIED, 1, 200, NULL, RM_TEST_TRUE, &responseInfo);     
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s use allocation of %s UNSPECIFIED base %d length %d alignment : ", coreNum,
                                                                                                   rmServerName,
@@ -544,7 +547,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
 
     /* Create new NameServer object */                
     setRmRequest(&requestInfo, Rm_service_RESOURCE_MAP_TO_NAME, resourceNameGpQ, 
-                 1002, 1, 0, nameServerNameFavQ, TRUE, &responseInfo);     
+                 1002, 1, 0, nameServerNameFavQ, RM_TEST_TRUE, &responseInfo);     
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo); 
     System_printf("Core %d : %s create name %s tied to %s %d - %d : ", coreNum,
                                                                        rmServerName,
@@ -566,7 +569,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
 
     /* Try to allocate the memory region taken by the Linux Kernel and not specified as shared */
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_USE, resourceNameMemRegion, 
-                 12, 1, 0, NULL, TRUE, &responseInfo);     
+                 12, 1, 0, NULL, RM_TEST_TRUE, &responseInfo);     
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo); 
     System_printf("Core %d : %s use allocation of %s %d - %d : ", coreNum,
                                                                   rmServerName,
@@ -582,7 +585,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
 
     /* BEGIN testing expansion/contraction of resource nodes with the AIF RX CH resource */
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_USE, resourceNameAifRxCh, 
-                 14, 5, 0, NULL, TRUE, &responseInfo);       
+                 14, 5, 0, NULL, RM_TEST_TRUE, &responseInfo);       
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s use allocation of %s %d - %d : ", coreNum,
                                                                   rmServerName,
@@ -597,7 +600,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
     } 
     
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_USE, resourceNameAifRxCh, 
-                 19, 31, 0, NULL, TRUE, &responseInfo);      
+                 19, 31, 0, NULL, RM_TEST_TRUE, &responseInfo);      
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s use allocation of %s %d - %d : ", coreNum,
                                                                   rmServerName,
@@ -616,7 +619,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
     GateMP_leave(gateHandle, gateKey);       
 
     setRmRequest(&requestInfo, Rm_service_RESOURCE_FREE, resourceNameAifRxCh, 
-                 25, 3, 0, NULL, TRUE, &responseInfo);      
+                 25, 3, 0, NULL, RM_TEST_TRUE, &responseInfo);      
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);  
     System_printf("Core %d : %s free of %s %d - %d : ", coreNum,
                                                         rmServerName,
@@ -631,7 +634,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
     }      
     
     setRmRequest(&requestInfo, Rm_service_RESOURCE_FREE, resourceNameAifRxCh, 
-                 34, 3, 0, NULL, TRUE, &responseInfo);      
+                 34, 3, 0, NULL, RM_TEST_TRUE, &responseInfo);      
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s free of %s %d - %d : ", coreNum,
                                                         rmServerName,
@@ -646,7 +649,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
     }      
  
     setRmRequest(&requestInfo, Rm_service_RESOURCE_FREE, resourceNameAifRxCh, 
-                 28, 6, 0, NULL, TRUE, &responseInfo);      
+                 28, 6, 0, NULL, RM_TEST_TRUE, &responseInfo);      
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);   
     System_printf("Core %d : %s free of %s %d - %d : ", coreNum,
                                                         rmServerName,
@@ -661,7 +664,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
     }      
 
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_USE, resourceNameAifRxCh, 
-                 53, 2, 0, NULL, TRUE, &responseInfo);      
+                 53, 2, 0, NULL, RM_TEST_TRUE, &responseInfo);      
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);  
     System_printf("Core %d : %s use allocation of %s %d - %d : ", coreNum,
                                                                   rmServerName,
@@ -678,7 +681,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
     
     /* Test execlusive rights to an allocated resource */
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_USE, resourceNameAifRxCh, 
-                 2, 2, 0, NULL, TRUE, &responseInfo);      
+                 2, 2, 0, NULL, RM_TEST_TRUE, &responseInfo);      
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s use allocation of %s %d - %d : ", coreNum,
                                                                   rmServerName,
@@ -699,7 +702,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
     /* Test allocation of a resource twice from the same instance with init and use privileges.  Both
      * should be approved but the instance should only be mentioned once in the resource's owner list */
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameGpQ, 
-                 6543, 10, 0, NULL, TRUE, &responseInfo);      
+                 6543, 10, 0, NULL, RM_TEST_TRUE, &responseInfo);      
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);  
     System_printf("Core %d : %s init allocation of %s %d - %d : ", coreNum,
                                                                    rmServerName,
@@ -714,7 +717,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
     }     
 
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_USE, resourceNameGpQ, 
-                 6543, 10, 0, NULL, TRUE, &responseInfo);      
+                 6543, 10, 0, NULL, RM_TEST_TRUE, &responseInfo);      
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s use allocation of %s %d - %d : ", coreNum,
                                                                   rmServerName,
@@ -730,7 +733,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
 
     /* Allocate infrastructure queue taken by Linux kernel and shared with Rm_Client.  Expect error or denial. */
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameInfraQ, 
-                 805, 1, 0, NULL, TRUE, &responseInfo);     
+                 805, 1, 0, NULL, RM_TEST_TRUE, &responseInfo);     
     rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s init allocation of %s %d - %d : ", coreNum,
                                                                    rmServerName,
@@ -747,7 +750,7 @@ void rmServerTsk(UArg arg0, UArg arg1)
     System_printf("Core %d: Testing is complete\n", coreNum);
 
     Rm_instanceStatus(rmServerHandle);
-    Rm_resourceStatus(rmServerHandle, TRUE);   
+    Rm_resourceStatus(rmServerHandle, RM_TEST_TRUE);   
     
     /* Create the RM cleanup task. */
     System_printf("Core %d: Creating RM cleanup task...\n", coreNum);
@@ -767,7 +770,7 @@ void rmClientTsk(UArg arg0, UArg arg1)
 
     /* Retrieve a resource via a NameServer name */
     setRmRequest(&requestInfo, Rm_service_RESOURCE_GET_BY_NAME, NULL, 
-                 0, 0, 0, nameServerNameFavQ, TRUE, &responseInfo);     
+                 0, 0, 0, nameServerNameFavQ, RM_TEST_TRUE, &responseInfo);     
     rmCdServiceHandle->Rm_serviceHandler(rmCdServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s get resource with name %s : ", coreNum,
                                                                rmCdName,
@@ -808,7 +811,7 @@ void rmClientTsk(UArg arg0, UArg arg1)
 
     /* Free resource via a NameServer name */
     setRmRequest(&requestInfo, Rm_service_RESOURCE_FREE, NULL, 
-                 0, 0, 0, nameServerNameFavQ, TRUE, &responseInfo);     
+                 0, 0, 0, nameServerNameFavQ, RM_TEST_TRUE, &responseInfo);     
     rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s free resource with name %s : ", coreNum,
                                                                 rmClientName,
@@ -825,7 +828,7 @@ void rmClientTsk(UArg arg0, UArg arg1)
 
     /* Delete the NameServer name */
     setRmRequest(&requestInfo, Rm_service_RESOURCE_UNMAP_NAME, NULL, 
-                 0, 0, 0, nameServerNameFavQ, TRUE, &responseInfo);     
+                 0, 0, 0, nameServerNameFavQ, RM_TEST_TRUE, &responseInfo);     
     rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);     
     System_printf("Core %d : %s delete name %s : ", coreNum,
                                                     rmClientName,
@@ -845,7 +848,7 @@ void rmClientTsk(UArg arg0, UArg arg1)
 
     /* BEGIN testing expansion/contraction of resource nodes with the AIF RX CH resource */
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_USE, resourceNameAifRxCh, 
-                 0, 6, 0, NULL, TRUE, &responseInfo);     
+                 0, 6, 0, NULL, RM_TEST_TRUE, &responseInfo);     
     rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s use allocation of %s %d - %d : ", coreNum,
                                                                   rmClientName,
@@ -863,7 +866,7 @@ void rmClientTsk(UArg arg0, UArg arg1)
     }     
     
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameAifRxCh, 
-                 50, 7, 0, NULL, TRUE, &responseInfo);        
+                 50, 7, 0, NULL, RM_TEST_TRUE, &responseInfo);        
     rmCdServiceHandle->Rm_serviceHandler(rmCdServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s init allocation of %s %d - %d : ", coreNum,
                                                                    rmCdName,
@@ -886,7 +889,7 @@ void rmClientTsk(UArg arg0, UArg arg1)
 
     /* BEGIN testing allocations with UNSPECIFIED base and alignment values */
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_USE, resourceNameAccumCh, 
-                 RM_RESOURCE_BASE_UNSPECIFIED, 5, 4, NULL, TRUE, &responseInfo);        
+                 RM_RESOURCE_BASE_UNSPECIFIED, 5, 4, NULL, RM_TEST_TRUE, &responseInfo);        
     rmCdServiceHandle->Rm_serviceHandler(rmCdServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s use allocation of %s UNSPECIFIED base %d length %d alignment : ", coreNum,
                                                                                                   rmCdName,
@@ -904,7 +907,7 @@ void rmClientTsk(UArg arg0, UArg arg1)
     }        
 
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_USE, resourceNameAccumCh, 
-                 RM_RESOURCE_BASE_UNSPECIFIED, 2, 1, NULL, TRUE, &responseInfo);      
+                 RM_RESOURCE_BASE_UNSPECIFIED, 2, 1, NULL, RM_TEST_TRUE, &responseInfo);      
     rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo); 
     System_printf("Core %d : %s use allocation of %s UNSPECIFIED base %d length %d alignment : ", coreNum,
                                                                                                   rmClientName,
@@ -922,7 +925,7 @@ void rmClientTsk(UArg arg0, UArg arg1)
     }     
 
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_USE, resourceNameAccumCh, 
-                 RM_RESOURCE_BASE_UNSPECIFIED, 2, RM_RESOURCE_ALIGNMENT_UNSPECIFIED, NULL, TRUE, &responseInfo);     
+                 RM_RESOURCE_BASE_UNSPECIFIED, 2, RM_RESOURCE_ALIGNMENT_UNSPECIFIED, NULL, RM_TEST_TRUE, &responseInfo);     
     rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s use allocation of %s UNSPECIFIED base %d length UNSPECIFIED alignment : ", coreNum,
                                                                                                            rmClientName,
@@ -941,7 +944,7 @@ void rmClientTsk(UArg arg0, UArg arg1)
 
     /* Allocate infrastructure queue shared between Linux kernel and Client */
     setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameInfraQ, 
-                 800, 1, 0, NULL, TRUE, &responseInfo);     
+                 800, 1, 0, NULL, RM_TEST_TRUE, &responseInfo);     
     rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
     System_printf("Core %d : %s init allocation of %s %d - %d : ", coreNum,
                                                                    rmClientName,
@@ -1394,7 +1397,7 @@ int main(Int argc, Char* argv[])
 
         /* Static allocation tests */
         setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameQosCluster, 
-                     0, 1, 0, NULL, TRUE, &responseInfo);
+                     0, 1, 0, NULL, RM_TEST_TRUE, &responseInfo);
         rmCdServiceHandle->Rm_serviceHandler(rmCdServiceHandle->rmHandle, &requestInfo, &responseInfo);
         System_printf("Core %d : %s static init allocation of %s %d - %d : ", coreNum,
                                                                               rmCdName,
@@ -1410,7 +1413,7 @@ int main(Int argc, Char* argv[])
         }        
         
         setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameQosCluster, 
-                     2, 1, 0, NULL, TRUE, &responseInfo);        
+                     2, 1, 0, NULL, RM_TEST_TRUE, &responseInfo);        
         rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
         System_printf("Core %d : %s static init allocation of %s %d - %d : ", coreNum,
                                                                               rmClientName,
@@ -1427,7 +1430,7 @@ int main(Int argc, Char* argv[])
 
         /* Request resource from Client that can only be allocated to CD according to static policy */
         setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameQosCluster, 
-                     1, 1, 0, NULL, TRUE, &responseInfo);        
+                     1, 1, 0, NULL, RM_TEST_TRUE, &responseInfo);        
         rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
         System_printf("Core %d : %s static init allocation of %s %d - %d : ", coreNum,
                                                                               rmClientName,
@@ -1443,7 +1446,7 @@ int main(Int argc, Char* argv[])
 
         /* Request resource from both Client and CD that is shared according to static policy */
         setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameAifQ, 
-                     525, 1, 0, NULL, TRUE, &responseInfo);        
+                     525, 1, 0, NULL, RM_TEST_TRUE, &responseInfo);        
         rmCdServiceHandle->Rm_serviceHandler(rmCdServiceHandle->rmHandle, &requestInfo, &responseInfo);
         System_printf("Core %d : %s static init allocation of %s %d - %d : ", coreNum,
                                                                               rmCdName,
@@ -1459,7 +1462,7 @@ int main(Int argc, Char* argv[])
         }
 
         setRmRequest(&requestInfo, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameAifQ, 
-                     525, 1, 0, NULL, TRUE, &responseInfo);        
+                     525, 1, 0, NULL, RM_TEST_TRUE, &responseInfo);        
         rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
         System_printf("Core %d : %s static init allocation of %s %d - %d : ", coreNum,
                                                                               rmClientName,