From: Mahesh Radhakrishnan Date: Thu, 7 Nov 2019 21:37:47 +0000 (-0500) Subject: PRSDK-7323: utils/profiling: Fixing errors with CPLUSPLUS build X-Git-Tag: DEV.PROCESSOR-SDK.06.02.00.38~27^2~1 X-Git-Url: https://git.ti.com/gitweb?p=processor-sdk%2Fpdk.git;a=commitdiff_plain;h=c85dee9ab0e3afb3ec3b02bea3cc08f7b4ff1582;hp=750f954f1429f427753ab4a393a1532926355a60 PRSDK-7323: utils/profiling: Fixing errors with CPLUSPLUS build --- diff --git a/packages/ti/utils/profiling/src/profilingHooksR5.c b/packages/ti/utils/profiling/src/profilingHooksR5.c index 6defed375..55e8c52bf 100644 --- a/packages/ti/utils/profiling/src/profilingHooksR5.c +++ b/packages/ti/utils/profiling/src/profilingHooksR5.c @@ -102,8 +102,12 @@ utilsProfilingElem elemlog[MAX_LOG] = {{0}}; * used by the instrumentation functions themselves. This is recorded and * passed into post-processing for a more accurate result. */ -#pragma FUNC_CANNOT_INLINE(empty_fn); void empty_fn(void); /*for misra warnings*/ +#ifdef __cplusplus +#pragma FUNC_CANNOT_INLINE +#else +#pragma FUNC_CANNOT_INLINE(empty_fn); +#endif void empty_fn(void){ } @@ -178,8 +182,12 @@ void ti_utils_exit(void (* func_addr)(void)){ } } -#pragma NO_HOOKS (TaskRegisterId) void TaskRegisterId(int32_t hookSetId); /*for misra warnings*/ +#ifdef __cplusplus +#pragma NO_HOOKS +#else +#pragma NO_HOOKS(TaskRegisterId); +#endif void TaskRegisterId(int32_t hookSetId) { CurrentTaskHookSetId = hookSetId; @@ -191,8 +199,12 @@ void TaskRegisterId(int32_t hookSetId) /* ======== mySwitch ======== * invoked whenever a Task switch occurs/is made ready to run */ -#pragma NO_HOOKS (mySwitch) void mySwitch(const void* prev, const void* next); /*for misra warnings*/ +#ifdef __cplusplus +#pragma NO_HOOKS +#else +#pragma NO_HOOKS(mySwitch); +#endif void mySwitch(const void* prev, const void* next) { if (log_idx < MAX_LOG){