summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* daemon: realpath segfault fixDavid Yoder2009-10-311-1/+1
| | | | | | | | | | | | | | Lennart, Apparently I was debugging this at the same time as you. I can't figure out why my Fedora 11 install with glibc-2.10 has a glibc realpath that doesn't match the gnu documentation and returns null. But it does. Your commit aa8ce5bb9b159abb2ffb0f43996340566fc2e9c6 almost fixed my problem, but it needs a tweak. Thanks, David Yoder
* Mac OS X: add semaphore implementationDaniel Mack2009-10-311-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Wed, Sep 16, 2009 at 11:57:04PM +0200, Lennart Poettering wrote: > On Wed, 16.09.09 15:15, Daniel Mack (daniel@caiaq.de) wrote: > > > + s = pa_xnew(pa_semaphore, 1); > > + MPCreateSemaphore(UINT_MAX, value, &(s->sema)); > > + pa_assert(s->sema != 0); > > Hmm, I'd prefer if the ret val of MPCreateSemaphore() would be checked > here. > > Also I find it a bit weird checking for s->sema, though not > initializing it to 0 in the beginning. If the call actually failed, > then the assert will check uninitialized memory. Also, comparing > pointers with 0 sucks. That should be NULL. > > Given that this can not realisitically fail, only in OOM or OOM-like > situations in which case we abort anyway it mght be enough just writing: > > pa_assert_se(MPCreateSemaphore(UINT_MAX, value, &s->sema) == 0); > > (Assuming that success is signalled by retval == 0 on MacOSX) > > > +void pa_semaphore_free(pa_semaphore *s) { > > + pa_assert(s); > > + MPDeleteSemaphore(s->sema); > > Same here. > > > + pa_xfree(s); > > +} > > + > > +void pa_semaphore_post(pa_semaphore *s) { > > + pa_assert(s); > > + MPSignalSemaphore(s->sema); > > And here. > > > +} > > + > > +void pa_semaphore_wait(pa_semaphore *s) { > > + pa_assert(s); > > + /* should probably check return value (-ve is error), noErr is ok. */ > > + MPWaitOnSemaphore(s->sema, kDurationForever); > > And here. Ok, done. See the patch below. Daniel >From 26df2fbae6d9215a3ae084876fb5f79e4d9cf4f0 Mon Sep 17 00:00:00 2001 From: Kim Lester <kim@dfusion.com.au> Date: Wed, 16 Sep 2009 09:23:39 +0800 Subject: [PATCH] Mac OS X: add semaphore implementation
* Wrap clock_gettime and friendsDaniel Mack2009-10-311-6/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Wed, Sep 16, 2009 at 11:48:58PM +0200, Lennart Poettering wrote: > On Wed, 16.09.09 15:15, Daniel Mack (daniel@caiaq.de) wrote: > > > From: Kim Lester <kim@dfusion.com.au> > > > > OS X does not define clockid_t or clock_gettime() and friends. > > Add a wrapper to fix this. > > Hmpf. I am not particularly happy with this. This adds a lot of > unnecessary compat code. We don't actually need implementations of > clock_getres(). All we need is some kind of check whether system > timers are accurate or whether they are rounded up to scheduling > slices. On Linux we do that check with clock_getres(), but all the > information it returns is actually not intertesting at all. We just > check if this is below some trheshold, that's all. > > clock_settime() we don't use at all! We shouldn't carry compat code > for that. > > And clock_gettime we don't really need either. We need some kind of > accurate system timers (preferably monotonic), and on Linux we use > clock_gettime() for that. But we already have a fallback there for > gettimeofday(). > > Or in other words, the current APIs pa_rtclock_get(), > pa_rtclock_hrtimer() is supposed to be the abstract API that has > different backends on different systems. I'd very much prefer if any > MacOS specific code would simply be plugged in there instead of > creating various new abstraction interfaces! Ok - what about the version below? I don't particularily like the Daniel >From 9f0a051953ec354ccdb8aa44a9845c408b26ae0b Mon Sep 17 00:00:00 2001 From: Kim Lester <kim@dfusion.com.au> Date: Wed, 16 Sep 2009 14:40:01 +0800 Subject: [PATCH] Implement pa_rtclock_get() and pa_rtclock_hrtimer() for Darwin OS X does not define clockid_t or clock_gettime() and friends. Add wrappers to fix this. Based on a patch from Kim Lester <kim@dfusion.com.au>.
* X11: attach X11 properties to Screen, not DisplayLeszek Koltunski2009-10-301-6/+14
|
* git: ignore kde related filesLennart Poettering2009-10-302-0/+2
|
* svolume: fix MMX errorWim Taymans2009-10-301-1/+6
| | | | | We need to sign extend the lower part of the multiplication before adding it to the higher part. Makes -1 * 0xffff work again.
* sink: simplify silence checksWim Taymans2009-10-301-12/+10
|
* daemon: don't crash if pa_realpath() failsLennart Poettering2009-10-301-10/+13
|
* socket-util: drop redundant castsLennart Poettering2009-10-301-12/+12
|
* socket-util: allocate at least sizeof(sockaddr_storage) spaceLennart Poettering2009-10-301-2/+2
|
* use pa_fopen_cloexec() where applicableLennart Poettering2009-10-3014-27/+27
|
* tdb: use O_CLOEXEC if availableLennart Poettering2009-10-301-9/+34
|
* core-util: introduce pa_fopen_cloexec()Lennart Poettering2009-10-302-2/+28
|
* core-util: make sure to enable FD_CLOEXEC unconditionally to cope with ↵Lennart Poettering2009-10-301-3/+12
| | | | kernels that silently accept but ignore O_CLOEXEC
* use cloexec wrappers wherever applicableLennart Poettering2009-10-3025-91/+39
|
* core-util: introduce FD_CLOEXEC wrappers for open/socket/pipe/acceptLennart Poettering2009-10-302-0/+85
|
* Merge remote branch 'origin/master'Lennart Poettering2009-10-291-4/+4
|\
| * module-equalizer-sink: drop source executable permissions configure.ac: add ↵Jason Newton2009-10-201-0/+0
| | | | | | | | enable/disable + summary line for fftw
| * module-equalizer-sink:Jason Newton2009-10-201-96/+90
| | | | | | | | | | *fixed SSE2 optimized dsp logic (default if available) *cleaned up whitespace formatting (again)
| * module-equalizer-sink: fixed equalizer state save/restoreJason Newton2009-10-201-27/+29
| |
| * device-manager: Fix compiler warning.Colin Guthrie2009-10-191-4/+4
| | | | | | | | Do not use a variable called 'index' as it clashes with string.h
* | simd: update test casesLennart Poettering2009-10-292-3/+11
| |
* | smoother: add comments about optimization recommendations from Jason NewtonLennart Poettering2009-10-291-0/+7
| |
* | libpulse: introduce PA_STREAM_RELATIVE_VOLUMELennart Poettering2009-10-293-5/+32
| |
* | protocol-native: if a client set volume/mute/device store it since it is ↵Lennart Poettering2009-10-281-2/+8
| | | | | | | | user input
* | libpulse: explain semantics of pa_stream_connect_playback() in more detailLennart Poettering2009-10-281-1/+16
| |
* | protocol-native: declare that user configured volumes are always absoluteLennart Poettering2009-10-281-1/+3
| |
* | pactl: format cookie a little bit nicerLennart Poettering2009-10-281-2/+3
| |
* | pactl: include information about client context in pactl stat outputLennart Poettering2009-10-281-1/+14
| |
* | clients: drop definition of BUFSIZE which is unusedLennart Poettering2009-10-282-4/+0
| |
* | libpulse: introduce pa_context_get_tile_size() callLennart Poettering2009-10-283-3/+37
| |
* | memblock: decrease tile size to 64k againLennart Poettering2009-10-281-1/+1
| |
* | module-equalizer-sink: drop source executable permissions configure.ac: add ↵Jason Newton2009-10-191-0/+0
| | | | | | | | enable/disable + summary line for fftw
* | module-equalizer-sink:Jason Newton2009-10-181-96/+90
| | | | | | | | | | *fixed SSE2 optimized dsp logic (default if available) *cleaned up whitespace formatting (again)
* | module-equalizer-sink: fixed equalizer state save/restoreJason Newton2009-10-181-27/+29
|/
* libpulse: add missing includesLennart Poettering2009-10-122-0/+4
|
* buil-sys: fix build w/o DBusDaniel Mack2009-10-121-4/+9
| | | | | | | | | | | | | | | The current git head does not build without DBus libraries installed. Does the patch below look suitable? Thanks, Daniel >From f69145fc603c56cef02134ceeba10e1727fa217e Mon Sep 17 00:00:00 2001 From: Daniel Mack <daniel@caiaq.de> Date: Thu, 8 Oct 2009 14:41:21 +0800 Subject: [PATCH] Makefile.am: fix builds without DBus Signed-off-by: Daniel Mack <daniel@caiaq.de>
* device-manager: Rather than flagging the device as available, just include ↵Colin Guthrie2009-10-103-9/+6
| | | | the sink/source index with PA_INVALID_INDEX meaning unavailable
* Fix build when using -fweb, accept both register and memory constraints.Diego Elio 'Flameeyes' Pettenò2009-10-072-4/+4
| | | | | This was reported as Gentoo bug #287391 by Torsten Kaiser, and the fix was suggested by Mike Frysinger.
* Add check for FFTW, and add option to disable it at build-time.Diego Elio 'Flameeyes' Pettenò2009-10-071-3/+7
| | | | | This way there will be a message at configure if FFTW is not found, and this gets in-line with the rest of the modules' dependencies.
* Fix out-of-tree builds when dbus module is enabled.Diego Elio 'Flameeyes' Pettenò2009-10-071-0/+2
|
* Merge remote branch 'coling/history'Lennart Poettering2009-10-0710-5/+2191
|\
| * device-manager: Play nice with module-stream-restore.Colin Guthrie2009-10-021-37/+47
| | | | | | | | | | | | If m-s-r sets the device we let it do so. Otherwise we handle the routing. We run before module-intended-roles as the priority list will likely be configured appropriately to do the same job, albeit with manual setup.
| * device-manager: Make use of PA_IDXSET_FOREACH when applying entries.Colin Guthrie2009-10-021-12/+12
| |
| * device-manager: Keep track as to whether or not the user specifically ↵Colin Guthrie2009-10-021-9/+40
| | | | | | | | | | | | | | | | | | | | | | renamed the device. If the user has not (via our protocol extension) renamed a device, but it happens to now have a different name (e.g. module-combine automatically updating the description for us or udev-db getting better etc.) then make sure we update our cache with this updated version. If the user has set a name, enforce it's use, even if the description is updated by some other means (e.g. the user manually editing the proplist or another module doing it for them).
| * device-manager: No need to check the version after calling read_entry()Colin Guthrie2009-10-021-4/+4
| |
| * device-manager: Fix typo in module loading script.Colin Guthrie2009-10-021-1/+1
| |
| * device-manager: Add some scripts that are only run under KDE to ↵Colin Guthrie2009-10-013-3/+52
| | | | | | | | load/initialise module-device-manager with routing turned on.
| * device-manager: Misc fixes to co-exist with other stream management/routing ↵Colin Guthrie2009-10-011-40/+30
| | | | | | | | | | | | | | modules. * Do not read or set the save_sink/save_source flags. This seems to be for module-stream-restore only... * Even if a sink is already set by an earlier module, still move it to the sink we dictate.
| * device-manager: Misc fixes.Colin Guthrie2009-10-011-37/+47
| | | | | | | | | | | | | | | | | | | | * Fix a s/sink/source/ copy paste issue when dumping the database. * Only show priority list when routing is enabled (as the list is not updated if not) * Fix a memory access issue when finding the highest priority sinks/sources * key name->device name efficiency fix. * Silence noisy debug on reorder - it seems to work :) * Reroute after reordering. * Initialise preferred lists to PA_INVALID_INDEX