Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


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.


...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.

[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists