Started cleanup of test code
authorJustin Sobota <jsobota@ti.com>
Thu, 28 Feb 2013 20:31:45 +0000 (15:31 -0500)
committerJustin Sobota <jsobota@ti.com>
Thu, 28 Feb 2013 20:31:45 +0000 (15:31 -0500)
package.xdc
test/rm_test.c

index 50fee562c88030028fc8ffcffe43386a56d738d4..bc4f9b5ec1fb450940c2057a6ea0afc7b207c179 100644 (file)
@@ -9,6 +9,6 @@
  * Copyright (C) 2012-2013, Texas Instruments, Inc.\r
  *****************************************************************************/\r
 \r
-package ti.drv.rm[02, 00, 00, 01] {\r
+package ti.drv.rm[02, 00, 00, 02] {\r
     module Settings;\r
 }\r
index ef9adabe3bdc20460701143f2b4a1eec8771489b..8b63958932d8ec83e2cd4e8067c1d1ecb2fc80f0 100644 (file)
 #include <ti/csl/csl_xmcAux.h>
 
 /* ======== Task Handles ======== */
-Task_Handle startupRmTskHandle;
-Task_Handle testReceiveTskHandle;
-Task_Handle testRmTskHandle;
+Task_Handle rmStartupTskHandle;
+Task_Handle rmReceiveTskHandle;
+Task_Handle rmServerTskHandle;
+Task_Handle rmClientTskHandle;
 
 /* ======== Application Heaps ======== */
 #define RM_PKT_HEAP_NAME   "rmHeapBuf"
@@ -401,23 +402,34 @@ bool blockForResponse(Rm_ServiceRespInfo *respInfo)
  *  ======== testRmTsk ========
  *  RM cleanup task
  */
-void cleanupRmTsk(UArg arg0, UArg arg1)
+void rmCleanupTsk(UArg arg0, UArg arg1)
 {
     int32_t result;
     
-    /* Delete the RM test task */
-    System_printf("Core %d: Deleting RM test task...\n", MultiProc_self());
-    if (testRmTskHandle) {
-        Task_delete(&testRmTskHandle);
-        /* Set the task handle to be NULL so that the delete only occurs once */
-        testRmTskHandle = NULL;
+    /* Delete the RM test tasks */
+    if (MultiProc_self() == 0) {
+        if (rmServerTskHandle) {
+            System_printf("Core %d: Deleting RM server task...\n", MultiProc_self());
+            Task_delete(&rmServerTskHandle);
+            /* Set the task handle to be NULL so that the delete only occurs once */
+            rmServerTskHandle = NULL;
+        }
+    }
+    else if (MultiProc_self() == 1) {
+        if (rmClientTskHandle) {
+            System_printf("Core %d: Deleting RM client task...\n", MultiProc_self());        
+            Task_delete(&rmClientTskHandle);
+            /* Set the task handle to be NULL so that the delete only occurs once */
+            rmClientTskHandle = NULL;
+        }
     }
+    
     /* Delete the RM receive task */
     System_printf("Core %d: Deleting RM receive task...\n", MultiProc_self());
-    if (testReceiveTskHandle) {
-        Task_delete(&testReceiveTskHandle);
+    if (rmReceiveTskHandle) {
+        Task_delete(&rmReceiveTskHandle);
         /* Set the task handle to be NULL so that the delete only occurs once */
-        testReceiveTskHandle = NULL;
+        rmReceiveTskHandle = NULL;
     }
 
     /* Cleanup all service ports, transport handles, RM instances, and IPC constructs */
@@ -456,7 +468,7 @@ void cleanupRmTsk(UArg arg0, UArg arg1)
  *  ======== testRmTsk ========
  *  RM test task
  */
-void testReceiveTsk(UArg arg0, UArg arg1)
+void rmReceiveTsk(UArg arg0, UArg arg1)
 {
     while(1) {
         if (MultiProc_self() == 0) {
@@ -473,730 +485,749 @@ void testReceiveTsk(UArg arg0, UArg arg1)
 }
 
 /*
- *  ======== testRmTsk ========
- *  RM test task
+ *  ======== testRmServerTsk ========
+ *  RM Server test task
  */
-void testRmTsk(UArg arg0, UArg arg1)
+void rmServerTsk(UArg arg0, UArg arg1)
 {
     Rm_ServiceReqInfo requestInfo;
-    Task_Params taskParams;
-    int32_t result;
+    Task_Params       taskParams;
+    int32_t           result;
        
     /* Delete the RM startup task */
     System_printf("Core %d: Deleting RM startup task...\n", MultiProc_self());
-    if (startupRmTskHandle) {
-        Task_delete(&startupRmTskHandle);
+    if (rmStartupTskHandle) {
+        Task_delete(&rmStartupTskHandle);
         /* Set the task handle to be NULL so that the delete only occurs once */
-        startupRmTskHandle = NULL;
+        rmStartupTskHandle = NULL;
     }
 
-    /* Open service ports on all the RM instances to test service requests from the different
+    /* Open service ports on Server instance to test service requests from the different
      * RM instances */
-    if (MultiProc_self() == 0) {
-        rmServerServiceHandle = Rm_serviceOpenHandle(rmServerHandle, &result);
+    rmServerServiceHandle = Rm_serviceOpenHandle(rmServerHandle, &result);
 
-        Rm_printInstanceStatus(rmServerHandle);
-    }
-    else if (MultiProc_self() == 1) {
-        /* CD and Client serviceHandles were allocated in main() for static allocations.
-         * just reuse */
-         
-        Rm_printInstanceStatus(rmClientDelegateHandle);
-        Rm_printInstanceStatus(rmClientHandle);
-    }
+    Rm_printInstanceStatus(rmServerHandle);
 
     memset((void *)&requestInfo, 0, sizeof(Rm_ServiceReqInfo));
     memset((void *)&responseInfo, 0, sizeof(Rm_ServiceRespInfo));
 
-    System_printf("Core %d: Testing NameServer features...\n", MultiProc_self());
+    /* Issue the service request create a new NameServer object via the service port */                
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
+    requestInfo.resourceName = resourceNameGpQ;
+    requestInfo.resourceBase = RM_RESOURCE_BASE_UNSPECIFIED;
+    requestInfo.resourceLength = 1;
+    requestInfo.resourceAlignment = 0;
+    
+    System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmServerName,
+                                                                                      responseInfo.resourceName, 
+                                                                                      responseInfo.resourceBase,
+                                                                                      responseInfo.resourceLength);            
+        }  
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+
+    /* Issue the service request create a new NameServer object via the service port */                
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
+    requestInfo.resourceName = resourceNameGpQ;
+    requestInfo.resourceBase = RM_RESOURCE_BASE_UNSPECIFIED;
+    requestInfo.resourceLength = 1;
+    requestInfo.resourceAlignment = RM_RESOURCE_ALIGNMENT_UNSPECIFIED;
+    
+    System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmServerName,
+                                                                                      responseInfo.resourceName, 
+                                                                                      responseInfo.resourceBase,
+                                                                                      responseInfo.resourceLength);            
+        } 
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+
+    /* Issue the service request create a new NameServer object via the service port */                
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
+    requestInfo.resourceName = resourceNameGpQ;
+    requestInfo.resourceBase = RM_RESOURCE_BASE_UNSPECIFIED;
+    requestInfo.resourceLength = 1;
+    requestInfo.resourceAlignment = 200;
+    
+    System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmServerName,
+                                                                                      responseInfo.resourceName, 
+                                                                                      responseInfo.resourceBase,
+                                                                                      responseInfo.resourceLength);            
+        }  
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
 
-    /* Use the service ports to test the service requests */
-    if (MultiProc_self() == 0) {
-        /* Issue the service request create a new NameServer object via the service port */                
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
-        requestInfo.resourceName = resourceNameGpQ;
-        requestInfo.resourceBase = RM_RESOURCE_BASE_UNSPECIFIED;
-        requestInfo.resourceLength = 1;
-        requestInfo.resourceAlignment = 0;
-        
-        System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmServerName,
-                                                                                          responseInfo.resourceName, 
-                                                                                          responseInfo.resourceBase,
-                                                                                          responseInfo.resourceLength);            
-            }  
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
+//    Rm_printResourceStatus(rmServerHandle);
 
-        /* Issue the service request create a new NameServer object via the service port */                
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
-        requestInfo.resourceName = resourceNameGpQ;
-        requestInfo.resourceBase = RM_RESOURCE_BASE_UNSPECIFIED;
-        requestInfo.resourceLength = 1;
-        requestInfo.resourceAlignment = RM_RESOURCE_ALIGNMENT_UNSPECIFIED;
-        
-        System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmServerName,
-                                                                                          responseInfo.resourceName, 
-                                                                                          responseInfo.resourceBase,
-                                                                                          responseInfo.resourceLength);            
-            } 
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
 
