Good evening everyone,
I was browsing the source code of the IDF libs, particuarly I was looking in the FreeRTOS folder. I wished to learn about the implementation of "xTaskCreateStaticPinnedToCore", which is re-implemented by IDF to allow the user to specify which core should run the task. As I proceed I saw the "prvInitialiseNewTask" function and I wanted to look at the implementation but I was a bit disappointed that there is no implementation of this function in any file. In tasks.c there is only the definition and then the macro PRIVILEGED_FUNCTION, which I discovered to be just a directive to the MPU. What I noticed is that the "prvInitialiseNewTask" has an implementation in tasks.c in the original FreeRTOS repo, but here no. I just wonder why.
Regards,
Francesco.
Implementation of prvInitialiseNewTask
Re: IDF-FreeRTOS source code
Hi Francesco,
I think what you saw is what is called a "forward declaration" in C, of a static function declared later in the file.
The full function is also in there: https://github.com/espressif/esp-idf/bl ... sks.c#L859
(Note: I renamed this topic to be more specific about the question.)
Angus
I think what you saw is what is called a "forward declaration" in C, of a static function declared later in the file.
The full function is also in there: https://github.com/espressif/esp-idf/bl ... sks.c#L859
(Note: I renamed this topic to be more specific about the question.)
Angus
Re: Implementation of prvInitialiseNewTask
Good morning Angus and thanks for your answer. I am a bit embarrassed because I know what forward declarations are in C, but for some reason the regexp that I was using to search the implementation of the function was finding only the declaration.
I wrongly thought that it might have been a function in a compiled library, which was exposing only the declaration!
Thanks!
I wrongly thought that it might have been a function in a compiled library, which was exposing only the declaration!
Thanks!
Who is online
Users browsing this forum: ESP_Sprite, Google [Bot] and 54 guests