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

Customised Task Head

Posted by sagi2097 on March 24, 2014

Hello, I have this idea to create a struct that will be used as a custom Task header.This would serve like a global task manager. Each time a task is created, by using a hook I created (same as portSETUPTCB) I call my own function that adds a new member in a list of type sAppInstnace ( the custom type). I am not sure at the moment if this is as usefull as I believe, but I would still like to ask a few things. Looking at the vTaskGetRunTimeStats and vTaskList implementations, it looks like I have to manually gather data regarding each task and add them . I was hoping there would be a struct ready to point at, instead of manually dig data out manually. The data I need for now are : The TaskFunctiont pxTaskCode which is the address of the Task function prototype, the uxTaskNumber, the task base priority. after these, as secondary data, i could use other data such as Task State, stack usage etc. I found two stucts that seem to be more than I need: "TaskStatust" and "TaskParameterst" . Would it be possible to use these two structs for my purpose? If yes, what would the best way be? Thank you Alex


Customised Task Head

Posted by edwards3 on March 24, 2014

You would have to pick out the data from the linked lists, but you don't have access to them unless you edit the RTOS source files. You could use the trace macros to get information on most things as it happens, or copy the TCB structure in your application code then cast a task handle to the replicated structure to get access to evereything it contains. Doing that means you would have to update your replicated structure each time the real structure changed.


[ 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