Why is there no sample for queue? I was thinking that I could make pseudo vars like queue01_nb_put_word() that would contain queue01_nb_put() and queue01_nb_get(). This new pseudo var would simply split a word into 2 bytes and use the existing pseudo vars. Would this work, or would we get bad data if an interrupt occurs?
Thanks for the help. Matt. On Jul 2, 10:48 am, Joep Suijs <[email protected]> wrote: > Hi Matt, > > 2010/7/2 Matthew Schinkel <[email protected]>: > > > I will try to add to the existing lib as u sugest. how do i test if it is > > interupt safe? > > Testing (run code and check result) can show that the routine is not > interrupt safe, but if all works well, it gives little assurance there > the code is realy interrupt-safe. > > You have to look at the asm created and at each point, think what it > would mean if an interrupt would occur. One aspect is if the interrupt > might have wrong/inconsistent data (e.g. word vars of which the lsb is > updated and the msb not yet, or an flag/index is updated but the > corresponging data is not yet). The other aspect is that the interrupt > might change something (e.g. add or remove a item to the queue) and > the effect of this on the next code. > > The sequence of statements and use of variables in the current code > has been used in various systems over the last 10 years without > problem. So please don't change that. > > Joep -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
