Commit graph

11 commits

Author SHA1 Message Date
Wim Taymans ed29f33ddb atomicqueue: fix race
After a writer has written to its reserved write location, it can only make the
location available for reading if all of the writers with lower locations have
finished.
2012-02-24 15:24:42 +01:00
Wim Taymans 61e8fa0dc5 atomicqueue: fix subtle race
Fix a race where the reader would see the updated the tail pointer before the
write could write the data into the queue. Fix this by having a separate reader
tail pointer that is only incremented after the writer wrote the data.
2012-02-24 12:51:24 +01:00
Tim-Philipp Müller 13d91d1f6c Use recent GLib API unconditionally now that we depend on the latest GLib 2012-01-22 01:25:22 +00:00
David Schleef f3eac7de22 Work around changes in g_atomic API
See #651514 for details.  It's apparently impossible to write code
that avoids both type punning warnings with old g_atomic headers and
assertions in the new.  Thus, macros and a version check.
2011-06-04 00:36:26 -07:00
Tim-Philipp Müller 9b076246af docs: add some more Since: markers to atomic queue docs 2011-02-21 11:28:11 +00:00
Wim Taymans cc5edeefcd atomicqueue: fix include order
atomicqueue: fix include order# Please enter the commit message for your changes. Lines starting
2011-02-16 19:54:57 +01:00
Wim Taymans 5f81eac5e1 atomicqueue: use correct array sizes 2011-02-16 17:56:39 +01:00
Wim Taymans 6b2c2a043d atomicqueue: fix docs some more 2011-02-16 17:56:39 +01:00
Wim Taymans 905fea098f atomicqueue: add refcounting and docs 2011-02-16 17:56:39 +01:00
Wim Taymans ebb37b48d8 atomicqueue: make sure a min initial_size is used 2011-02-16 17:56:38 +01:00
Wim Taymans 4c9287687b atomicqueue: add an atomic queue
Add an atomic queue. The queue can be used from multiple threads simultaneously
and without taking any locks or doing any blocking operations. This makes it
highly scalable for things like the bus, bufferpools and object recycling.
2011-02-16 17:56:38 +01:00