-        /* Issue the service request create a new NameServer object via the service port */                
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
-        requestInfo.resourceName = resourceNameGpQ;
-        requestInfo.resourceBase = RM_RESOURCE_BASE_UNSPECIFIED;
-        requestInfo.resourceLength = 1;
-        requestInfo.resourceAlignment = 200;
-        
-        System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmServerName,
-                                                                                          responseInfo.resourceName, 
-                                                                                          responseInfo.resourceBase,
-                                                                                          responseInfo.resourceLength);            
-            }  
+    /* Issue the service request create a new NameServer object via the service port */                
+    requestInfo.type = Rm_service_RESOURCE_MAP_TO_NAME;
+    requestInfo.resourceName = resourceNameGpQ;
+    requestInfo.resourceBase = 1002;
+    requestInfo.resourceLength = 1;
+    requestInfo.resourceNsName = nameServerNameFavQ;
+    
+    System_printf("Core %d: %s creating NameServer object...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s created NameServer object: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                             rmServerName,
+                                                                                             nameServerNameFavQ, 
+                                                                                             requestInfo.resourceBase,
+                                                                                             requestInfo.resourceLength);            
         }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
-
-    //    Rm_printResourceStatus(rmServerHandle);
-
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
 
-        /* Issue the service request create a new NameServer object via the service port */                
-        requestInfo.type = Rm_service_RESOURCE_MAP_TO_NAME;
-        requestInfo.resourceName = resourceNameGpQ;
-        requestInfo.resourceBase = 1002;
-        requestInfo.resourceLength = 1;
-        requestInfo.resourceNsName = nameServerNameFavQ;
-        
-        System_printf("Core %d: %s creating NameServer object...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s created NameServer object: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                                 rmServerName,
-                                                                                                 nameServerNameFavQ, 
-                                                                                                 requestInfo.resourceBase,
-                                                                                                 requestInfo.resourceLength);            
-            }
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
+    /* Wait for Client Delegate and Client to retrieve resource via the name and allocate it */
+    waitOnSyncObj();
 
