Add GAtomicArray for RCU-style lockless updates
authorAlexander Larsson <alexl@redhat.com>
Wed, 9 Sep 2009 14:47:44 +0000 (16:47 +0200)
committerAlexander Larsson <alexl@redhat.com>
Mon, 30 Nov 2009 19:48:50 +0000 (20:48 +0100)
commit75ce4741f9a7a26098a77407de9b4cc2b985a254
treea0d4fc9f132e6b2984c18d37b894d5dcfb4128b6
parentf55752b10cc29090550005e16e9e7f72c5c060fa
Add GAtomicArray for RCU-style lockless updates

This adds supports for a lock-less a non-shrinking growable array.
You can use it to do reads using no locks, as long as your read-code
can handle that during the read transaction the object can be modified
by another writer (but it will not change size or be freed), and you
can only trust the result once the transaction has finished successfully.

This doesn't free things like RCU normally does, instead it pushes the
memory on a free list that is reused for other atomic arrays.
gobject/Makefile.am
gobject/gatomicarray.c [new file with mode: 0644]
gobject/gatomicarray.h [new file with mode: 0644]