summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7baaf11)
raw | patch | inline | side by side (parent: 7baaf11)
author | Justin Sobota <jsobota@ti.com> | |
Thu, 24 Jan 2013 17:04:57 +0000 (12:04 -0500) | ||
committer | Justin Sobota <jsobota@ti.com> | |
Thu, 24 Jan 2013 17:04:57 +0000 (12:04 -0500) |
src/rm.c | patch | blob | history | |
src/rm_nameserver.c | patch | blob | history | |
src/rm_policy.c | patch | blob | history | |
test/rm_test.c | patch | blob | history |
diff --git a/src/rm.c b/src/rm.c
index 273c1759364e535d3fc4f21255661f245c03af74..b7ba1871b7bac342e4dd8cb9e887524482357b0d 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
Rm_Inst *rmInst;\r
void *globalResourceDtb = NULL;\r
void *linuxResourceDtb = NULL;\r
- void *policyDtb = NULL;\r
\r
*result = RM_INIT_OK;\r
\r
rmInst->transactionQueue= NULL;\r
\r
if ((rmInst->instType != Rm_instType_CLIENT) && initCfg->policy) {\r
- policyDtb = initCfg->policy;\r
- fdt_open_into(policyDtb, policyDtb, fdt_totalsize(policyDtb)); \r
+ rmInst->policy = initCfg->policy;\r
+ fdt_open_into(rmInst->policy, rmInst->policy, fdt_totalsize(rmInst->policy)); \r
\r
/* Create valid instance list from policy. Must be done prior to parsing\r
* GRL so that Linux resources can be reserved correctly */\r
- rmInst->validInstances = Rm_policyCreateValidInstTree(policyDtb, result);\r
+ rmInst->validInstances = Rm_policyCreateValidInstTree(rmInst->policy, result);\r
/* Validate policy assignment strings */\r
- *result = Rm_policyValidatePolicy(rmInst, policyDtb);\r
- rmInst->policy = policyDtb;\r
+ *result = Rm_policyValidatePolicy(rmInst->policy, rmInst->validInstances);\r
}\r
\r
/* RM Server specific actions */\r
if (rmInst->instType == Rm_instType_SERVER) {\r
- Rm_nameServerInit();\r
+ rmInst->nameServer = Rm_nameServerInit();\r
\r
if (initCfg->globalResourceList) {\r
globalResourceDtb = initCfg->globalResourceList;\r
}\r
\r
if ((rmInst->instType != Rm_instType_CLIENT) && initCfg->policy) {\r
- *result = Rm_policyValidatePolicyResourceNames(rmInst, policyDtb);\r
+ *result = Rm_policyValidatePolicyResourceNames(rmInst->policy, (void *)rmInst->allocators);\r
} \r
\r
return ((Rm_Handle) rmInst);\r
diff --git a/src/rm_nameserver.c b/src/rm_nameserver.c
index 14f4469c47de906f71838b01ddef8130f780b6cf..6857af3fa241689b5f2c5cc27922c7d4a9893f4f 100644 (file)
--- a/src/rm_nameserver.c
+++ b/src/rm_nameserver.c
if (matchingNode = RB_FIND(_Rm_NameServerTree, objCfg->nameServerTree, &findNode)) {
/* Found in NameServer */
- strcpy(objCfg->nodeCfg.resourceName, matchingNode->resourceName);
+ objCfg->nodeCfg.resourceName = matchingNode->resourceName;
objCfg->nodeCfg.resourceBase = matchingNode->resourceBase;
objCfg->nodeCfg.resourceLength = matchingNode->resourceLength;
diff --git a/src/rm_policy.c b/src/rm_policy.c
index 9b3022b0949181730c379423650f24b2e970d562..5839baf056dca953a77b04eb6a90d0b8c07be7c4 100644 (file)
--- a/src/rm_policy.c
+++ b/src/rm_policy.c
return(nodeOffset);
}
-int32_t Rm_policyValidatePolicyResourceNames(void *allocatorList, void *policyDtb)
+int32_t Rm_policyValidatePolicyResourceNames(void *policyDtb, void *allocatorList)
{
Rm_Allocator *allocator = (Rm_Allocator *)allocatorList;
int32_t nodeOffset;
diff --git a/test/rm_test.c b/test/rm_test.c
index 3d058478b993c756fe2be8ac9e83a082b8665fd1..cc89fcb4915d074e6df2724670d96c7776802672 100644 (file)
--- a/test/rm_test.c
+++ b/test/rm_test.c
* RM instances */
if (MultiProc_self() == 0)
{
- rmServerServicePort = Rm_getServicePort(rmServerHandle);
+ rmServerServicePort = Rm_serviceGetPort(rmServerHandle);
}
else if (MultiProc_self() == 1)
{
- rmClientDelegateServicePort = Rm_getServicePort(rmClientDelegateHandle);
- rmClientServicePort = Rm_getServicePort(rmClientHandle);
+ rmClientDelegateServicePort = Rm_serviceGetPort(rmClientDelegateHandle);
+ rmClientServicePort = Rm_serviceGetPort(rmClientHandle);
}
memset((void *)&requestInfo, 0, sizeof(Rm_ServiceReqInfo));
responseInfo.resourceLength);
}
- 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 = resourceName;
responseInfo.resourceName,
responseInfo.resourceBase,
responseInfo.resourceLength);
- }
-
- Rm_printResourceStatus(rmServerHandle);
+ }
/* Issue the service request create a new NameServer object via the service port */
requestInfo.type = Rm_service_RESOURCE_ALLOCATE_USE;