Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

How to tell if a particular task is created ?

Posted by Robert H. Oujesky on July 21, 2011
In taskA I would like to know if taskB is created. taskB is a one-shot task (runs and deletes itself). If it is not running, taskA will create the task.
Is there a function call that delivers this information?

thanks!

RE: How to tell if a particular task is created ?

Posted by sven-de on July 21, 2011
To my knowledge there's no specific function for that purpose. But since this is just another case of intertask-communication you could use queues, semaphores or shared memory. Just have a global variable that's set and cleared by task B upon creation and deletion and checked by Task A.

Have you considered suspending task B instead of deleting it - that should have much better performance.

RE: How to tell if a particular task is created ?

Posted by Dave on July 22, 2011
Or if the task never enters the blocked state, replacing it with a software timer.

RE: How to tell if a particular task is created ?

Posted by Robert H. Oujesky on July 22, 2011
didn't think about the suspend idea, hmmmm..... I think that is a great idea! I was using a global variable. this seems much cleaner.

thanks!

RE: How to tell if a particular task is created ?

Posted by Richard on July 22, 2011
...if another tasks still needs to know its state, you can then use the xTaskIsTaskSuspended( xTaskHandle xTask ) API function.

Regards.


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


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner