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




Loading

Dump tcb infp?

Posted by John W. on April 30, 2006
Hello Richard,

Is there a way to dump all task control block info?
It's pretty easy to find pxCurrentTCB - but what about for all of the tasks that are running in the system?

Thanks!
John W.

RE: Dump tcb infp?

Posted by Nobody/Anonymous on April 30, 2006
Have you seen function vTaskList in tasks.c?

If you look through the ready lists, pxDelayedTaskList, pxOverflowDelayedTaskList, xTasksWaitingTermination and xSuspendedTaskList then you have every task in the system. The problem is how to do this without having interrupts suspended for the process.

I have a uart task that sends this information on the rs232 when I enter ? in terminal.

RE: Dump tcb info?

Posted by John W. on April 30, 2006
Yes, I have seen that.

I'm asking for the task control blocks of each task - what you're doing would bring my system to a crawl. I can barely run vTaskList() with a periodic update without making my system almost
halt.

My question is:

Can you dump tcb (task control block) info. for each task in the system? (without the exhaustive
list search?)

Regards,
John

RE: Dump tcb infp?

Posted by Richard on May 1, 2006
There is no single point of reference that will give you all the TCB's in a system. A TCB will always be referenced from exactly one of the 'state' lists (blocked list, suspended list, etc), so the only way of finding all of them is to go through all the queues as per vTaskList(). You then have a problem if the scheduler is still running while you do it as the list contents is very dynamic.

You could allocate an array of pointers to TCB's, then each time you call xTaskCreate, place a reference to the created TCB in the next array index. This would give you a simple static way of accessing each that could still be accessed with the scheduler running. You would have to be careful when deleting a task however to ensure the array position pointing to that tasks TCB was marked as empty (set to null?).

Actually, this mechanism could be implemented at the application level if you wanted, rather than in the kernel code. You would just need to keep tabs of all the task handles returned by the handle parameter of the call to xTaskCreate().

Regards.

RE: Dump tcb infp?

Posted by John W. on May 1, 2006
OK Richard,

I'll try your suggestions.

Thanks,
John W.


[ 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