Keil Rtx Thread Switching Code