Commit graph

17 commits

Author SHA1 Message Date
Colin Guthrie
86dee05aec Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
Jared D. McNeill
8d89ccdcf2 NetBSD specific atomic operation implementation
Signed-off-by: Lennart Poettering <lennart@poettering.net>
2009-01-22 01:52:35 +01:00
Lennart Poettering
13018d62c1 fix a few compiler warnings on older gcc 2008-08-29 23:53:55 +02:00
Lennart Poettering
506eacc922 reword amd64 message 2008-08-29 21:46:12 +02:00
Lennart Poettering
a45440d5c9 the native atomic ops implementation for amd64 seems to work fine 2008-08-29 21:42:09 +02:00
Lennart Poettering
ca38446e6b Change return value of cmpxchg atomic op to pa_bool_t 2008-08-29 20:24:46 +02:00
Lennart Poettering
dc9b8dce30 add a few missing casts 2008-08-20 03:33:06 +03:00
Lennart Poettering
8ae83d618e get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
Lennart Poettering
7dffccded5 add Nokia copyright
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2538 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-06-16 19:00:47 +00:00
Lennart Poettering
9a501ef28e fix a compiler warning on ARM due to missing cast, patch from Jyri Sarha
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2493 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-06-03 08:40:30 +00:00
Lennart Poettering
7262e2fc35 add proper arm atomic ops support, patch from Jyri Sarha
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2127 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-03-26 21:15:52 +00:00
Lennart Poettering
a67c21f093 merge 'lennart' branch back into trunk.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-10-28 19:13:50 +00:00
Lennart Poettering
918cacb4f4 Replace AO_xxx usage with pa_atomic_xxx and friends wherever it makes sense
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1459 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-27 20:38:14 +00:00
Pierre Ossman
06211b7c8f Add copyright notices to all relevant files. (based on svn log)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-02-13 15:35:19 +00:00
Pierre Ossman
521daf6f0a Huge trailing whitespace cleanup. Let's keep the tree pure from here on,
mmmkay?


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04 13:43:45 +00:00
Lennart Poettering
c89cb6a00f add static initializer PA_ATOMIC_INIT()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1384 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-09 22:54:11 +00:00
Lennart Poettering
bfaa358458 add a tiny wrapper around libatomic_ops: pa_atomic_int_t and pa_atomit_ptr_t.
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
2006-09-08 15:43:44 +00:00