-        /* Wait for Client Delegate and Client to retrieve resource via the name and allocate it */
-        waitOnSyncObj();
+//    Rm_printResourceStatus(rmServerHandle);
 
-    //    Rm_printResourceStatus(rmServerHandle);
+    /* Wait for Client to free resource via the NameServer and delete the NameServer object. */
+    waitOnSyncObj();
 
-        /* Wait for Client to free resource via the NameServer and delete the NameServer object. */
-        waitOnSyncObj();
+//    Rm_printResourceStatus(rmServerHandle);
 
-    //    Rm_printResourceStatus(rmServerHandle);
+    /* Try to allocate the memory region taken by the Linux Kernel */
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
+    requestInfo.resourceName = resourceNameMemRegion;
+    requestInfo.resourceBase = 12;
+    requestInfo.resourceLength = 1;
+    
+    System_printf("Core %d: %s Trying to reserve memory region taken by Linux...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocated resource (SHOULD NOT HAPPEN): %s base: %d length: %d\n", MultiProc_self(),
+                                                                                                          rmServerName,
+                                                                                                          requestInfo.resourceName, 
+                                                                                                          requestInfo.resourceBase,
+                                                                                                          requestInfo.resourceLength);            
+        }  
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+
+    /* Allocate some resources for testing tree interaction with multiple allocations from different instances */
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
+    requestInfo.resourceName = resourceNameAifRxCh;
+    requestInfo.resourceBase = 14;
+    requestInfo.resourceLength = 5;
+    
+    System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmServerName,
+                                                                                      requestInfo.resourceName, 
+                                                                                      requestInfo.resourceBase,
+                                                                                      requestInfo.resourceLength);            
+        }   
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
+    requestInfo.resourceName = resourceNameAifRxCh;
+    requestInfo.resourceBase = 19;
+    requestInfo.resourceLength = 31;
+    
+    System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmServerName,
+                                                                                      requestInfo.resourceName, 
+                                                                                      requestInfo.resourceBase,
+                                                                                      requestInfo.resourceLength);            
+        }   
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+    
+    /* Wait for Client and Client Delegate to do their allocates */
+    waitOnSyncObj();
 
-        /* Try to allocate the memory region taken by the Linux Kernel */
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
-        requestInfo.resourceName = resourceNameMemRegion;
-        requestInfo.resourceBase = 12;
-        requestInfo.resourceLength = 1;
-        
-        System_printf("Core %d: %s Trying to reserve memory region taken by Linux...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocated resource (SHOULD NOT HAPPEN): %s base: %d length: %d\n", MultiProc_self(),
-                                                                                                              rmServerName,
-                                                                                                              requestInfo.resourceName, 
-                                                                                                              requestInfo.resourceBase,
-                                                                                                              requestInfo.resourceLength);            
-            }  
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
+//    Rm_printResourceStatus(rmServerHandle);        
 
-        /* Allocate some resources for testing tree interaction with multiple allocations from different instances */
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
-        requestInfo.resourceName = resourceNameAifRxCh;
-        requestInfo.resourceBase = 14;
-        requestInfo.resourceLength = 5;
-        
-        System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmServerName,
-                                                                                          requestInfo.resourceName, 
-                                                                                          requestInfo.resourceBase,
-                                                                                          requestInfo.resourceLength);            
-            }   
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
-        requestInfo.resourceName = resourceNameAifRxCh;
-        requestInfo.resourceBase = 19;
-        requestInfo.resourceLength = 31;
-        
-        System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmServerName,
-                                                                                          requestInfo.resourceName, 
-                                                                                          requestInfo.resourceBase,
-                                                                                          requestInfo.resourceLength);            
-            }   
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
-        
-        /* Wait for Client and Client Delegate to do their allocates */
-        waitOnSyncObj();
+    /* Free resources to show tree handling of different frees */
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_FREE;
+    requestInfo.resourceName = resourceNameAifRxCh;
+    requestInfo.resourceBase = 25;
+    requestInfo.resourceLength = 3;
+    
+    System_printf("Core %d: %s freeing resource...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s freed resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmServerName,
+                                                                                      requestInfo.resourceName, 
+                                                                                      requestInfo.resourceBase,
+                                                                                      requestInfo.resourceLength);            
+        }  
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+    
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_FREE;
+    requestInfo.resourceName = resourceNameAifRxCh;
+    requestInfo.resourceBase = 34;
+    requestInfo.resourceLength = 3;
+    
+    System_printf("Core %d: %s freeing resource...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s freed resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmServerName,
+                                                                                      requestInfo.resourceName, 
+                                                                                      requestInfo.resourceBase,
+                                                                                      requestInfo.resourceLength);            
+        }   
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }                    
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_FREE;
+    requestInfo.resourceName = resourceNameAifRxCh;
+    requestInfo.resourceBase = 28;
+    requestInfo.resourceLength = 6;
+    
+    System_printf("Core %d: %s freeing resource...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s freed resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmServerName,
+                                                                                      requestInfo.resourceName, 
+                                                                                      requestInfo.resourceBase,
+                                                                                      requestInfo.resourceLength);            
+        } 
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }                
+
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
+    requestInfo.resourceName = resourceNameAifRxCh;
+    requestInfo.resourceBase = 53;
+    requestInfo.resourceLength = 2;
+    
+    System_printf("Core %d: %s freeing resource...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocate resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmServerName,
+                                                                                      requestInfo.resourceName, 
+                                                                                      requestInfo.resourceBase,
+                                                                                      requestInfo.resourceLength);            
+        } 
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
+    requestInfo.resourceName = resourceNameAifRxCh;
+    requestInfo.resourceBase = 2;
+    requestInfo.resourceLength = 2;
+    
+    System_printf("Core %d: %s freeing resource...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocate resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmServerName,
+                                                                                      requestInfo.resourceName, 
+                                                                                      requestInfo.resourceBase,
+                                                                                      requestInfo.resourceLength);            
+        }   
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+    
+//     Rm_printResourceStatus(rmServerHandle); 
 
