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] [March 2014 Threads]
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
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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.