[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [LCP]Waking multiple processes on shared memory update
On Tue, 2 Jul 2002, Brad Douglas wrote:
> Next (and a better solution had it worked) I tried including a shared
> conditional variable and mutex in the shared memory and created a array
> of update counters (one per table). My idea was to have update()
> increment the counter for the modified table and then signal the
> conditional variable, waking the waitForUpdate() processes so they
> could compare the modified update array against a local copy they mad
> before waiting. This all fell apart when I found out I could not share
> mutexs or conditional variables between processes under Linux.
Hrmm... are you refering to pthread mutexes here? [this seems likely, at
least as I read this]. Sharing those is not going to work.
Try "man semget", which may be what you are looking for.
Hope this helps,
Jack