Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Circular buffers

2004-03-04 by Robert Adsett

At 10:55 PM 3/4/04 +0100, you wrote:
>I belive this is te best way to do it. Using linked list is to
>procesor and memory consumnig. If you use add byte only in interrupt
>rutine and getbyte only in main program it's considered to be "thread
>safe"
It's not thread safe.  It'll work in a cooperative tasking environment but 
not in a pre-emptive or interrupt environment w/o further protection.

It's also missing overflow protection but that's a different issue.

It's fine as an illustration of the general concept though which is what is 
was presented as.

Robert


" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.