summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c09edc)
raw | patch | inline | side by side (parent: 7c09edc)
author | Chris Ring <cring@ti.com> | |
Wed, 29 Jan 2014 01:35:50 +0000 (17:35 -0800) | ||
committer | Chris Ring <cring@ti.com> | |
Sat, 1 Feb 2014 23:20:20 +0000 (15:20 -0800) |
XDC provides a xdc__strict feature. Defining that pre-processor
variable prior to #including <xdc/std.h> will disable deprecated
data types (e.g. Uint32 - note the lowercase 'i') and change
NULL from '0' to '(void *)0'.
This commit throws that xdc__strict definition when building the
BIOS-side code, and fixes issues that were found enabling it.
Interestingly, there were a few bugs that turned up during this
exercise (rare in the wild, but still good cleanup).
variable prior to #including <xdc/std.h> will disable deprecated
data types (e.g. Uint32 - note the lowercase 'i') and change
NULL from '0' to '(void *)0'.
This commit throws that xdc__strict definition when building the
BIOS-side code, and fixes issues that were found enabling it.
Interestingly, there were a few bugs that turned up during this
exercise (rare in the wild, but still good cleanup).
25 files changed:
diff --git a/ipc-bios.bld b/ipc-bios.bld
index 7c28f860d94145b114b91b54ffc06080790ae66d..22f7681bbbf1975b9369d31de8b6079d32fd5c29 100644 (file)
--- a/ipc-bios.bld
+++ b/ipc-bios.bld
/* -----------------------------------------------------------------------*/
/* make release files '.tar.gz' files (.tar is default) */
Pkg.attrs.compress = true;
+
+/* catch inadvertant use of unsupported data types */
+Pkg.attrs.defs = "-Dxdc__strict";
diff --git a/packages/ti/ipc/family/omapl138/VirtQueue.c b/packages/ti/ipc/family/omapl138/VirtQueue.c
index 1e75db236d8ad469c69f10f71423aaeae6daedd6..acae76e2f0cbbc6b010d09f0c452c283d34a211b 100644 (file)
/*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
while (InterruptDsp_isIntSet(remoteProcId, &intInfo) == FALSE);
InterruptDsp_intClear(remoteProcId, &intInfo);
- InterruptDsp_intRegister(remoteProcId, &intInfo, (Fxn)VirtQueue_isr, NULL);
+ InterruptDsp_intRegister(remoteProcId, &intInfo, (Fxn)VirtQueue_isr, 0);
Log_print0(Diags_USER1, "Passed VirtQueue_startup\n");
}
diff --git a/packages/ti/ipc/family/tci6614/Interrupt.c b/packages/ti/ipc/family/tci6614/Interrupt.c
index 8f068c2c192f382c15aefd4b4a6dba86e5978abf..600bddb19fd8b43a8de460d33e05f1b2c222676f 100644 (file)
/*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2013-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include "package/internal/Interrupt.xdc.h"
-extern volatile cregister Uns DNUM;
+extern volatile cregister UInt DNUM;
Fxn userFxn = NULL;
Void Interrupt_isr(UArg arg);
diff --git a/packages/ti/ipc/family/tci6614/VirtQueue.c b/packages/ti/ipc/family/tci6614/VirtQueue.c
index ccd89e1a96c100c9b7db66a74c6248adf2539525..13cfb5d631192121688be56873ba149e4c329171 100644 (file)
/*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#define ID_DSP_TO_A9 0
#define ID_A9_TO_DSP 1
-extern volatile cregister Uns DNUM;
+extern volatile cregister UInt DNUM;
static VirtQueue_Object *queueRegistry[NUM_QUEUES] = {NULL};
Log_print0(Diags_USER1, "VirtQueue_startup: Polling for host int...\n");
while (!Interrupt_checkAndClear(remoteProcId, &intInfo));
- Interrupt_intRegister(remoteProcId, &intInfo, (Fxn)VirtQueue_isr, NULL);
+ Interrupt_intRegister(remoteProcId, &intInfo, (Fxn)VirtQueue_isr, 0);
Log_print0(Diags_USER1, "Passed VirtQueue_startup\n");
}
diff --git a/packages/ti/ipc/family/tci6638/Interrupt.c b/packages/ti/ipc/family/tci6638/Interrupt.c
index 8f068c2c192f382c15aefd4b4a6dba86e5978abf..600bddb19fd8b43a8de460d33e05f1b2c222676f 100644 (file)
/*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2013-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include "package/internal/Interrupt.xdc.h"
-extern volatile cregister Uns DNUM;
+extern volatile cregister UInt DNUM;
Fxn userFxn = NULL;
Void Interrupt_isr(UArg arg);
diff --git a/packages/ti/ipc/family/tci6638/VirtQueue.c b/packages/ti/ipc/family/tci6638/VirtQueue.c
index ab8d90062729501c5a568cb2727f28261ab0a57d..2f6936276976ae8f891658141c6671070277e106 100644 (file)
/*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#define ID_DSP_TO_A9 0
#define ID_A9_TO_DSP 1
-extern volatile cregister Uns DNUM;
+extern volatile cregister UInt DNUM;
static VirtQueue_Object *queueRegistry[NUM_QUEUES] = {NULL};
Log_print0(Diags_USER1, "VirtQueue_startup: Polling for host int...\n");
while (!Interrupt_checkAndClear(remoteProcId, &intInfo));
- Interrupt_intRegister(remoteProcId, &intInfo, (Fxn)VirtQueue_isr, NULL);
+ Interrupt_intRegister(remoteProcId, &intInfo, (Fxn)VirtQueue_isr, 0);
Log_print0(Diags_USER1, "Passed VirtQueue_startup\n");
}
index 34603fc1d7f333afbb60ab4028908d39ab04c675..69accb6e1b62d2cbbe344db7e5d2517a9ab068ea 100644 (file)
/*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
UInt32 offset;
Resource_MemEntry *entry;
- *pa = NULL;
+ *pa = 0;
for (i = 0; i < module->pTable->num; i++) {
entry = Resource_getMemEntry(i);
UInt32 offset;
Resource_MemEntry *entry;
- *va = NULL;
+ *va = 0;
for (i = 0; i < module->pTable->num; i++) {
entry = Resource_getMemEntry(i);
index 384eacf9225b0af01c47d1fe5354d605e996be39..75da880112ad9b7cfd3d625f7792b13c329575b1 100644 (file)
/*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2013-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#define SLAVE_MESSAGEQNAME "SLAVE"
#define MessageQ_payload(m) ((void *)((char *)(m) + sizeof(MessageQ_MsgHeader)))
-extern volatile cregister Uns DNUM;
+extern volatile cregister UInt DNUM;
/*
* ======== hostMsgqFxn ========
UInt16 msgId;
UInt32 start;
UInt32 end;
- Uint32 numLoops;
+ UInt32 numLoops;
UInt32 print;
UInt32 *params;
index c86c4e7391e3499cab723e05525901bc57245ad2..2bebc2e9d8ddad9500142900ae09ec7b865da12d 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
UInt32 msgId;
UInt32 start;
UInt32 end;
- Uint32 numLoops;
+ UInt32 numLoops;
UInt32 print;
UInt32 *params;
index d5e48324737df5359b0022a26425bf6a1e569123..0ae64499f5179e6bce6bca9cba06aa3c6a8272bf 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
}
else {
sharedAddr = NULL;
- slave->notifySRPtr = 0;
+ slave->notifySRPtr = SharedRegion_invalidSRPtr();
}
/* call attach to remote processor */
}
else {
sharedAddr = NULL;
- slave->nsrnSRPtr = 0;
+ slave->nsrnSRPtr = SharedRegion_invalidSRPtr();
}
/* call attach to remote processor */
}
else {
sharedAddr = NULL;
- slave->transportSRPtr = 0;
+ slave->transportSRPtr = SharedRegion_invalidSRPtr();
}
/* call attach to remote processor */
ti_sdo_ipc_MessageQ_SetupTransportProxy_sharedMemReq(
msgqSharedAddr));
- /* set pointer for MessageQ transport instance back to NULL */
- slave->transportSRPtr = NULL;
+ /* set pointer for MessageQ transport instance to INVALID */
+ slave->transportSRPtr = SharedRegion_invalidSRPtr();
}
}
}
ti_sdo_utils_NameServer_SetupProxy_sharedMemReq(
nsrnSharedAddr));
- /* set pointer for NSRN instance back to NULL */
- slave->nsrnSRPtr = NULL;
+ /* set pointer for NSRN instance to INVALID */
+ slave->nsrnSRPtr = SharedRegion_invalidSRPtr();
}
}
}
notifySharedAddr,
Notify_sharedMemReq(remoteProcId, notifySharedAddr));
- /* set pointer for Notify instance back to NULL */
- slave->notifySRPtr = NULL;
+ /* set pointer for Notify instance to INVALID */
+ slave->notifySRPtr = SharedRegion_invalidSRPtr();
}
}
}
index a92456c9deec8aac23c04d6eb80340cfaee6b812..33ff05a0dc4d3ee260579b7d0c67dc75921b3bc4 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* of the fields in the header at set via other APIs or in the
* MessageQ_put function.
*/
-MessageQ_Msg MessageQ_alloc(UInt16 heapId, Uint32 size)
+MessageQ_Msg MessageQ_alloc(UInt16 heapId, UInt32 size)
{
MessageQ_Msg msg;
Error_Block eb;
/*
* ======== MessageQ_staticMsgInit ========
*/
-Void MessageQ_staticMsgInit(MessageQ_Msg msg, Uint32 size)
+Void MessageQ_staticMsgInit(MessageQ_Msg msg, UInt32 size)
{
Assert_isTrue((msg != NULL), ti_sdo_ipc_MessageQ_A_invalidMsg);
index 5971798fcca1bd7cae192caf75459a3112b9746c..0bab916a2c84e324473435378e37db41bcfdd3a0 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* unregisterEvent.
*/
obj->callbacks[strippedEventId].fnNotifyCbck = NULL;
- obj->callbacks[strippedEventId].cbckArg = NULL;
+ obj->callbacks[strippedEventId].cbckArg = 0;
status = Notify_S_SUCCESS;
}
diff --git a/packages/ti/sdo/ipc/family/c647x/Interrupt.c b/packages/ti/sdo/ipc/family/c647x/Interrupt.c
index a72939b19e9dfe7d6e210b9fb703842e9cb5de3c..fdf352ca0b83e848f8ab54f267f55455301829d0 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
UArg arg)
{
UInt32 val;
- extern volatile cregister Uns DNUM;
+ extern volatile cregister UInt DNUM;
volatile UInt32 *ipcgr = (volatile UInt32 *)Interrupt_IPCGR0;
/*
UArg arg)
{
UInt32 val;
- extern volatile cregister Uns DNUM;
+ extern volatile cregister UInt DNUM;
volatile UInt32 *ipcgr = (volatile UInt32 *)Interrupt_IPCGR0;
/*
*/
UInt Interrupt_intClear(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo)
{
- extern volatile cregister Uns DNUM;
+ extern volatile cregister UInt DNUM;
volatile UInt32 *ipcar = (volatile UInt32 *)Interrupt_IPCAR0;
ipcar[DNUM] = (1 << (MultiProcSetup_procMap[remoteProcId] +
Void Interrupt_intShmStub(UArg arg)
{
Int i;
- extern volatile cregister Uns DNUM;
+ extern volatile cregister UInt DNUM;
volatile UInt32 *ipcar = (volatile UInt32 *)Interrupt_IPCAR0;
UInt32 ipcarVal = ipcar[DNUM];
diff --git a/packages/ti/sdo/ipc/family/c6a8149/InterruptDsp.c b/packages/ti/sdo/ipc/family/c6a8149/InterruptDsp.c
index 5df78158cd4d8d9d0a961cc48eef1f2c9e8eb4db..d34179853f64cd1d41512da7ab4636c7635844d6 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
table = &(InterruptDsp_module->fxnTable[index]);
table->func = NULL;
- table->arg = NULL;
+ table->arg = 0;
}
/*
diff --git a/packages/ti/sdo/ipc/family/c6a8149/InterruptHost.c b/packages/ti/sdo/ipc/family/c6a8149/InterruptHost.c
index b27afafbc8796203ce0d28430fc689b5fe9d0908..61a5d33c88710cc122946a727e6bb8e92a1c0557 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
table = &(InterruptHost_module->fxnTable[index]);
table->func = NULL;
- table->arg = NULL;
+ table->arg = 0;
}
/*
diff --git a/packages/ti/sdo/ipc/family/dm6446/InterruptDsp.c b/packages/ti/sdo/ipc/family/dm6446/InterruptDsp.c
index 69b8f7ae6f62d3798c7d26aa693c5d21c9db6c02..0ab80afe745992214d7ab1bc6a452c4469f82db4 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
break;
}
- SET_BIT(*((volatile Uint32 *)INTGENREG), (intBitPos));
+ SET_BIT(*((volatile UInt32 *)INTGENREG), (intBitPos));
}
/*!
break;
}
- SET_BIT(*((volatile Uint32 *)INTGENREG), (intBitPos));
+ SET_BIT(*((volatile UInt32 *)INTGENREG), (intBitPos));
}
/*!
break;
}
- CLEAR_BIT(*((volatile Uint32 *)INTGENREG), statBitPos);
+ CLEAR_BIT(*((volatile UInt32 *)INTGENREG), statBitPos);
return (0);
}
diff --git a/packages/ti/sdo/ipc/family/omap4430/InterruptDsp.c b/packages/ti/sdo/ipc/family/omap4430/InterruptDsp.c
index 938585dda8e486a503f7d6096bb2244157775a96..ff069664f4b6f4381a395371e1e6f23a69c05733 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
table = &(InterruptDsp_module->fxnTable[index]);
table->func = NULL;
- table->arg = NULL;
+ table->arg = 0;
}
/*!
diff --git a/packages/ti/sdo/ipc/family/tci663x/Interrupt.c b/packages/ti/sdo/ipc/family/tci663x/Interrupt.c
index 65c1efd49c2dde3b30e584bc1488340b8383cc44..7f0e5ac844e791676130ae21d1f3a2a6f9bffdbe 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
{
UInt key, i;
Hwi_Params hwiAttrs;
- extern volatile cregister Uns DNUM;
+ extern volatile cregister UInt DNUM;
/* Disable global interrupts */
key = Hwi_disable();
UArg arg)
{
UInt32 val;
- extern volatile cregister Uns DNUM;
+ extern volatile cregister UInt DNUM;
volatile UInt32 *ipcgr = (volatile UInt32 *)Interrupt_IPCGR0;
/*
UArg arg)
{
UInt32 val;
- extern volatile cregister Uns DNUM;
+ extern volatile cregister UInt DNUM;
volatile UInt32 *ipcgr = (volatile UInt32 *)Interrupt_IPCGR0;
/*
*/
UInt Interrupt_intClear(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo)
{
- extern volatile cregister Uns DNUM;
+ extern volatile cregister UInt DNUM;
volatile UInt32 *ipcar = (volatile UInt32 *)Interrupt_IPCAR0;
ipcar[DNUM] = (1 << (MultiProcSetup_procMap[remoteProcId] +
Void Interrupt_intShmStub(UArg arg)
{
Int i;
- extern volatile cregister Uns DNUM;
+ extern volatile cregister UInt DNUM;
volatile UInt32 *ipcar = (volatile UInt32 *)Interrupt_IPCAR0;
UInt32 ipcarVal = ipcar[DNUM];
diff --git a/packages/ti/sdo/ipc/family/ti81xx/InterruptDsp.c b/packages/ti/sdo/ipc/family/ti81xx/InterruptDsp.c
index a913c1a2941b73d9bc3fe687d64ab89b81a898f6..442e6309220d6439897c9e5288c9d564e806d89f 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
table = &(InterruptDsp_module->fxnTable[index]);
table->func = NULL;
- table->arg = NULL;
+ table->arg = 0;
}
/*!
diff --git a/packages/ti/sdo/ipc/family/ti81xx/InterruptHost.c b/packages/ti/sdo/ipc/family/ti81xx/InterruptHost.c
index 8f2f62566b2157c1ae25d7dcc071c9ec8de97b99..f95f5423e2925f9cf40ff93d161a6f8b90bcbff0 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
table = &(InterruptHost_module->fxnTable[index]);
table->func = NULL;
- table->arg = NULL;
+ table->arg = 0;
}
/*!
diff --git a/packages/ti/sdo/ipc/family/vayu/InterruptDsp.c b/packages/ti/sdo/ipc/family/vayu/InterruptDsp.c
index 64b39da850bb9720c03d783f0c0553efb3427555..7566166817ad42dc0a5f715306960f14f09177ff 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
table = &(InterruptDsp_module->fxnTable[index]);
table->func = NULL;
- table->arg = NULL;
+ table->arg = 0;
}
/*
index 6f6e0628ed61255973f7c8d7cbfbdda534f1c2bc..aa5b82957ac30b9c2931930c9bcb56644918c3a4 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Error_Block *eb)
{
Assert_isTrue(params->sharedAddr != NULL, ti_sdo_ipc_Ipc_A_invParam);
- Assert_isTrue(GatePeterson_numInstances != NULL, ti_sdo_ipc_Ipc_A_invParam);
+ Assert_isTrue(GatePeterson_numInstances != 0, ti_sdo_ipc_Ipc_A_invParam);
obj->localGate = localGate;
obj->cacheEnabled = SharedRegion_isCacheEnabled(params->regionId);
index 4c34058628c4b8170fbcc5467c387923d9d85e6b..31b86ad6a1d36a73dfacead1b9b812e7fe33a317 100644 (file)
-/*
- * Copyright (c) 2013 Texas Instruments Incorporated
+/*
+ * Copyright (c) 2013-2014 Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ */
/*
* ======== GatePetersonN.c ========
*/
}
Assert_isTrue(params->sharedAddr != NULL, ti_sdo_ipc_Ipc_A_invParam);
- Assert_isTrue(GatePetersonN_numInstances != NULL,ti_sdo_ipc_Ipc_A_invParam);
+ Assert_isTrue(GatePetersonN_numInstances != 0, ti_sdo_ipc_Ipc_A_invParam);
obj->localGate = localGate;
obj->cacheEnabled = SharedRegion_isCacheEnabled(params->regionId);
obj->cacheLineSize = SharedRegion_getCacheLineSize(params->regionId);
obj->nested = 0;
-
+
/* This is not cluster aware:
* obj->numProcessors = MultiProc_getNumProcessors();
* obj->selfId = MultiProc_self();
*/
- /* Cluster aware initialization */
+ /* Cluster aware initialization */
obj->numProcessors = MultiProc_getNumProcsInCluster();
-
+
/* set selfId to 0-based offset within cluster. */
obj->selfId = MultiProc_self() - MultiProc_getBaseIdOfCluster();
-
+
/* Assign shared memory addresses for the protocol state variables */
-
+
offset = 0;
for (i=0; i < obj->numProcessors; i++) {
- obj->enteredStage[i] = (Int32 *)((UArg)(params->sharedAddr) + offset);
+ obj->enteredStage[i] = (Int32 *)((UArg)(params->sharedAddr) + offset);
offset += minAlign;
}
for (i=0; i < obj->numProcessors - 1; i++) {
- obj->lastProcEnteringStage[i] = (Int32 *)((UArg)(params->sharedAddr)
+ obj->lastProcEnteringStage[i] = (Int32 *)((UArg)(params->sharedAddr)
+ offset);
offset += minAlign;
}
*(obj->enteredStage[myProcId]) = curStage;
*(obj->lastProcEnteringStage[curStage]) = myProcId;
-
+
if (obj->cacheEnabled) {
Cache_wbInv((Ptr)obj->enteredStage[myProcId], obj->cacheLineSize,
Cache_Type_ALL, FALSE);
- Cache_wbInv((Ptr)obj->lastProcEnteringStage[curStage],
+ Cache_wbInv((Ptr)obj->lastProcEnteringStage[curStage],
obj->cacheLineSize, Cache_Type_ALL, TRUE);
}
if (obj->cacheEnabled) {
- Cache_inv((Ptr)obj->enteredStage[proc],
+ Cache_inv((Ptr)obj->enteredStage[proc],
obj->cacheLineSize, Cache_Type_ALL, FALSE);
- Cache_inv((Ptr)obj->lastProcEnteringStage[curStage],
+ Cache_inv((Ptr)obj->lastProcEnteringStage[curStage],
obj->cacheLineSize, Cache_Type_ALL, TRUE);
}
/* wait till 'proc' leaves or another 'proc' enters stage */
if (obj->cacheEnabled) {
- Cache_inv((Ptr)obj->enteredStage[proc],
+ Cache_inv((Ptr)obj->enteredStage[proc],
obj->cacheLineSize, Cache_Type_ALL, FALSE);
- Cache_inv((Ptr)obj->lastProcEnteringStage[curStage],
+ Cache_inv((Ptr)obj->lastProcEnteringStage[curStage],
obj->cacheLineSize, Cache_Type_ALL, TRUE);
}
}
* Module functions
*************************************************************************
*/
-
+
/*
* ======== GatePetersonN_getReservedMask ========
*/
if (SharedRegion_getCacheLineSize(params->regionId) > minAlign) {
minAlign = SharedRegion_getCacheLineSize(params->regionId);
}
-
+
/* Allocate aligned memory for shared state variables used in protocol
* enteredStage[NUM_PROCESSORS]
- * lastProcEnteringStage[NUM_STAGES]
+ * lastProcEnteringStage[NUM_STAGES]
*/
- memReq = ((2 * numProcessors) - 1) *
+ memReq = ((2 * numProcessors) - 1) *
SharedRegion_getCacheLineSize(params->regionId);
return(memReq);
}
/*
- * Write everything back to shared memory.
+ * Write everything back to shared memory.
*/
if (obj->cacheEnabled) {
- Cache_wbInv((Ptr)(obj->enteredStage[0]), obj->cacheLineSize *
+ Cache_wbInv((Ptr)(obj->enteredStage[0]), obj->cacheLineSize *
obj->numProcessors, Cache_Type_ALL, FALSE);
- Cache_wbInv((Ptr)(obj->lastProcEnteringStage[0]), obj->cacheLineSize *
+ Cache_wbInv((Ptr)(obj->lastProcEnteringStage[0]), obj->cacheLineSize *
obj->numProcessors-1, Cache_Type_ALL, TRUE);
}
}
-
diff --git a/packages/ti/sdo/ipc/notifyDrivers/NotifyDriverShm.c b/packages/ti/sdo/ipc/notifyDrivers/NotifyDriverShm.c
index f63d5d755f76687c9144c669cf3094ec409b8f46..432a23d11eaf7e39fe0343d8c2a19a476531cf84 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
obj->regChart = Memory_valloc(
NotifyDriverShm_Object_heap(),
(sizeof(UInt32) * ti_sdo_ipc_Notify_numEvents),
- NULL,
+ 0,
~0,
eb);
if (obj->regChart == NULL) {
index 43e46b9dfc35a8d770e4ab8ce68938b444d67cc7..f6a4ebc0f3cdf9b6682ff39e6dfc5d52afc4311c 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* There is an optimization for small values (e.g. <= sizeof(UInt32).
* In this case, there is no values block allocated. Instead the value
* field is used directly. This optimization occurs and is managed when
- * obj->maxValueLen <= sizeof(Uint32).
+ * obj->maxValueLen <= sizeof(UInt32).
*
* The static create is a little different. The static entries point directly
* to a name string (and value). Since it points directly to static items,
tableEntry->value = (UArg)Memory_alloc(obj->tableHeap,
obj->maxValueLen, 0, &eb);
- if (tableEntry->value == NULL) {
+ if (tableEntry->value == 0) {
Memory_free(obj->tableHeap, tableEntry,
sizeof(ti_sdo_utils_NameServer_TableEntry));
Memory_free(obj->tableHeap, tableEntry->name,