-    //    Rm_printResourceStatus(rmServerHandle);        
+    /* Wait for Client and Client Delegate to do their UNSPECIFIED allocates */
+    waitOnSyncObj();
 
-        /* Free resources to show tree handling of different frees */
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_FREE;
-        requestInfo.resourceName = resourceNameAifRxCh;
-        requestInfo.resourceBase = 25;
-        requestInfo.resourceLength = 3;
-        
-        System_printf("Core %d: %s freeing resource...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s freed resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmServerName,
-                                                                                          requestInfo.resourceName, 
-                                                                                          requestInfo.resourceBase,
-                                                                                          requestInfo.resourceLength);            
-            }  
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
-        
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_FREE;
-        requestInfo.resourceName = resourceNameAifRxCh;
-        requestInfo.resourceBase = 34;
-        requestInfo.resourceLength = 3;
-        
-        System_printf("Core %d: %s freeing resource...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s freed resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmServerName,
-                                                                                          requestInfo.resourceName, 
-                                                                                          requestInfo.resourceBase,
-                                                                                          requestInfo.resourceLength);            
-            }   
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }                    
-     
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_FREE;
-        requestInfo.resourceName = resourceNameAifRxCh;
-        requestInfo.resourceBase = 28;
-        requestInfo.resourceLength = 6;
-        
-        System_printf("Core %d: %s freeing resource...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s freed resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmServerName,
-                                                                                          requestInfo.resourceName, 
-                                                                                          requestInfo.resourceBase,
-                                                                                          requestInfo.resourceLength);            
-            } 
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }                
+//      Rm_printResourceStatus(rmServerHandle);
 
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
-        requestInfo.resourceName = resourceNameAifRxCh;
-        requestInfo.resourceBase = 53;
-        requestInfo.resourceLength = 2;
-        
-        System_printf("Core %d: %s freeing resource...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocate resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmServerName,
-                                                                                          requestInfo.resourceName, 
-                                                                                          requestInfo.resourceBase,
-                                                                                          requestInfo.resourceLength);            
-            } 
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
-        requestInfo.resourceName = resourceNameAifRxCh;
-        requestInfo.resourceBase = 2;
-        requestInfo.resourceLength = 2;
-        
-        System_printf("Core %d: %s freeing resource...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocate resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmServerName,
-                                                                                          requestInfo.resourceName, 
-                                                                                          requestInfo.resourceBase,
-                                                                                          requestInfo.resourceLength);            
-            }   
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
-        
-   //     Rm_printResourceStatus(rmServerHandle); 
+    /* 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 */
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_INIT;
+    requestInfo.resourceName = resourceNameGpQ;
+    requestInfo.resourceBase = 6543;
+    requestInfo.resourceLength = 10;
+    
+    System_printf("Core %d: %s Allocating resource for init...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocate resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmServerName,
+                                                                                      requestInfo.resourceName, 
+                                                                                      requestInfo.resourceBase,
+                                                                                      requestInfo.resourceLength);            
+        }   
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }     
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
+    requestInfo.resourceName = resourceNameGpQ;
+    requestInfo.resourceBase = 6543;
+    requestInfo.resourceLength = 10;
+    
+    System_printf("Core %d: %s Allocating same resource for use...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocate resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmServerName,
+                                                                                      requestInfo.resourceName, 
+                                                                                      requestInfo.resourceBase,
+                                                                                      requestInfo.resourceLength);            
+        }   
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }         
+
+//     Rm_printResourceStatus(rmServerHandle);
+
+    /* Attempt to allocate an infrastructure queue taken by the Linux kernel and shared with
+     * Rm_Client */
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_INIT;
+    requestInfo.resourceName = resourceNameInfraQ;
+    requestInfo.resourceBase = 805;
+    requestInfo.resourceLength = 1;
+    
+    System_printf("Core %d: %s Attempting to allocate infrastructure queue taken by Linux...\n", MultiProc_self(), rmServerName);
+    rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocate resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmServerName,
+                                                                                      requestInfo.resourceName, 
+                                                                                      requestInfo.resourceBase,
+                                                                                      requestInfo.resourceLength);            
+        }   
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }         
 
-        /* Wait for Client and Client Delegate to do their UNSPECIFIED allocates */
-        waitOnSyncObj();
+    Rm_printResourceStatus(rmServerHandle);           
 
-  //      Rm_printResourceStatus(rmServerHandle);
+    System_printf("Core %d: Testing is complete\n", MultiProc_self());
+    
+    /* Create the RM cleanup task. */
+    System_printf("Core %d: Creating RM cleanup task...\n", MultiProc_self());
+    Task_Params_init (&taskParams);
+    Task_create (rmCleanupTsk, &taskParams, NULL);
+}
 
