This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: thread & resources lock
- From: Andrew Lunn <andrew at lunn dot ch>
- To: fazio at planetek dot it
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Fri, 12 Dec 2003 11:32:32 +0100
- Subject: Re: [ECOS] thread & resources lock
- References: <3FD995E3.3661.52D26A5@localhost>
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