cancel
Showing results for 
Search instead for 
Did you mean: 

ThreadX api documentation/summary?

Rodo
Senior

Hi all,

Is there documentation that shows the ThreadX functions with an explanation of the function's parameter? and which are mandatory and which optional?

This is an example of a simple function call generated by cubeMX:

 

/* Create tx first thread.  */
tx_thread_create(&tx_app_thread, "tx first thread", tx_first_thread_entry, 0, pointer,
TX_APP_STACK_SIZE, TX_APP_THREAD_PRIO, TX_APP_THREAD_PREEMPTION_THRESHOLD, TX_APP_THREAD_TIME_SLICE, TX_APP_THREAD_AUTO_START)

 

I can tell what some of the parameters are by looking at their name but not all of them. I read "Azure RTOS ThreadX User Guide" from Microsoft. I've looked at the STM32 wiki and the threadX documentation on github but I can't find a document just for the functions calls (threads, semaphore, queues, etc) and its parameters (even a summary would be good). Is there such a document? 

Thanks

 

2 REPLIES 2
JesperEC
Associate III

Hi @Rodo

The ThreadX documentation is under transition from eclipse-threadx/rtos-docs to eclipse-threadx/rtos-docs-asciidoc and the old repo will be deprecated.

The documentation you are looking for is probably https://github.com/eclipse-threadx/rtos-docs-asciidoc/blob/main/rtos-docs/threadx/chapter4.adoc#tx_thread_create  which describes all the parameters.

This is C, so there are no optional parameters.

Beware that the this repo tracks threadx mainline which is further ahead than the sources ST use. The latter are most often still the Microsoft sources. But ThreadX has a high degree of API stability and this particular function signature hasn't changed in a long time. You can double check by locating tx_api.h and tx_thread_create.c in the sources STM32CubeMX adds to your project.

The signature of the actual function (_tx_thread_create) may differ slightly and then the macros in tx_api.h are used to match the documentation. Usually, the parameters are actually the same and the only difference is that when you build without TX_DISABLE_ERROR_CHECKING, the API calls translate into functions named _txe… who have more checks on that the parameters have valid values.

Index pages are https://github.com/eclipse-threadx/rtos-docs-asciidoc/blob/main/rtos-docs/threadx/index.adoc and (better)  https://github.com/eclipse-threadx/rtos-docs-asciidoc/blob/main/rtos-docs/threadx/about-this-guide.adoc ,

 

I hope this helps.

     Best regards, Jesper