[vlc-devel] [PATCH v2] thread: use posix thread code for darwin
Steve Lhomme
robux4 at ycbcr.xyz
Thu Apr 2 07:50:19 CEST 2020
On 2020-04-02 7:48, Steve Lhomme wrote:
> On 2020-04-01 21:29, Marvin Scholz wrote:
>> ---
>> include/vlc_threads.h | 25 ----
>> src/Makefile.am | 10 +-
>> src/darwin/thread.c | 319 ------------------------------------------
>> 3 files changed, 5 insertions(+), 349 deletions(-)
>> delete mode 100644 src/darwin/thread.c
>>
>> diff --git a/include/vlc_threads.h b/include/vlc_threads.h
>> index 131e319622..f2a0f7a2a2 100644
>> --- a/include/vlc_threads.h
>> +++ b/include/vlc_threads.h
>> @@ -174,31 +174,6 @@ static inline int vlc_poll (struct pollfd *fds,
>> unsigned nfds, int timeout)
>> # define poll(u,n,t) vlc_poll(u, n, t)
>> -#elif defined (__APPLE__)
>> -# define _APPLE_C_SOURCE 1 /* Proper pthread semantics on OSX */
>> -# include <unistd.h>
>> -# include <pthread.h>
>> -/* Unnamed POSIX semaphores not supported on Mac OS X */
>> -# include <mach/semaphore.h>
>> -# include <mach/task.h>
>> -# define LIBVLC_USE_PTHREAD_CLEANUP 1
>> -
>> -typedef pthread_t vlc_thread_t;
>> -#define VLC_THREAD_CANCELED PTHREAD_CANCELED
>> -typedef pthread_rwlock_t vlc_rwlock_t;
>> -#define VLC_STATIC_RWLOCK PTHREAD_RWLOCK_INITIALIZER
>> -typedef pthread_once_t vlc_once_t;
>> -#define VLC_STATIC_ONCE PTHREAD_ONCE_INIT
>> -typedef pthread_key_t vlc_threadvar_t;
>> -typedef struct vlc_timer *vlc_timer_t;
>> -
>> -# define VLC_THREAD_PRIORITY_LOW 0
>> -# define VLC_THREAD_PRIORITY_INPUT 22
>> -# define VLC_THREAD_PRIORITY_AUDIO 22
>> -# define VLC_THREAD_PRIORITY_VIDEO 0
>> -# define VLC_THREAD_PRIORITY_OUTPUT 22
>> -# define VLC_THREAD_PRIORITY_HIGHEST 22
>
> Moving these to 0 might have a detrimental effect. But I don't know how
> to verify this.
Forget this. The values are not 0 for POSIX. That's for Android.
More information about the vlc-devel
mailing list