> I think you're missing the bigger picture here. A short busy-wait > isn't going to have much effect on a PIC application, whether it's > Salvo-based or not. Indeed, but it is the longer waits that I was worried about. Short waits (short relative to the time comstraints on the other task) can be busy waits, without any problems. > This would be the case in any superloop application, in any > cooperative RTOS, and also in a preemptive RTOS with preemption > (temporarily) disabled -- makes no difference. True, that is the reason that the time that preemption is disabled must be limited - it is in fact one of the important quality factors of an RTOS, because it determines the responsivity (interrupt latency). > The _advantage_ of the RTOS like Salvo is that if you're willing to > code it (and in fact there's a 44780 LCD controller initialization > example in the manual), you can have the system do other things while > in an RTOS-driven delay. Yes, but you must code for it - delays during which the other tasks must run must be in the main body of the task. So you cxan not take a library that what not written with this limitation in mind and use it. > The larger issue isn't busy-waits, it's encapsulation. I agree, the fact that you are forced to put the waits in the main loop is not so much a problem in itself, but it forces you to make internals of a library visible to the library user. > but the net effect is the same controlling access to resources via semaphores. True, but the resctricition imposed by the RTOS weights heavily on the application structure: everything that can wait (including semaphores and other synchronisation primitives) must be in the main body, it can not be buried (abstracted away) in a library function. > Also, many Salvo applications are indistinguishable from what a > preemptive application would look like if it could run on the PIC > (but of course it can't). These are the cases where all tasks either > wait events or are delayed (no "simple" context switches). At the C > level, they look the same. Here I disagree: a Salvo (or other non-preemtive RTOS) application has the big ristriction: no long (or potentially long) waits in (non-inline) functions! Wouter van Ooijen van Ooijen Technische Informatica: http://www.xs4all.nl/~wf/ Jal compiler for PIC microcontrollers: http://www.xs4all.nl/~wf/wouter/jal -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads