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] [January 2013 Threads] Question on vTaskSuspend()Posted by Paul Coleman on January 17, 2013 If I have a task waiting on a semaphore with a timeout of say 1 second and I call vTaskSuspend () on that task for more than 1 second what will happen? When the task resumes will the wait for semaphore have timed out or does the tick for that semaphore wait routine also get suspended when the task is suspended? Thanks, Paul.
RE: Question on vTaskSuspend()Posted by Neil on January 17, 2013 Sorry to Hijack your thread. For some reason, I am unable to post new threads and can only reply to old ones (hence the rudeness in replying to your post). The forum home page shows "Due to spam, anonymous posts are no longer permitted. Please register to post." but I am obviously registered with SourceForge or otherwse I wouldn't be able to reply.
Anyone know how I can post new threads?
RE: Question on vTaskSuspend()Posted by Dave on January 17, 2013 I think this is what will happen.
Taskx enters the blocked state with a time out because a semaphore is not there. The unblock time is calculated.
Taskx is suspended.
When taskx is resumed it enteres the running state
When taskx next runs it attempts to get the semaphore again, if the semaphore is still not available the block time is re evaluated, then
...if block time remains the task will enter the Blocked state again until the block time expires or the semaphore is returned.
or
...if the block time has expired the semaphore take function exits returning pdFAIL
RE: Question on vTaskSuspend()Posted by Neil on January 17, 2013 Sorry, I figured out how to post. 2 negative sigma IQ in acgtion.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|