ulTaskNotifyValueClear missing in V10.0.1

Hi,

I’m currently implementing some Task Notifications. In the API you can find the function ulTaskNotifyValueClear() to manually clear bits on exit:

But there is no reference in the library code, no optional flag to make this function available. Is it only available in current version and not V10.0.1?
I was looking for a workaround to change the task.c variable “pxCurrentTCB->ulNotifiedValue” inside my task/user code. The Task Buffer could be cast to TCB_t but the struct is only known inside task.c.
So I added in my task.c the following code (mainly a copy of xTaskNotifyStateClear):

uint32_t ulTaskNotifyValueClear(TaskHandle_t xTask,
		uint32_t ulBitsToClear)
{
	TCB_t *pxTCB;
	uint32_t xReturn = 0x0;

	/* If null is passed in here then it is the calling task that is having
	its notification state cleared. */
	pxTCB = prvGetTCBFromHandle( xTask );

	taskENTER_CRITICAL();
	xReturn = pxTCB->ulNotifiedValue;
	pxCurrentTCB->ulNotifiedValue &= ~ulBitsToClear;
	taskEXIT_CRITICAL();

	return xReturn;
}

As you can see in FreeRTOS version history you’re right. It was added to v10.3.x.
You should either just upgrade to this version (usually no problem) or alternatively try to backport the code to your FreeRTOS version.

Thanks for the quick reply and the solution. I could have checked the latest code. But good news is that the workaround works, until we may upgrade complete version.