-        /* 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 */
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_INIT;
-        requestInfo.resourceName = resourceNameGpQ;
-        requestInfo.resourceBase = 6543;
-        requestInfo.resourceLength = 10;
-        
-        System_printf("Core %d: %s Allocating resource for init...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocate resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmServerName,
-                                                                                          requestInfo.resourceName, 
-                                                                                          requestInfo.resourceBase,
-                                                                                          requestInfo.resourceLength);            
-            }   
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }     
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
-        requestInfo.resourceName = resourceNameGpQ;
-        requestInfo.resourceBase = 6543;
-        requestInfo.resourceLength = 10;
-        
-        System_printf("Core %d: %s Allocating same resource for use...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocate resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmServerName,
-                                                                                          requestInfo.resourceName, 
-                                                                                          requestInfo.resourceBase,
-                                                                                          requestInfo.resourceLength);            
-            }   
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }         
+/*
+ *  ======== testRmClientTsk ========
+ *  RM Client test task
+ */
+void rmClientTsk(UArg arg0, UArg arg1)
+{
+    Rm_ServiceReqInfo requestInfo;
+    Task_Params       taskParams;
+       
+    /* Delete the RM startup task */
+    System_printf("Core %d: Deleting RM startup task...\n", MultiProc_self());
+    if (rmStartupTskHandle) {
+       Task_delete(&rmStartupTskHandle);
+       /* Set the task handle to be NULL so that the delete only occurs once */
+       rmStartupTskHandle = NULL;
+    }
 
-   //     Rm_printResourceStatus(rmServerHandle);
+    /* CD and Client serviceHandles were allocated in main() for static allocations.
+     * just reuse */
+    Rm_printInstanceStatus(rmClientDelegateHandle);
+    Rm_printInstanceStatus(rmClientHandle);
 
-        /* Attempt to allocate an infrastructure queue taken by the Linux kernel and shared with
-         * Rm_Client */
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_INIT;
-        requestInfo.resourceName = resourceNameInfraQ;
-        requestInfo.resourceBase = 805;
-        requestInfo.resourceLength = 1;
-        
-        System_printf("Core %d: %s Attempting to allocate infrastructure queue taken by Linux...\n", MultiProc_self(), rmServerName);
-        rmServerServiceHandle->Rm_serviceHandler(rmServerServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocate resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmServerName,
-                                                                                          requestInfo.resourceName, 
-                                                                                          requestInfo.resourceBase,
-                                                                                          requestInfo.resourceLength);            
-            }   
+    memset((void *)&requestInfo, 0, sizeof(Rm_ServiceReqInfo));
+    memset((void *)&responseInfo, 0, sizeof(Rm_ServiceRespInfo));
+   
+    /* Issue the service request for the resources tied to the name via the service port */                
+    requestInfo.type = Rm_service_RESOURCE_GET_BY_NAME;
+    requestInfo.resourceNsName = nameServerNameFavQ;
+    requestInfo.callback.serviceCallback = testServiceCallback;
+    
+    System_printf("Core %d: %s getting resources tied to NameServer object...\n", MultiProc_self(), 
+                                                                                  rmClientDelegateName);
+    rmClientDelegateServiceHandle->Rm_serviceHandler(rmClientDelegateServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s got Name: %s base: %d length: %d\n", MultiProc_self(),
+                                                                            rmClientDelegateName, 
+                                                                            nameServerNameFavQ, 
+                                                                            responseInfo.resourceBase,
+                                                                            responseInfo.resourceLength);
         }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }         
-
-        Rm_printResourceStatus(rmServerHandle);           
     }
-    else if (MultiProc_self() == 1) {    
-        /* Issue the service request for the resources tied to the name via the service port */                
-        requestInfo.type = Rm_service_RESOURCE_GET_BY_NAME;
-        requestInfo.resourceNsName = nameServerNameFavQ;
-        requestInfo.callback.serviceCallback = testServiceCallback;
-        
-        System_printf("Core %d: %s getting resources tied to NameServer object...\n", MultiProc_self(), 
-                                                                                      rmClientDelegateName);
-        rmClientDelegateServiceHandle->Rm_serviceHandler(rmClientDelegateServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s got Name: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                rmClientDelegateName, 
-                                                                                nameServerNameFavQ, 
-                                                                                responseInfo.resourceBase,
-                                                                                responseInfo.resourceLength);
-            }
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
-
-        /* Allocate the resources via the service port from the Client */
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_INIT;
-        requestInfo.resourceName = responseInfo.resourceName;
-        requestInfo.resourceBase = responseInfo.resourceBase;
-        requestInfo.resourceLength = responseInfo.resourceLength;
-        requestInfo.resourceNsName = NULL;
-        requestInfo.callback.serviceCallback = testServiceCallback;
-        
-        System_printf("Core %d: %s allocating resources...\n", MultiProc_self(), rmClientName);
-        rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocated resources: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                           rmClientName, 
-                                                                                           nameServerNameFavQ, 
-                                                                                           responseInfo.resourceBase,
-                                                                                           responseInfo.resourceLength);
-            }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+
+    /* Allocate the resources via the service port from the Client */
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_INIT;
+    requestInfo.resourceName = responseInfo.resourceName;
+    requestInfo.resourceBase = responseInfo.resourceBase;
+    requestInfo.resourceLength = responseInfo.resourceLength;
+    requestInfo.resourceNsName = NULL;
+    requestInfo.callback.serviceCallback = testServiceCallback;
+    
+    System_printf("Core %d: %s allocating resources...\n", MultiProc_self(), rmClientName);
+    rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocated resources: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                       rmClientName, 
+                                                                                       nameServerNameFavQ, 
+                                                                                       responseInfo.resourceBase,
+                                                                                       responseInfo.resourceLength);
         }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
 
