ulTaskNotifyTakeIndexed() implicit declaration of function

if I use ulTaskNotifyTake() it compiles ok but when I change it to ulTaskNotifyTakeIndexed()
the compiler gives the error below.

I have tasks.h included but cannot see the indexed function anywhere.
I also have configTASK_NOTIFICATION_ARRAY_ENTRIES set to 4

If I click on ulTaskNotifyTake() it jumps to the definition but that does not happen if I click on ulTaskNotifyTakeIndexed() which I assume means was not included in freeRTOS witht he configuration I currently setup.

What else do I need to do?

…/src/app_apply.c: In function ‘APP_APPLY_Tasks’:
…/src/app_apply.c:503:21: error: implicit declaration of function ‘ulTaskNotifyTakeIndexed’ [-Werror=implicit-function-declaration]
ui32LabelsToPurge = ulTaskNotifyTakeIndexed(1, pdTRUE, 0);

Thank you

Look here: FreeRTOS-Kernel/task.h at main · FreeRTOS/FreeRTOS-Kernel · GitHub

Which FreeRTOS version are you using?


Thank you Gaurav,
in the FreeRTOSConfig.h it shows V10.2.0

I looked at the link you sent me and it is V10.4
Also compared my freeRTOS code and cannot find the below (which are in your GitHub link). There isn’t even a ulTaskGenericNotifyTake() from which the other two notify are defined.

What can I do to use that NotifyTakeIndexed?

uint32_t ulTaskGenericNotifyTake( UBaseType_t uxIndexToWaitOn,
                                  BaseType_t xClearCountOnExit,
                                  TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
#define ulTaskNotifyTake( xClearCountOnExit, xTicksToWait ) \
    ulTaskGenericNotifyTake( ( tskDEFAULT_INDEX_TO_NOTIFY ), ( xClearCountOnExit ), ( xTicksToWait ) )
#define ulTaskNotifyTakeIndexed( uxIndexToWaitOn, xClearCountOnExit, xTicksToWait ) \
    ulTaskGenericNotifyTake( ( uxIndexToWaitOn ), ( xClearCountOnExit ), ( xTicksToWait ) )

Thank you

Please first check which version of FreeRTOS you are using. You can do that by looking at the top of any of the kernel’s source files. Note FreeRTOSConfig.h is part of the application, not a kernel source file, so it could well have a different version number in it. As per the history file version 10.4.0 introduced the ‘indexed’ versions of the task notification API.

As Richard mentioned, ‘indexed’ version of the task notification API was introduced in 10.4.0. So you need to update your copy of FreeRTOS.