pulseaudio/src/pulsecore
Marc-André Lureau 0955e3d45b Base mainloop on pa_rtclock_now()
Move the mainloop to monotonic based time events.

Introduces 4 helper functions:
pa_{context,core}_rttime_{new,restart}(), that fill correctly a
timeval with the rtclock flag set if the mainloop supports it.

Both mainloop-test and mainloop-test-glib works with rt and timeval
based time events. PulseAudio and clients should be fully functional.

This patch has received several iterations, and this one as been
largely untested.

Signed-off-by: Marc-André Lureau <marca-andre.lureau@nokia.com>
2009-06-20 17:29:31 +03:00
..
ffmpeg run make update-ffmpeg 2009-03-02 14:33:36 +01:00
asyncmsgq.c fix comment 2009-02-20 03:20:36 +01:00
asyncmsgq.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
asyncq.c rate limit a warning 2009-01-24 01:36:43 +01:00
asyncq.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
atomic.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
aupdate.c memtrap,aupdate: split atomic update from memtrap into seperate aupdate framework 2009-04-22 19:10:09 +02:00
aupdate.h memtrap,aupdate: split atomic update from memtrap into seperate aupdate framework 2009-04-22 19:10:09 +02:00
auth-cookie.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
auth-cookie.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
authkey.c various spelling fixes 2009-04-04 02:27:13 +02:00
authkey.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
avahi-wrap.c Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
avahi-wrap.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
bitset.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
bitset.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
card.c card: make sure to always hand failure code back in some calls 2009-06-17 03:15:56 +02:00
card.h card: get rid of description field which is unused 2009-06-17 03:16:13 +02:00
cli-command.c alsa: rework mixer logic 2009-06-17 03:45:14 +02:00
cli-command.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
cli-text.c alsa: rework mixer logic 2009-06-17 03:45:14 +02:00
cli-text.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
cli.c cli: allow easy repeating of commands with '/' 2009-05-25 23:56:38 +02:00
cli.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
client.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
client.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
conf-parser.c conf-parse: implement .include directive 2009-06-17 03:11:47 +02:00
conf-parser.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
core-error.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
core-error.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
core-rtclock.c Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
core-rtclock.h Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
core-scache.c Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
core-scache.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
core-subscribe.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
core-subscribe.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
core-util.c core-util: implement pa_maybe_prefix_path() 2009-06-17 03:13:59 +02:00
core-util.h core-util: implement pa_maybe_prefix_path() 2009-06-17 03:13:59 +02:00
core.c Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
core.h Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
creds.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
database-gdbm.c gdbm: set default block size to 1K 2009-06-17 03:16:48 +02:00
database-tdb.c tdb: include signal.h before tdb.h for compat reasons 2009-06-04 23:50:43 +02:00
database.h database: add abstracted database API 2009-05-14 01:21:56 +02:00
dbus-shared.c Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
dbus-shared.h dbus: split dbus-util into dbus-shared 2009-03-30 20:56:55 +03:00
dbus-util.c Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
dbus-util.h Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
dllmain.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
dynarray.c save some memory by increasing the dynamic array at a slower rate 2008-06-27 19:12:03 +02:00
dynarray.h some modernizations 2008-06-27 19:11:28 +02:00
endianmacros.h endian: fix LE/BE order for 24 bit accessor functions 2009-05-01 04:13:15 +02:00
envelope.c make gcc shut up 2009-02-04 17:17:48 +01:00
envelope.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
esound.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
fdsem.c use final glibc eventfd() instead of our homegrown syscall invocations 2008-08-19 23:18:20 +02:00
fdsem.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
flist.c rework the flist implementation to halve memory consumption by merging the state field and the pointer in the flist cells 2008-06-27 19:18:19 +02:00
flist.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
g711.c merge 'lennart' branch back into trunk. 2007-10-28 19:13:50 +00:00
g711.h fix comment 2007-05-22 23:08:34 +00:00
hashmap.c hashmap: implement pa_hashmap_last() 2009-06-17 03:02:34 +02:00
hashmap.h hashmap: implement pa_hashmap_last() 2009-06-17 03:02:34 +02:00
hook-list.c add pa_hook_is_firing 2009-03-21 01:18:48 +01:00
hook-list.h add pa_hook_is_firing 2009-03-21 01:18:48 +01:00
idxset.c idxset: implement pa_idxset_copy() 2009-06-17 03:01:40 +02:00
idxset.h idxset: implement pa_idxset_copy() 2009-06-17 03:01:40 +02:00
inet_ntop.c Optionally disable IPv6 2009-02-13 21:58:09 +01:00
inet_ntop.h big s/polyp/pulse/g 2006-06-19 21:53:48 +00:00
inet_pton.c Optionally disable IPv6 2009-02-13 21:58:09 +01:00
inet_pton.h big s/polyp/pulse/g 2006-06-19 21:53:48 +00:00
iochannel.c get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
iochannel.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
ioline.c ioline: add new calls pa_ioline_detach_iochannel() and pa_ioline_is_drained() 2009-04-29 04:14:52 +02:00
ioline.h ioline: add new calls pa_ioline_detach_iochannel() and pa_ioline_is_drained() 2009-04-29 04:14:52 +02:00
ipacl.c Optionally disable IPv6 2009-02-13 21:58:09 +01:00
ipacl.h headers: minor cleanups 2009-04-30 02:33:49 +02:00
llist.h llist: add PA_LLIST_FOREACH 2009-04-21 21:23:53 +02:00
lock-autospawn.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
lock-autospawn.h move autospawn lock to pulsecore/ since we don't need it in the client anymore 2008-09-08 17:22:27 +03:00
log.c pulse: move pa_rtclock_now in pulsecommon 2009-06-20 17:29:08 +03:00
log.h alsa: when printing warning about bogus data from alsa include snd_pcm_dump() 2009-04-10 01:58:39 +02:00
ltdl-helper.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
ltdl-helper.h modules: introduce PA_MODULE_DEPRECATED() macro for marking modules deprecated 2009-05-28 02:47:36 +02:00
macro.h macro: include string.h because we need it for memset 2009-05-14 01:23:12 +02:00
Makefile big s/polyp/pulse/g 2006-06-19 21:53:48 +00:00
mcalign.c get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
mcalign.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
memblock.c memtrap: hook up core to memtrap system 2009-04-21 22:56:08 +02:00
memblock.h Make the shared memory segment size configurable 2008-10-01 01:14:36 +02:00
memblockq.c Make sure we don't get stuck when prebuf is too high 2009-04-06 22:13:41 +02:00
memblockq.h properly account for seeks in the requested_bytes counter 2009-04-01 23:05:09 +02:00
memchunk.c get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
memchunk.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
memtrap.c When MAP_ANONYMOUS is missing, fallback to MAP_ANON. 2009-05-15 23:09:59 +02:00
memtrap.h memtrap,aupdate: split atomic update from memtrap into seperate aupdate framework 2009-04-22 19:10:09 +02:00
mime-type.c mime: drop additional whitespace from mime types 2009-05-11 19:56:13 +02:00
mime-type.h http: split out mime type handling calls 2009-04-29 23:22:08 +02:00
modargs.c modargs: introduce pa_modargs_get_proplist() 2009-05-27 23:18:17 +02:00
modargs.h modargs: introduce pa_modargs_get_proplist() 2009-05-27 23:18:17 +02:00
modinfo.c modules: introduce PA_MODULE_DEPRECATED() macro for marking modules deprecated 2009-05-28 02:47:36 +02:00
modinfo.h modules: introduce PA_MODULE_DEPRECATED() macro for marking modules deprecated 2009-05-28 02:47:36 +02:00
module.c modules: introduce PA_MODULE_DEPRECATED() macro for marking modules deprecated 2009-05-28 02:47:36 +02:00
module.h modules: introduce PA_MODULE_DEPRECATED() macro for marking modules deprecated 2009-05-28 02:47:36 +02:00
msgobject.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
msgobject.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
mutex-posix.c mutex: when we fail to fill in mutex into static mutex ptr free it again 2009-04-21 21:24:33 +02:00
mutex-win32.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
mutex.h mutex: add initializer for static mutexes 2009-04-21 21:25:01 +02:00
namereg.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
namereg.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
native-common.h native: implement command to change sink/source port 2009-06-17 04:52:41 +02:00
object.c object: revert to old unref() behaviour 2009-04-19 20:09:03 +02:00
object.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
once.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
once.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
packet.c get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
packet.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
parseaddr.c Add missing headers' include to build on FreeBSD 7.1. 2009-05-15 23:42:43 +02:00
parseaddr.h headers: minor cleanups 2009-04-30 02:33:49 +02:00
pdispatch.c Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
pdispatch.h Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
pid.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
pid.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
pipe.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
pipe.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
play-memblockq.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
play-memblockq.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
play-memchunk.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
play-memchunk.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
poll.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
poll.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
prioq.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
prioq.h fix compilation errors in priority queue code 2008-09-27 16:31:56 +02:00
proplist-util.c protocol-native,proplist-util: port to pa_get_{user|host}_name_malloc() 2009-04-29 01:56:02 +02:00
proplist-util.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
protocol-cli.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
protocol-cli.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
protocol-esound.c Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
protocol-esound.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
protocol-http.c http: fix segfault on connection termination 2009-05-12 17:08:34 +02:00
protocol-http.h http: export information about currently active server strings 2009-04-30 01:35:18 +02:00
protocol-native.c Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
protocol-native.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
protocol-simple.c simple-protocol: don't hit an assert when we call connection_unlink() early 2009-04-29 04:13:07 +02:00
protocol-simple.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
pstream-util.c get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
pstream-util.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
pstream.c pstream: fix s/recieve/receive/ typos 2009-06-17 03:17:23 +02:00
pstream.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
queue.c some modernizations 2008-06-27 19:15:32 +02:00
queue.h some modernizations 2008-06-27 19:15:32 +02:00
random.c some pa_bool_t'ization 2008-08-03 17:00:52 +02:00
random.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
ratelimit.c pulse: move pa_rtclock_now in pulsecommon 2009-06-20 17:29:08 +03:00
ratelimit.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
refcnt.h add simple ref counting debugging framework 2009-03-25 02:42:18 +01:00
resampler.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
resampler.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
rtpoll.c pulse: move pa_rtclock_now in pulsecommon 2009-06-20 17:29:08 +03:00
rtpoll.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
rtsig.c add a few more gcc warning flags and fix quite a few problems found by doing so 2008-08-19 22:39:54 +02:00
rtsig.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
sample-util.c sample: fix build on BE archs 2009-06-08 18:22:19 +02:00
sample-util.h channelmap: define a couple of standard channel masks 2009-06-17 03:08:34 +02:00
sconv-s16be.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
sconv-s16be.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
sconv-s16le.c sconv: fix a few minor conversion issues 2009-05-01 04:22:08 +02:00
sconv-s16le.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
sconv.c sconv: fix a few minor conversion issues 2009-05-01 04:22:08 +02:00
sconv.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
semaphore-posix.c semaphore: introduce static semaphores 2009-04-21 21:25:27 +02:00
semaphore-win32.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
semaphore.h semaphore: introduce static semaphores 2009-04-21 21:25:27 +02:00
shared.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
shared.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
shm.c shm: rework alignment when punching memory 2009-05-14 19:51:05 +02:00
shm.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
shmasyncq.c get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
shmasyncq.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
sink-input.c alsa: rework mixer logic 2009-06-17 03:45:14 +02:00
sink-input.h core: introduce new 'reference' volume for sinks 2009-04-13 22:56:25 +02:00
sink.c alsa,core: include mapping name in description strings 2009-06-18 04:38:59 +02:00
sink.h alsa: rework mixer logic 2009-06-17 03:45:14 +02:00
sioman.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
sioman.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
sndfile-util.c sndfile: big rework of libsndfile interfacing code 2009-05-26 00:05:28 +02:00
sndfile-util.h sndfile: big rework of libsndfile interfacing code 2009-05-26 00:05:28 +02:00
socket-client.c Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
socket-client.h Base mainloop on pa_rtclock_now() 2009-06-20 17:29:31 +03:00
socket-server.c socket-server: memory leak, free machine id after use 2009-04-10 01:15:26 +02:00
socket-server.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
socket-util.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
socket-util.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
sound-file-stream.c sndfile: big rework of libsndfile interfacing code 2009-05-26 00:05:28 +02:00
sound-file-stream.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
sound-file.c sndfile: big rework of libsndfile interfacing code 2009-05-26 00:05:28 +02:00
sound-file.h sndfile: big rework of libsndfile interfacing code 2009-05-26 00:05:28 +02:00
source-output.c core: when applying delay memblockq take monitored sink latency into account 2009-04-14 01:04:17 +02:00
source-output.h add suspend_within_thread() callbacks to pa_sink_input/pa_source_output 2009-04-07 00:46:20 +02:00
source.c core: be a bit more verbose when registering a sink/source fails 2009-06-18 03:40:47 +02:00
source.h alsa: rework mixer logic 2009-06-17 03:45:14 +02:00
start-child.c simplify pa_start_child_for_read by using pa_close_all()/pa_reset_sigs()/pa_unblock_sigs() 2008-08-19 22:49:14 +02:00
start-child.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
strbuf.c strbuf: add new call pa_strbuf_putc() 2009-04-29 01:46:51 +02:00
strbuf.h strbuf: add new call pa_strbuf_putc() 2009-04-29 01:46:51 +02:00
strlist.c strlist: add new calls pa_strlist_{next|data}() 2009-04-30 01:33:56 +02:00
strlist.h strlist: add new calls pa_strlist_{next|data}() 2009-04-30 01:33:56 +02:00
tagstruct.c Add APIs to pass pa_volume_t fields in a tagstruct 2008-12-24 00:46:02 +01:00
tagstruct.h document that I am a retard 2009-01-20 00:49:45 +01:00
thread-mq.c get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
thread-mq.h get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
thread-posix.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
thread-win32.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
thread.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
time-smoother.c enable debugging output based on if DEBUG_DATA macro is set 2009-04-07 00:41:45 +02:00
time-smoother.h Modify smoothing code to make cubic interpolation optional and allow 'quick fixups' on resuming 2009-04-05 02:26:02 +02:00
tokenizer.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
tokenizer.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
vector.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
winsock.h merge 'lennart' branch back into trunk. 2007-10-28 19:13:50 +00:00
x11prop.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
x11prop.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
x11wrap.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
x11wrap.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00