-        /* Release the syncObj so Server can print results of NameServer object add and resource allocate */
-        releaseSyncObj();
+    /* Release the syncObj so Server can print results of NameServer object add and resource allocate */
+    releaseSyncObj();
 
-        /* Take the syncObj to free the name resource via the name, rather than the base+length */
-        takeSyncObj();
+    /* Take the syncObj to free the name resource via the name, rather than the base+length */
+    takeSyncObj();
 
-        /* Free the named resource using the name via the service port from the Client */
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));
-        requestInfo.type = Rm_service_RESOURCE_FREE;
-        requestInfo.resourceNsName = nameServerNameFavQ;
-        requestInfo.callback.serviceCallback = testServiceCallback;
-        
-        System_printf("Core %d: %s freeing resource via name...\n", MultiProc_self(), rmClientName);
-        rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s freed resource with name: %s\n", MultiProc_self(),
-                                                                            rmClientName, 
-                                                                            nameServerNameFavQ);
-            }
+    /* Free the named resource using the name via the service port from the Client */
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));
+    requestInfo.type = Rm_service_RESOURCE_FREE;
+    requestInfo.resourceNsName = nameServerNameFavQ;
+    requestInfo.callback.serviceCallback = testServiceCallback;
+    
+    System_printf("Core %d: %s freeing resource via name...\n", MultiProc_self(), rmClientName);
+    rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s freed resource with name: %s\n", MultiProc_self(),
+                                                                        rmClientName, 
+                                                                        nameServerNameFavQ);
         }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
-
-        /* Delete the name object from the NameServer */
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));
-        requestInfo.type = Rm_service_RESOURCE_UNMAP_NAME;
-        requestInfo.resourceNsName = nameServerNameFavQ;
-        requestInfo.callback.serviceCallback = testServiceCallback;
-        
-        System_printf("Core %d: %s Deleting NameServer object: %s...\n", MultiProc_self(), 
-                                                                         rmClientName,
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+
+    /* Delete the name object from the NameServer */
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));
+    requestInfo.type = Rm_service_RESOURCE_UNMAP_NAME;
+    requestInfo.resourceNsName = nameServerNameFavQ;
+    requestInfo.callback.serviceCallback = testServiceCallback;
+    
+    System_printf("Core %d: %s Deleting NameServer object: %s...\n", MultiProc_self(), 
+                                                                     rmClientName,
+                                                                     nameServerNameFavQ);
+    rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s deleted NameServer object: %s\n", MultiProc_self(),
+                                                                         rmClientName, 
                                                                          nameServerNameFavQ);
-        rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s deleted NameServer object: %s\n", MultiProc_self(),
-                                                                             rmClientName, 
-                                                                             nameServerNameFavQ);
-            }
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
-
-        /* Release the syncObj so Server can print results of resource free and NameServer object delete. */
-        releaseSyncObj();   
-
-        /* Take the syncObj to allocate resources for testing resource tree interactions. */
-        takeSyncObj();
-
-        /* Allocate some resources for testing tree interaction with multiple allocations from different instances */
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
-        requestInfo.resourceName = resourceNameAifRxCh;
-        requestInfo.resourceBase = 0;
-        requestInfo.resourceLength = 6;
-        requestInfo.callback.serviceCallback = testServiceCallback;
-        
-        System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmClientName);
-        rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmClientName,
-                                                                                          requestInfo.resourceName, 
-                                                                                          requestInfo.resourceBase,
-                                                                                          requestInfo.resourceLength);            
-            }  
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
-        
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_INIT;
-        requestInfo.resourceName = resourceNameAifRxCh;
-        requestInfo.resourceBase = 50;
-        requestInfo.resourceLength = 7;
-        requestInfo.callback.serviceCallback = testServiceCallback;
-        
-        System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmClientDelegateName);
-        rmClientDelegateServiceHandle->Rm_serviceHandler(rmClientDelegateServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmClientDelegateName,
-                                                                                          requestInfo.resourceName, 
-                                                                                          requestInfo.resourceBase,
-                                                                                          requestInfo.resourceLength);            
-            }  
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
-
-        /* Release the syncObj so Server can print results of resource allocations */
-        releaseSyncObj();    
-
-        /* Take the syncObj to allocate resources using the UNSPECIFIED parameters. */
-        takeSyncObj();
-
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
-        requestInfo.resourceName = resourceNameAccumCh;
-        requestInfo.resourceBase = RM_RESOURCE_BASE_UNSPECIFIED;
-        requestInfo.resourceLength = 5;
-        requestInfo.resourceAlignment = 4;
-        requestInfo.callback.serviceCallback = testServiceCallback;
-        
-        System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmClientDelegateName);
-        rmClientDelegateServiceHandle->Rm_serviceHandler(rmClientDelegateServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmClientDelegateName,
-                                                                                          responseInfo.resourceName, 
-                                                                                          responseInfo.resourceBase,
-                                                                                          responseInfo.resourceLength);            
-            }    
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
-
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
-        requestInfo.resourceName = resourceNameAccumCh;
-        requestInfo.resourceBase = RM_RESOURCE_BASE_UNSPECIFIED;
-        requestInfo.resourceLength = 2;
-        requestInfo.resourceAlignment = 1;
-        requestInfo.callback.serviceCallback = testServiceCallback;
-        
-        System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmClientName);
-        rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmClientName,
-                                                                                          responseInfo.resourceName, 
-                                                                                          responseInfo.resourceBase,
-                                                                                          responseInfo.resourceLength);            
-            } 
         }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
