# Task.h : error: 'uxIndexToNotify' undeclared

**URL:** <https://forums.freertos.org/t/task-h-error-uxindextonotify-undeclared/10689>\
**Category:** Kernel\
**Created:** [September 17, 2020, 3:52pm UTC](https://forums.freertos.org/t/task-h-error-uxindextonotify-undeclared/10689 "2020-09-17T15:52:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![papyDoctor](https://avatars.discourse-cdn.com/v4/letter/p/a587f6/32.png) [@papyDoctor](https://forums.freertos.org/u/papyDoctor)\
**Post date:** [September 17, 2020, 3:52pm UTC](https://forums.freertos.org/t/task-h-error-uxindextonotify-undeclared/10689/1 "2020-09-17T15:52:30Z")

</div>

Hi,  
I’m using FreeRTOS v10.4.0  
I’m using ulTaskNotifyTakeIndexed (new v10.4.0) function, I’ve set in FreeRTOSConfig.h :

> #define configUSE\_TASK\_NOTIFICATIONS 1  
> #define configTASK\_NOTIFICATION\_ARRAY\_ENTRIES 4

When I compile I get this error:

> /Source/include/task.h:2561:32: error: ‘uxIndexToNotify’ undeclared (first use in this function)

Then I digged in task.h and found this at line 2560:

> #define ulTaskNotifyTakeIndexed( uxIndexToWaitOn, xClearCountOnExit, xTicksToWait )   
> ulTaskGenericNotifyTake( ( uxIndexToNotify ), ( xClearCountOnExit ), ( xTicksToWait ) )

It’s a bug or I’m missing something in C (replace uxIndexToNotify by uxIndexToWaitOn) ?

Olivier

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [September 17, 2020, 5:10pm UTC](https://forums.freertos.org/t/task-h-error-uxindextonotify-undeclared/10689/2 "2020-09-17T17:10:51Z")

</div>

I can confirm this is a bug. I was trying to work out why our test code built and passed with this bug present - which turned out to be because the test code has a loop variable that is also called uxIndexToNotify so the inlined macro used that. We will get a fix forthwith.

---

<div class="post-metadata">

**Author:** ![rashed](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rashed/32/14_2.png) [@rashed](https://forums.freertos.org/u/rashed)\
**Post date:** [September 17, 2020, 5:12pm UTC](https://forums.freertos.org/t/task-h-error-uxindextonotify-undeclared/10689/3 "2020-09-17T17:12:33Z")

</div>

Thank you @papyDoctor for your finding. We’ll update you here (or you can watch our repo) when we have patched the bug.

---

<div class="post-metadata">

**Author:** ![cobusve](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/cobusve/32/1447_2.png) [@cobusve](https://forums.freertos.org/u/cobusve)\
**Post date:** [September 17, 2020, 11:28pm UTC](https://forums.freertos.org/t/task-h-error-uxindextonotify-undeclared/10689/4 "2020-09-17T23:28:51Z")

</div>

I have logged a bug for this here [https://github.com/FreeRTOS/FreeRTOS-Kernel/issues/175](https://github.com/FreeRTOS/FreeRTOS-Kernel/issues/175)

This has subsequently been fixed in V10.4.1 which is now available at [https://github.com/FreeRTOS/FreeRTOS](https://github.com/FreeRTOS/FreeRTOS) when you check out the latest release.
