On Thu, May 28, 2009 at 12:47 PM, Gerhard Fiedler < lists@connectionbrazil.com> wrote: > Typical desktop/multi-user systems do allow this. Most systems have a > means of thread (aka task) synchronization. You can use this to prevent > that two threads interrupt each other in critical moments. Details (and > nomenclature) of course vary widely between systems. > Within your app you can do that, however, in a typical desktop you have other tasks than just yours and those tasks are almost guaranteed that will not care about your synchronization efforts. Usually you need to write a kernel module / driver that can occupy the CPU as long as it needs. The driver then will provide an API to the upper layer so the user app does not have to be dependent on the timings or bother about such things. Tamas -- http://www.mcuhobby.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist