Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

New to Synergy / ThreadX

$
0
0

My firmware team and I have been using Hew and the Renesas H8 family for years. We use the standard "big loop" design; you enter main(), run all your initialization/setup code, and then enter your while(1) loop and run forever.  In making the change to Synergy with ThreadX I am trying to understand, from a big picture  point of view, how the initialization/setup code is handled in a multithreaded environment.  I would just stick my init/setup code it in main(), but the Synergy Configurator generates that file so I can't edit it directly. The main() function as generated by the Configurator calls tx_kernel_enter(), which creates the threads, meaning the earliest in the process I can put my code is in the thread_entry() function in user-editable code.

So in keeping with the spirit of the multithreaded environment, I am wondering if the right approach is to create an initialization/setup "housekeeping" thread that is configured to be the only one that starts up automatically. The remaining threads are created in a suspended state and only run when signaled (by a semaphore?) that the initialization thread is finished setting up.

Thanks,

tom


Viewing all articles
Browse latest Browse all 5781

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>