Re: g_atomic_pointer*

2010-03-03 Thread Tim-Philipp Müller
On Mon, 2010-03-01 at 10:35 +, James Morris wrote: Hi, > I need to use an atomic pointer for my app. The documentation for the glib > atomic operations is not exactly helpful. > > Anyway, I wrote a test program: > g_atomic_pointer_set(&myptr, str); > char* p = g_atomic_pointer_get(&m

Re: g_atomic_pointer*

2010-03-02 Thread Brian Lavender
On Mon, Mar 01, 2010 at 10:35:22AM -, James Morris wrote: > Hi, > > I need to use an atomic pointer for my app. The documentation for the glib > atomic operations is not exactly helpful. > > Anyway, I wrote a test program: > > 8< > /* atomic.c */ > #include > int main() > { > ch

g_atomic_pointer*

2010-03-01 Thread James Morris
Hi, I need to use an atomic pointer for my app. The documentation for the glib atomic operations is not exactly helpful. Anyway, I wrote a test program: 8< /* atomic.c */ #include int main() { char* myptr = 0; char* str = "Hello"; g_atomic_pointer_set(&myptr, str); char*