-
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
-        requestInfo.resourceName = resourceNameAccumCh;
-        requestInfo.resourceBase = RM_RESOURCE_BASE_UNSPECIFIED;
-        requestInfo.resourceLength = 2;
-        requestInfo.resourceAlignment = RM_RESOURCE_ALIGNMENT_UNSPECIFIED;
-        requestInfo.callback.serviceCallback = testServiceCallback;
-        
-        System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmClientName);
-        rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                          rmClientName,
-                                                                                          responseInfo.resourceName, 
-                                                                                          responseInfo.resourceBase,
-                                                                                          responseInfo.resourceLength);            
-            }  
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }            
-
-        /* Attempt to allocate an infrastructure queue taken by the Linux kernel and shared with
-         * Rm_Client */
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_INIT;
-        requestInfo.resourceName = resourceNameInfraQ;
-        requestInfo.resourceBase = 800;
-        requestInfo.resourceLength = 1;
-        requestInfo.callback.serviceCallback = testServiceCallback;
-        
-        System_printf("Core %d: %s Attempting to allocate infrastructure queue taken by Linux...\n", MultiProc_self(), rmClientName);
-        rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocate resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                         rmClientName,
-                                                                                         requestInfo.resourceName, 
-                                                                                         requestInfo.resourceBase,
-                                                                                         requestInfo.resourceLength);            
-            }   
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+
+    /* Release the syncObj so Server can print results of resource free and NameServer object delete. */
+    releaseSyncObj();   
+
+    /* Take the syncObj to allocate resources for testing resource tree interactions. */
+    takeSyncObj();
+
+    /* Allocate some resources for testing tree interaction with multiple allocations from different instances */
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
+    requestInfo.resourceName = resourceNameAifRxCh;
+    requestInfo.resourceBase = 0;
+    requestInfo.resourceLength = 6;
+    requestInfo.callback.serviceCallback = testServiceCallback;
+    
+    System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmClientName);
+    rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmClientName,
+                                                                                      requestInfo.resourceName, 
+                                                                                      requestInfo.resourceBase,
+                                                                                      requestInfo.resourceLength);            
+        }  
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+    
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_INIT;
+    requestInfo.resourceName = resourceNameAifRxCh;
+    requestInfo.resourceBase = 50;
+    requestInfo.resourceLength = 7;
+    requestInfo.callback.serviceCallback = testServiceCallback;
+    
+    System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmClientDelegateName);
+    rmClientDelegateServiceHandle->Rm_serviceHandler(rmClientDelegateServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmClientDelegateName,
+                                                                                      requestInfo.resourceName, 
+                                                                                      requestInfo.resourceBase,
+                                                                                      requestInfo.resourceLength);            
+        }  
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+
+    /* Release the syncObj so Server can print results of resource allocations */
+    releaseSyncObj();    
+
+    /* Take the syncObj to allocate resources using the UNSPECIFIED parameters. */
+    takeSyncObj();
+
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
+    requestInfo.resourceName = resourceNameAccumCh;
+    requestInfo.resourceBase = RM_RESOURCE_BASE_UNSPECIFIED;
+    requestInfo.resourceLength = 5;
+    requestInfo.resourceAlignment = 4;
+    requestInfo.callback.serviceCallback = testServiceCallback;
+    
+    System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmClientDelegateName);
+    rmClientDelegateServiceHandle->Rm_serviceHandler(rmClientDelegateServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmClientDelegateName,
+                                                                                      responseInfo.resourceName, 
+                                                                                      responseInfo.resourceBase,
+                                                                                      responseInfo.resourceLength);            
+        }    
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
+    requestInfo.resourceName = resourceNameAccumCh;
+    requestInfo.resourceBase = RM_RESOURCE_BASE_UNSPECIFIED;
+    requestInfo.resourceLength = 2;
+    requestInfo.resourceAlignment = 1;
+    requestInfo.callback.serviceCallback = testServiceCallback;
+    
+    System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmClientName);
+    rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmClientName,
+                                                                                      responseInfo.resourceName, 
+                                                                                      responseInfo.resourceBase,
+                                                                                      responseInfo.resourceLength);            
+        } 
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;
+    requestInfo.resourceName = resourceNameAccumCh;
+    requestInfo.resourceBase = RM_RESOURCE_BASE_UNSPECIFIED;
+    requestInfo.resourceLength = 2;
+    requestInfo.resourceAlignment = RM_RESOURCE_ALIGNMENT_UNSPECIFIED;
+    requestInfo.callback.serviceCallback = testServiceCallback;
+    
+    System_printf("Core %d: %s Allocating resource...\n", MultiProc_self(), rmClientName);
+    rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocated resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                      rmClientName,
+                                                                                      responseInfo.resourceName, 
+                                                                                      responseInfo.resourceBase,
+                                                                                      responseInfo.resourceLength);            
+        }  
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }            
+
+    /* Attempt to allocate an infrastructure queue taken by the Linux kernel and shared with
+     * Rm_Client */
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_INIT;
+    requestInfo.resourceName = resourceNameInfraQ;
+    requestInfo.resourceBase = 800;
+    requestInfo.resourceLength = 1;
+    requestInfo.callback.serviceCallback = testServiceCallback;
+    
+    System_printf("Core %d: %s Attempting to allocate infrastructure queue taken by Linux...\n", MultiProc_self(), rmClientName);
+    rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocate resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                     rmClientName,
+                                                                                     requestInfo.resourceName, 
+                                                                                     requestInfo.resourceBase,
+                                                                                     requestInfo.resourceLength);            
         }   
