Hi ,
I have some fundamentals questions about syslink shared region.Here are the questions:
1. How does a user decide who should be the owner of a shared region. Is there a dependency on which core starts execution first. If yes, is there any documentation i can read through
2. If A8 does the SharedRegion_setEntry, it is necessary for another core to do the SharedRegion_setEntry. My questions is if all the shared memory section owner is A8 and A8 starts executing first, if A8 does SharedRegion_setEntry, shouldn't the information about shared region be available for all other cores?
3. If i have 2 application and in the first application i do a SharedRegion_setEntry, then is it necessary to do SharedRegion_setEntry in the second application again?
4. In the file HeapMemMP.c,if my execution is stuck in the while loop in the function ti_sdo_ipc_heaps_HeapMemMP_getStats, what could be possibly have gone wrong.This function is getting internally called for a application call of SharedRegion_getHeap. I have confirmed that the call to SharedRegion_getHeap has a proper shared region index.
Copy pasting the function here
Void
ti_sdo_ipc_heaps_HeapMemMP_getStats(ti_sdo_ipc_heaps_HeapMemMP_Object *obj,
Memory_Stats *stats)
{
IArg key;
ti_sdo_ipc_heaps_HeapMemMP_Header *curHeader;
stats->totalSize =
obj->bufSize;
stats->totalFreeSize = 0;
/* determined later */
stats->largestFreeSize = 0; /*
determined later */
key = GateMP_enter((GateMP_Handle)obj->gate);
if (obj->cacheEnabled) {
Cache_inv(&(obj->attrs->head),
sizeof(ti_sdo_ipc_heaps_HeapMemMP_Header), Cache_Type_ALL,
TRUE);
}
curHeader =
SharedRegion_getPtr(obj->attrs->head.next);
while (curHeader != NULL) {
/* Invalidate curHeader */
if (obj->cacheEnabled) {
Cache_inv(curHeader, sizeof(ti_sdo_ipc_heaps_HeapMemMP_Header),
Cache_Type_ALL, TRUE);
}
stats->totalFreeSize += curHeader->size;
if (stats->largestFreeSize < curHeader->size) {
stats->largestFreeSize = curHeader->size;
}
curHeader = SharedRegion_getPtr(curHeader->next);
}
GateMP_leave((GateMP_Handle)obj->gate, key);
}
The execution is hung in the while (curHeader != NULL) loop. Please note that it is not consistant. Some time i see this happening immediately aftre i start the application and some time pretty late. Are you aware of any issue like this? I am using syslink 2_00_02_80 and ipc 1.23.03.31 released with the latest SDK 2.1.59 package.
Regrads
Pranjal