diff options
author | torben <torben@0c269be4-1314-0410-8aa9-9f06e86f4224> | 2011-05-29 00:46:51 +0000 |
---|---|---|
committer | torben <torben@0c269be4-1314-0410-8aa9-9f06e86f4224> | 2011-05-29 00:46:51 +0000 |
commit | 0cdc3916cd3af5260d95fb07d3143b7de26894da (patch) | |
tree | 138a172c9da84958cba5e607f529d4d5428965d5 /config | |
parent | a16492b6896fe7799a048e62011c31235ba0a3bf (diff) | |
download | jack1-0cdc3916cd3af5260d95fb07d3143b7de26894da.tar.gz |
fix broken jack_get_microseconds in drivers when libjackserver is RTLD_LOCAL
for python loading libjackserver and using controlAPI.
drivers are linked to a second instance of libjackserver.so and the
global symbol _jack_get_microseconds showed up uninitialised.
by providing a function pointer to right instance in the engine struct,
we can fix this problem. since _jack_get_microseconds is a in systemdeps,
we need a generic way to get the right function pointer.
git-svn-id: svn+ssh://jackaudio.org/trunk/jack@4421 0c269be4-1314-0410-8aa9-9f06e86f4224
Diffstat (limited to 'config')
-rw-r--r-- | config/os/generic/time.h | 6 | ||||
-rw-r--r-- | config/os/gnu-linux/time.h | 6 | ||||
-rw-r--r-- | config/os/macosx/time.c | 5 | ||||
-rw-r--r-- | config/os/macosx/time.h | 8 |
4 files changed, 25 insertions, 0 deletions
diff --git a/config/os/generic/time.h b/config/os/generic/time.h index 6e1760a..e57391c 100644 --- a/config/os/generic/time.h +++ b/config/os/generic/time.h @@ -30,4 +30,10 @@ jack_get_microseconds (void) { return jack_get_microseconds_from_system (); } +typedef jack_time_t (*jack_get_microseconds_t)(void); +static inline jack_get_microseconds_t jack_get_microseconds_pointer(void) +{ + return jack_get_microseconds_from_system; +} + #endif /* __jack_time_h__ */ diff --git a/config/os/gnu-linux/time.h b/config/os/gnu-linux/time.h index 10a2a8c..16e7e58 100644 --- a/config/os/gnu-linux/time.h +++ b/config/os/gnu-linux/time.h @@ -33,4 +33,10 @@ jack_get_microseconds (void) return _jack_get_microseconds (); } +typedef jack_time_t (*jack_get_microseconds_t)(void); +static inline jack_get_microseconds_t jack_get_microseconds_pointer(void) +{ + return _jack_get_microseconds; +} + #endif /* __jack_time_h__ */ diff --git a/config/os/macosx/time.c b/config/os/macosx/time.c index 4c8ebb5..2249121 100644 --- a/config/os/macosx/time.c +++ b/config/os/macosx/time.c @@ -38,4 +38,9 @@ void jack_set_clock_source (jack_timer_type_t clocksrc) /* only one clock source for os x */ } +static jack_time_t +jack_get_microseconds_symbol(void) +{ + return (jack_time_t) mach_absolute_time () * __jack_time_ratio; +} #endif /* __jack_time_c__ */ diff --git a/config/os/macosx/time.h b/config/os/macosx/time.h index b384098..0a47f08 100644 --- a/config/os/macosx/time.h +++ b/config/os/macosx/time.h @@ -31,4 +31,12 @@ jack_get_microseconds(void) return (jack_time_t) mach_absolute_time () * __jack_time_ratio; } +extern jack_time_t jack_get_microseconds_symbol(void); + +typedef jack_time_t (*jack_get_microseconds_t)(void); +static inline jack_get_microseconds_t jack_get_microseconds_pointer(void) +{ + return jack_get_microseconds_symbol; +} + #endif /* __jack_time_h__ */ |