How can I implement a multi-threaded cross-process synchronization
mechanism? Let's assume I have several process: A, B, C, etc. Each has
several threads: A1, A2, A3, B1, B2, C1, C2, etc. A process may create a
different thread, or another process may be added in run-time using
fork().
Now let's assume I want to protect a critical section so that:
1. Only one thread can access it.
2. If this thread accesses it, it does not interfere with the other
threads in the same process. (i.e: they are not blocked or anything)
Likewise for an R/W Lock, a condition variable, a semaphore, etc.
I tried using flock(), but it seems to allow only one thread out of a
single process at a time.
>From what I understood, ACE has such a mechanism, but obviously, its code
is far too #ifdef'ed to make sense of. In any case, I remember that the
Win32 API has such a mechanism.
Regards,
Shlomi Fish
----------------------------------------------------------------------
Shlomi Fish [EMAIL PROTECTED]
Home Page: http://t2.technion.ac.il/~shlomif/
Home E-mail: [EMAIL PROTECTED]
"Let's suppose you have a table with 2^n cups..."
"Wait a second - is n a natural number?"
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]