=?UTF-8?Q?g=5Fatomic=5Fint=5Fcompare=5Fand=5Fexchange?=
- From: Thomas Stover <thomas wsinnovations com>
- To: <gtk-app-devel-list gnome org>
- Subject: g_atomic_int_compare_and_exchange
- Date: Tue, 07 Sep 2010 18:12:01 -0500
I was just looking at gatomic.c to see if
g_atomic_int_compare_and_exchange() would work on an integer inside memory
obtained by mmap(MAP_SHARED) safely between processes. With my limited
understanding it looks like it probably would except for the cases when it
has to fall back to g_mutex_()* ops on g_atomic_mutex. I started to look at
gthread.c to see if the mutex implementations themselves might be based on
inter-process capable mutex technologies, but I'm not following along so
well in there.
So my questions are:
-were any of the atomic functions intended for process shared memory or
just thread shared memory?
-even if that is not the case, would the non-mutex based implementations
work in that fashion?
-is there a way to test for what implementation is being used? (if it
maters)
--
www.thomasstover.com
NO CARRIER
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]