If an event handler has preempted a task then it is probably the result of an interrupt and is running in that interrupt's context. As has been covered in previous posts, a second interrupt may preempt if the first handler re-enables them. I think the UART code is an example.
So the bottom line is: probably... I don't believe that there is any specific module for event scheduling as it is spread through all the interrupt behavior settings for various bits of hardware. A close reading of the controller's interrupt manual sections and the relevant TOS code is about the best you can do. MS Bin Lei wrote: > Dear All > > Here's a question about scheduling of TinyOS: > Event handler can preempt CPU from task, that's definite, > but how about an event handler preempt another event handler? > E.g. handler1 has 3 steps 11,12,13 while handler2 has 3 steps 21,22,23 > respectively. > Handler 1 execute first and goest to 11, 12, while suddenly handler2 is > triggered by an interrupt? > What happens? from my understanding it should be: 11, 12, _21, 22, 23_, 13 > Is that true? > > b.t.w., which module of tinyos core implement the scheduling algorithm > for event handlers? > > Many thanks. > > -- > Regards, > Benjamin (Bin) Lei (雷斌) > Department of Computer Science and Technology, Nanjing University > Tel: 8625-83594683 > Cell: 86-13813909880 > Addr.: Room 508, Mengmingwei Bldg, Nanjing Univeristy, Nanjing, P.R.C.210093 > E-mail : [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
