public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* link list & thread
@ 2009-11-08  9:35 Mohsen Pahlevanzadeh
  2009-11-08 18:40 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Mohsen Pahlevanzadeh @ 2009-11-08  9:35 UTC (permalink / raw)
  To: gcc

Dear all,

I have a thread & 2 func.flush_2_db() is in thread & add_element() is
outside of thread.
add_element's job is adding data to link list.& flush_2_db()'s job is
reading list & drop from list.But my problem is override data & lost
data, because flush_2_db is in the thread & both work parallel.
Do you have any idea for solving my problem?

Yours,
Mohsen

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

* Re: link list & thread
  2009-11-08  9:35 link list & thread Mohsen Pahlevanzadeh
@ 2009-11-08 18:40 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2009-11-08 18:40 UTC (permalink / raw)
  To: mohsen; +Cc: gcc

Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> writes:

> I have a thread & 2 func.flush_2_db() is in thread & add_element() is
> outside of thread.
> add_element's job is adding data to link list.& flush_2_db()'s job is
> reading list & drop from list.But my problem is override data & lost
> data, because flush_2_db is in the thread & both work parallel.
> Do you have any idea for solving my problem?

This question is not appropriate for the gcc@gcc.gnu.org mailing list.
This is a general programming question and has nothing to do with gcc.
Please ask on a general programming forum.

Ian

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

end of thread, other threads:[~2009-11-08 18:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-08  9:35 link list & thread Mohsen Pahlevanzadeh
2009-11-08 18:40 ` Ian Lance Taylor

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).