[vlc-commits] posix: do not define LIBVLC_USE_PTHREAD on Apple
Rémi Denis-Courmont
git at videolan.org
Sun Oct 21 13:01:22 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 20 22:06:22 2018 +0300| [13587c17fd00121c76f6ffa5a490ea32079930bc] | committer: Rémi Denis-Courmont
posix: do not define LIBVLC_USE_PTHREAD on Apple
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=13587c17fd00121c76f6ffa5a490ea32079930bc
---
include/vlc_threads.h | 1 -
src/libvlc-module.c | 2 +-
src/libvlc.h | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index a6df2611d6..04e8941afb 100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -218,7 +218,6 @@ static inline int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
/* Unnamed POSIX semaphores not supported on Mac OS X */
# include <mach/semaphore.h>
# include <mach/task.h>
-# define LIBVLC_USE_PTHREAD 1
# define LIBVLC_USE_PTHREAD_CLEANUP 1
typedef pthread_t vlc_thread_t;
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 68a04aec71..950c30d64d 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -2073,7 +2073,7 @@ vlc_module_begin ()
set_section( N_("Performance options"), NULL )
-#if defined (LIBVLC_USE_PTHREAD) && !defined (__APPLE__)
+#if defined (LIBVLC_USE_PTHREAD)
add_bool( "rt-priority", false, RT_PRIORITY_TEXT,
RT_PRIORITY_LONGTEXT, true )
add_integer( "rt-offset", 0, RT_OFFSET_TEXT,
diff --git a/src/libvlc.h b/src/libvlc.h
index 97faa1d4d8..cf95961cdd 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -58,7 +58,7 @@ void vlc_threads_setup (libvlc_int_t *);
void vlc_trace (const char *fn, const char *file, unsigned line);
#define vlc_backtrace() vlc_trace(__func__, __FILE__, __LINE__)
-#if (defined (LIBVLC_USE_PTHREAD) || defined(__ANDROID__)) && !defined (NDEBUG)
+#if (defined (LIBVLC_USE_PTHREAD) || defined(__ANDROID__) || defined (__APPLE__)) && !defined (NDEBUG)
void vlc_assert_locked (vlc_mutex_t *);
#else
# define vlc_assert_locked( m ) (void)m
More information about the vlc-commits
mailing list