public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] thread & resources lock
@ 2003-12-12  9:35 fazio
  2003-12-12 11:36 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: fazio @ 2003-12-12  9:35 UTC (permalink / raw)
  To: ecos-discuss

Hi,
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?

P.S. I'm using ecos on v850 target.
Thanks.

Teresa Fazio.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] thread & resources lock
  2003-12-12  9:35 [ECOS] thread & resources lock fazio
@ 2003-12-12 11:36 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2003-12-12 11:36 UTC (permalink / raw)
  To: fazio; +Cc: ecos-discuss

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-12-12 10:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-12  9:35 [ECOS] thread & resources lock fazio
2003-12-12 11:36 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).