summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
Commit message (Collapse)AuthorAgeFilesLines
* Kill spaces on EOLLennart Poettering2007-05-296-2540/+2540
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1465 fefdeb5f-60dc-0310-8127-8f9354f1896f
* build fix for systems lacking capability suppoort. (Problem identified and ↵Lennart Poettering2007-05-281-0/+4
| | | | | | original patch supplied by Diego Petteno git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1462 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Replace AO_xxx usage with pa_atomic_xxx and friends wherever it makes senseLennart Poettering2007-05-275-61/+66
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1459 fefdeb5f-60dc-0310-8127-8f9354f1896f
* unfortunately we cannot detect if a foreign thread is still running. Thus ↵Lennart Poettering2007-05-271-11/+6
| | | | | | sucks. But what can we do? U. Drepper thinks our use case is invalid. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1458 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Minor optimization: read log level character code from arrayLennart Poettering2007-05-271-27/+12
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1457 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Add a new meta command ".ifexists" to the CLI language, to execute commands ↵Lennart Poettering2007-05-263-13/+73
| | | | | | only if a specified file exists. Original patch from cjvdb. Closes #36 git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1456 fefdeb5f-60dc-0310-8127-8f9354f1896f
* when called with the setid bit change euid to uid sooner to make sure that ↵Lennart Poettering2007-05-251-3/+33
| | | | | | we can access our own files even when we dropped most capabilities. (Closes #21) git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1455 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Fix a DoS with allocating overly large silence buffers. (Identified by Luigi ↵Lennart Poettering2007-05-231-0/+12
| | | | | | Auriemma (re #67) git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1450 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Fix yet another DoS vulnerability, also identified Luigi Auriemma (re #67)Lennart Poettering2007-05-231-1/+2
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1448 fefdeb5f-60dc-0310-8127-8f9354f1896f
* fix minor typoLennart Poettering2007-05-231-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1447 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Fix another DoS vulnerability, also identified Luigi Auriemma (closes #67)Lennart Poettering2007-05-231-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1446 fefdeb5f-60dc-0310-8127-8f9354f1896f
* fix a DoS vulnerability (re #67), originally identified by Luigi AuriemmaLennart Poettering2007-05-231-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1445 fefdeb5f-60dc-0310-8127-8f9354f1896f
* fix commentLennart Poettering2007-05-221-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1438 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Fix some instances where we printed a string without first checking thatPierre Ossman2007-03-062-5/+15
| | | | | | | the pointer was valid. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1436 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Add some debugging output from sample cache subsystem.Pierre Ossman2007-03-011-0/+10
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1430 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Add a wrapper around close() to work around Windows' ass backwards way ofPierre Ossman2007-02-147-24/+45
| | | | | | | handling sockets. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1429 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Allow a formatted string in the validation warning.Pierre Ossman2007-02-141-4/+4
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1428 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Prefix log lines with a character indicating level.Pierre Ossman2007-02-141-4/+27
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1427 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Add copyright notices to all relevant files. (based on svn log)Pierre Ossman2007-02-13165-14/+396
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Don't abort config loading when the user specific cannot be loaded.Pierre Ossman2007-02-051-2/+8
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1423 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Huge trailing whitespace cleanup. Let's keep the tree pure from here on,Pierre Ossman2007-01-04163-1850/+1850
| | | | | | | mmmkay? git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Fix silly copy-and-paste error. (closes #45)Pierre Ossman2006-12-041-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1417 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Fix incorrect assert.Pierre Ossman2006-11-241-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1416 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Support reversed endian floats. (closes #28) (closes #35)Pierre Ossman2006-11-082-0/+21
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1412 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Check correct variable for return value. Closes #37.Pierre Ossman2006-11-081-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1411 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Revert r1404 and keep it on a development branch until it is fully tested.Pierre Ossman2006-11-0618-845/+448
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1409 fefdeb5f-60dc-0310-8127-8f9354f1896f
* rework memory block management to be thread-safe and mostly lock-free.Lennart Poettering2006-09-2618-448/+845
| | | | | | | | | | | | | | | | | | | | | pa_memblock is now an opaque structure. Access to its fields is now done through various accessor functions in a thread-safe manner. pa_memblock_acquire() and pa_memblock_release() are now used to access the attached audio data. Why? To allow safe manipulation of the memory pointer maintained by the memory block. Internally _acquire() and _release() maintain a reference counter. Please do not confuse this reference counter whith the one maintained by pa_memblock_ref()/_unref()! As a side effect this patch removes all direct usages of AO_t and replaces it with pa_atomic_xxx based code. This stuff needs some serious testing love. Especially if threads are actively used. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1404 fefdeb5f-60dc-0310-8127-8f9354f1896f
* upgrade refcnt.h to make use of our new pa_atomic_xxx() APILennart Poettering2006-09-261-8/+9
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1403 fefdeb5f-60dc-0310-8127-8f9354f1896f
* add asynchronous inter-thread notification APILennart Poettering2006-09-262-0/+181
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1402 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Fix up build structure for platform dependent modules. Also add implementationPierre Ossman2006-09-112-29/+73
| | | | | | | on Win32 for pa_once(). git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1395 fefdeb5f-60dc-0310-8127-8f9354f1896f
* make pa_mutex_new() and pa_cond_new() succeed in all cases. Similar ↵Lennart Poettering2006-09-091-13/+3
| | | | | | behaviour to pa_xmalloc(). git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1389 fefdeb5f-60dc-0310-8127-8f9354f1896f
* rework pa_once once again, because the once function needs to have ↵Lennart Poettering2006-09-092-9/+74
| | | | | | | | | terminated before pa_once returns, regardless whether the local call executes it or another thread does. With the previous code it might happen that an long-running initializing in a once function is not terminated yet when another thread thinks it already is. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1387 fefdeb5f-60dc-0310-8127-8f9354f1896f
* update for newer APIs: replace direct usage of libatomic_ops by usage of our ↵Lennart Poettering2006-09-092-43/+13
| | | | | | own atomic.h; remove pa_once implementation; always use our pa_once implementation instead of the POSIX version git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1386 fefdeb5f-60dc-0310-8127-8f9354f1896f
* implement trival pa_once API based on atomic operationsLennart Poettering2006-09-091-0/+42
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1385 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
* implement a simple lock-free free listLennart Poettering2006-09-092-0/+265
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1382 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
* don't maintain a list of allocated mempool slots, we don't use it anywayLennart Poettering2006-09-071-6/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1380 fefdeb5f-60dc-0310-8127-8f9354f1896f
* make pa_stream thread-safe: use new refcounting system, protect access using ↵Lennart Poettering2006-09-071-28/+93
| | | | | | mutexes git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1379 fefdeb5f-60dc-0310-8127-8f9354f1896f
* fix indentationLennart Poettering2006-09-061-2/+2
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1375 fefdeb5f-60dc-0310-8127-8f9354f1896f
* add accessor functions for the userdata attached to a pa_thread objectLennart Poettering2006-09-042-0/+15
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1371 fefdeb5f-60dc-0310-8127-8f9354f1896f
* fix pa_thread_is_running() for foreign threads; fix a memory leak for ↵Lennart Poettering2006-09-041-1/+25
| | | | | | foreign threads git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1370 fefdeb5f-60dc-0310-8127-8f9354f1896f
* make pa_thread_self() return a sensible pointer on foreign threadsLennart Poettering2006-09-041-2/+19
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1368 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Fix call to pa_mutex_new().Pierre Ossman2006-09-011-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1358 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Add pthread_once() equivalent support.Pierre Ossman2006-09-013-31/+55
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1357 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Thread implementation for Win32.Pierre Ossman2006-09-012-0/+379
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1356 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Also wrap yield functionality so that it can be platform independent.Pierre Ossman2006-08-312-0/+10
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1353 fefdeb5f-60dc-0310-8127-8f9354f1896f
* define AO_REQUIRE_CAS in the Makefile instead of each source file, ↵Lennart Poettering2006-08-313-3/+0
| | | | | | effectively reversing r1348 git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1351 fefdeb5f-60dc-0310-8127-8f9354f1896f
* fix handling of "running" variableLennart Poettering2006-08-301-3/+8
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1349 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Add AO_REQUIRE_CAS as we do.Pierre Ossman2006-08-303-0/+5
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1348 fefdeb5f-60dc-0310-8127-8f9354f1896f