[ECOS] thread & resources lock

Andrew Lunn andrew@lunn.ch
Fri Dec 12 11:36:00 GMT 2003


On Fri, Dec 12, 2003 at 10:18:11AM +0100, fazio@planetek.it wrote:

> I have a doubt about resouces management used by two threads: one
> thread writes a variable and the other one reads its content. Do I
> have to lock the resource only when I write it or both in writing
> and reading?

I suggest you find a good book about multi-threaded programming and
operating systems. It should cover thinks like this. You need to
understand the background before you look at your specific problem.

        Andrew

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list