path: root/src/pulsecore/atomic.h
Commit message (Collapse)AuthorAgeFilesLines
* freebsd: fix atomic ops implementationsJoe Marcus Clarke2009-11-211-0/+104
| | | | | | Stole from
* Use LGPL 2.1 on all files previously using LGPL 2Colin Guthrie2009-03-031-1/+1
* NetBSD specific atomic operation implementationJared D. McNeill2009-01-221-0/+73
| | | | Signed-off-by: Lennart Poettering <>
* fix a few compiler warnings on older gccLennart Poettering2008-08-291-1/+1
* reword amd64 messageLennart Poettering2008-08-291-1/+1
* the native atomic ops implementation for amd64 seems to work fineLennart Poettering2008-08-291-3/+3
* Change return value of cmpxchg atomic op to pa_bool_tLennart Poettering2008-08-291-14/+16
* add a few missing castsLennart Poettering2008-08-201-6/+6
* get rid of svn $ keywordsLennart Poettering2008-06-181-2/+0
* add Nokia copyrightLennart Poettering2008-06-161-1/+2
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2538 fefdeb5f-60dc-0310-8127-8f9354f1896f
* fix a compiler warning on ARM due to missing cast, patch from Jyri SarhaLennart Poettering2008-06-031-5/+5
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2493 fefdeb5f-60dc-0310-8127-8f9354f1896f
* add proper arm atomic ops support, patch from Jyri SarhaLennart Poettering2008-03-261-1/+230
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2127 fefdeb5f-60dc-0310-8127-8f9354f1896f
* merge 'lennart' branch back into trunk.Lennart Poettering2007-10-281-18/+175
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Replace AO_xxx usage with pa_atomic_xxx and friends wherever it makes senseLennart Poettering2007-05-271-0/+4
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1459 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Add copyright notices to all relevant files. (based on svn log)Pierre Ossman2007-02-131-0/+2
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Huge trailing whitespace cleanup. Let's keep the tree pure from here on,Pierre Ossman2007-01-041-3/+3
| | | | | | | mmmkay? git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f
* add static initializer PA_ATOMIC_INIT()Lennart Poettering2006-09-091-0/+2
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1384 fefdeb5f-60dc-0310-8127-8f9354f1896f
* add a tiny wrapper around libatomic_ops: pa_atomic_int_t and pa_atomit_ptr_t.Lennart Poettering2006-09-081-0/+80
Reasoning: This wrapper fixes a few API issues I found with atomic_ops: * AO_t is an int, which can be written to with "=". pa_tomic_int_t however is a struct which due to type-safety enforces proper access with pa_atomic_xx(). (Inspired by the way the Linux kernel handles this) * AO_load()'s parameter is lacking a "const" * Explicitly choosing the proper memory barrier for each call is very difficult and especially hard to debug because most CPUs support only two different barrier types which the eight types defined by atomic_ops are mapped to. Most other software (i.e. glib, Linux kernel) which provides atomic variable access usually do a full barrier in all cases and so should we. Eventually we might choose to add additional memory barrier calls, in which case we can add special versions of the current function with special suffixes. * The function names are unnecesarily long * Atomic pointer accesses are only supported with manual casts. The new pa_atomic_xxx interface borrows heavily from the GLib and Linux kernel atomicity API, though it is different from both of them. In addition this abstract API makes it easy to port PA to different atomicty APIs, if libatomic_ops should ever become out-of-fashion or if the system OS supports atomic primitives anyway. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1381 fefdeb5f-60dc-0310-8127-8f9354f1896f