-
-        /* Attempt to request a service from an instance that requires a blocking operation to satisfy
-         * the request without providing a callback function. */
-        memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
-        requestInfo.type = Rm_service_RESOURCE_ALLOCATE_INIT;
-        requestInfo.resourceName = resourceNameGpQ;
-        requestInfo.resourceBase = 7000;
-        requestInfo.resourceLength = 1;
-        
-        System_printf("Core %d: %s Attempting service request without callback function...\n", MultiProc_self(), rmClientName);
-        rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
-        if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
-            (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
-            if (blockForResponse(&responseInfo)) {
-                System_printf("Core %d: %s allocate resource: %s base: %d length: %d\n", MultiProc_self(),
-                                                                                         rmClientName,
-                                                                                         requestInfo.resourceName, 
-                                                                                         requestInfo.resourceBase,
-                                                                                         requestInfo.resourceLength);            
-            }   
-        }
-        else {
-            System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
-                                                                                responseInfo.serviceState);
-        }          
-
-        /* Release the syncObj so Server can print results of resource allocations */
-        releaseSyncObj();           
     }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }   
+
+    /* Attempt to request a service from an instance that requires a blocking operation to satisfy
+     * the request without providing a callback function. */
+    memset((void *) &requestInfo, 0, sizeof(Rm_ServiceReqInfo));        
+    requestInfo.type = Rm_service_RESOURCE_ALLOCATE_INIT;
+    requestInfo.resourceName = resourceNameGpQ;
+    requestInfo.resourceBase = 7000;
+    requestInfo.resourceLength = 1;
+    
+    System_printf("Core %d: %s Attempting service request without callback function...\n", MultiProc_self(), rmClientName);
+    rmClientServiceHandle->Rm_serviceHandler(rmClientServiceHandle->rmHandle, &requestInfo, &responseInfo);
+    if ((responseInfo.serviceState == RM_SERVICE_APPROVED) ||
+        (responseInfo.serviceState == RM_SERVICE_PROCESSING)) {        
+        if (blockForResponse(&responseInfo)) {
+            System_printf("Core %d: %s allocate resource: %s base: %d length: %d\n", MultiProc_self(),
+                                                                                     rmClientName,
+                                                                                     requestInfo.resourceName, 
+                                                                                     requestInfo.resourceBase,
+                                                                                     requestInfo.resourceLength);            
+        }   
+    }
+    else {
+        System_printf("Core %d: Static allocation failed with error: %d\n", MultiProc_self(), 
+                                                                            responseInfo.serviceState);
+    }          
+
+    /* Release the syncObj so Server can print results of resource allocations */
+    releaseSyncObj();           
 
     System_printf("Core %d: Testing is complete\n", MultiProc_self());
     
     /* Create the RM cleanup task. */
     System_printf("Core %d: Creating RM cleanup task...\n", MultiProc_self());
     Task_Params_init (&taskParams);
-    Task_create (cleanupRmTsk, &taskParams, NULL);
+    Task_create (rmCleanupTsk, &taskParams, NULL);
 }
 
+
 /*
  *  ======== startupRmTsk ========
  *  Configures application transports and registers them with RM
  */
-Void startupRmTsk(UArg arg0, UArg arg1)
+Void rmStartupTsk(UArg arg0, UArg arg1)
 {
     MessageQ_Handle    serverFromCdMsgQ, cdFromServerMsgQ, cdFromClientMsgQ, clientFromCdMsgQ;
     MessageQ_QueueId   serverToCdQId, cdToServerQId, cdToClientQId, clientToCdQId;    
@@ -1423,13 +1454,20 @@ Void startupRmTsk(UArg arg0, UArg arg1)
     /* Create the RM receive task. */
     System_printf("Core %d: Creating RM receive task...\n", MultiProc_self());
     Task_Params_init (&taskParams);
-    testReceiveTskHandle = Task_create (testReceiveTsk, &taskParams, NULL);
+    rmReceiveTskHandle = Task_create (rmReceiveTsk, &taskParams, NULL);
     
     
-    /* Create the RM test task. */
-    System_printf("Core %d: Creating RM test task...\n", MultiProc_self());
-    Task_Params_init (&taskParams);
-    testRmTskHandle = Task_create (testRmTsk, &taskParams, NULL);
+    /* Create the RM test tasks. */
+    if (MultiProc_self() == 0) {
+        System_printf("Core %d: Creating RM server task...\n", MultiProc_self());
+        Task_Params_init (&taskParams);
+        rmServerTskHandle = Task_create (rmServerTsk, &taskParams, NULL);
+    }
+    else if (MultiProc_self()) {
+        System_printf("Core %d: Creating RM client task...\n", MultiProc_self());
+        Task_Params_init (&taskParams);
+        rmClientTskHandle = Task_create (rmClientTsk, &taskParams, NULL);
+    }
 }
 
 /*
@@ -1611,7 +1649,7 @@ Int main(Int argc, Char* argv[])
     /* Create the RM startup task */
     System_printf("Core %d: Creating RM startup task...\n", MultiProc_self());
     Task_Params_init (&taskParams);
-    startupRmTskHandle = Task_create (startupRmTsk, &taskParams, NULL);
+    rmStartupTskHandle = Task_create (rmStartupTsk, &taskParams, NULL);
 
     System_printf("Core %d: Starting BIOS...\n", MultiProc_self());
     BIOS_start();