FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [July 2010 Threads] details in xTaskResumeFromISRPosted by Yuhui Lin on July 27, 2010 In the implementation of xTaskResumeFromISR, it checks the state of scheduler. If the scheduler is not locked, it will change suspended list and ready list directly, otherwise only put the task, which is to be resume, in xPendingReadyList.
I don't understand what's the main concern for the state of scheduler, since this operation should be called from ISR.
RE: details in xTaskResumeFromISRPosted by Richard Damon on July 27, 2010 There are some point in the kernel which manipulate the scheduler state, which rather than disable interrupts for an extended period of time, will just disable the scheduler. If the interrupt routine attempted to change the state of a task, this could cause a corruption of the scheduler, so the need to move the task to the ready list is noted and handled after the original operation is completed.
RE: details in xTaskResumeFromISRPosted by Yuhui Lin on July 27, 2010 Thanks richard!
I've got another question. Following is one comment in funciotn xTaskIsTaskSuspended: /* Is it in the suspended list because it is in the Suspended state? It is possible to be in the suspended list because it is blocked on a task with no timeout specified. */
This scenario sounds reasonable. My question is what's the entry function for this scenario? I searched for xSuspendedTaskList in task.c file. I can't find relevent operations which may results in a blocked task stay in suspended queue. As the global varible xSuspendedTaskList is static, functions outside task.c file would not access it.
RE: details in xTaskResumeFromISRPosted by Richard Damon on July 27, 2010 With a quick check of the source code, the function vTaskPlaceOnEventList check for indefinite timeouts and places these tasks on the suspended task list instead of the delayed task list. (so the task isn't automatically awakened after a period of time). Thus any call to a blocking function with a timeout delay of portMAX_DELAY that does block, will put the task on the xSuspendedTaskList (and will be removed when the block ends).
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|