xilkernel: documentation of xmk_add_static_thread() wrong
since lost quiet some finding this, I want to share a wrong statement in the OS Lib documentation (as of version UG643 May 7, 2012 for xilkernel 5.01.a):
It's about the function xmk_add_static_thread, the doc says:
This function provides the ability to add a thread to the list of startup or static threads that run on kernel start, via C code. This function must be used prior to xilkernel_main() being invoked.
However, after it didn't work for me, I inspected the code of xilkernel, and I am pretty sure that the xilkernel_main() calls an initialization, that kicks out all threads that xmk_add_static_thread() was supposed to register. In my opinion, the documentation should say:
This function provides the ability to add a thread to the list of startup or static threads that run on kernel start, via C code. This function must be used prior to xilkernel_start() and after xilkernel_init() being invoked. Note that xilkernel_main()
I think you are absolutely right! I haven't checked what does xilkernel_init() do, but xmk_add_static_thread() works only if it is called after the xilkernel_init() and before xilkernel_start() is called, otherwise this function returns -1 and nothing works.
I'm also finding a lot of "misspellings" at Xilinx documentation.