Shouldn’t it be :
( pxList->uxNumberOfItems )–;
pxItemToRemove->pvContainer = NULL;

II]I’m trying to use the vTaskDelayUntil :
I have 3 tasks
- task 1 : priority 1 and it is resuming task 2
- task 2 : priority 2 and it is itself suspending
- task 3 : using vTaskDelayUntil like in FreeRTOS example

and it is scheduling like this
task 3 wake up + sleeping
task 2
task 1
task 2
task 1
task 2
task 3 wake up by timer + sleeping
task 1
task 1
…
task 3 wake up by timer + sleeping
task IDLE …

I don’t understand why it is 'killing" the other task : the value of uxNumberOfItems for the
pxReadyTasksLists[2] & [3] became 0 ???

> Shouldn’t it be :
> ( pxList->uxNumberOfItems )–;
> pxItemToRemove->pvContainer = NULL;

Looks like you have just swapped the last two lines around, or have I missed something? I don’t think it makes any difference which way around the lines are unless you have spotted something otherwise.

> II]I’m trying to use the vTaskDelayUntil :
> I have 3 tasks
> - task 1 : priority 1 and it is resuming task 2
> - task 2 : priority 2 and it is itself suspending
> - task 3 : using vTaskDelayUntil like in FreeRTOS example
>
> and it is scheduling like this
> task 3 wake up + sleeping
> task 2
> task 1
> task 2
> task 1
> task 2
> task 3 wake up by timer + sleeping
> task 1
> task 1
> …
> task 3 wake up by timer + sleeping
> task IDLE …
>
> I don’t understand why it is 'killing" the other task : the value of uxNumberOfItems
> for the
> pxReadyTasksLists[2] & [3] became 0 ???

You don’t say what priority task 3 is, but don’t think this matters. Your question is what happens to task 2 when task 1 runs twice in a row?

pxReadyTasksLists[2] and [3] will only contain data when the tasks are in the ready state, so it might be ok that there is nothing in them.

Can you provide an outline of the structure of your tasks?

for the first question, you’re right I mistake with pointers.
For the second : task 3 is priority 3 and task 1 is my low priority task in which there is always something to do
static void task1( void *pvParameters )
{
( void ) pvParameters;
for( ;; )
{
//there is always something : polling + TaskResume(Task2) so pxReadyTasksLists[1].uxNumberOfItems must be always 1

I understand pxReadyTasksLists[2].uxNumberOfItems can be 0 because I’m suspending it but for the task1 it must be always 1 but in my case this task is not working anymore as I wrote before.

I might have encountered the same problem, related to vListRemove. It seems to me that the problem is related to vTaskResumeAll who remove ready task from EventList without checking if it’s actually listed in any EventList. This is the case with vTaskDelay or vTaskDelayUntil.

I posted this problem today (17/04/06)
Still seeking solution.