UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
1,933 Views
Registered: ‎03-05-2009

Thread execution in xilkernel

Hi,

 

when using xilkernel, threads are created using the "sys_thread_new" command.  In some app (xapp1026 for example) the thread creation are as follows:

 

sys_thread_new(network_thread, NULL, DEFAULT_THREAD_PRIO);  // create a thread called network_thread

sys_thread_new(tftpserver_application_thread, 0, DEFAULT_THREAD_PRIO);  // create a thread called tftpserver_application

.

.

.

sys_thread_new(web_application_thread, 0, DEFAULT_THREAD_PRIO);  // create a thread called web_application

 

 

In this case, all the threads have a priority level of "DEFAULT_THREAD_PRIO".  How does xilkernel know which thread to execute first or which task gets to interrupt another?

Where is this "DEFAULT_THREAD_PRIO" get defined? 

 

Thanks

HV

 

0 Kudos