X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=include%2Fvlc_threads.h;h=89e8ccc48843168759f65adebe6f490196130501;hb=d60188f5d3fd839757214cdbf8f4446d2f931ac8;hp=a8980a2ba6a2822653dffe92571105f939946c74;hpb=9e946839014e5613b4ede8cf09568e4ccbf03c02;p=vlc diff --git a/include/vlc_threads.h b/include/vlc_threads.h index a8980a2ba6..89e8ccc488 100644 --- a/include/vlc_threads.h +++ b/include/vlc_threads.h @@ -25,10 +25,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#if !defined( __LIBVLC__ ) - #error You are not libvlc or one of its plugins. You cannot include this file -#endif - #ifndef _VLC_THREADS_H_ #define _VLC_THREADS_H_ @@ -47,6 +43,7 @@ # define LIBVLC_USE_PTHREAD 1 # define _APPLE_C_SOURCE 1 /* Proper pthread semantics on OSX */ +# include /* lldiv_t definition (only in C99) */ # include /* _POSIX_SPIN_LOCKS */ # include /* Needed for pthread_cond_timedwait */ @@ -61,12 +58,12 @@ /* Thread priorities */ #ifdef __APPLE__ -# define VLC_THREAD_PRIORITY_LOW (-47) -# define VLC_THREAD_PRIORITY_INPUT 37 -# define VLC_THREAD_PRIORITY_AUDIO 37 -# define VLC_THREAD_PRIORITY_VIDEO (-47) -# define VLC_THREAD_PRIORITY_OUTPUT 37 -# define VLC_THREAD_PRIORITY_HIGHEST 37 +# 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 #elif defined(SYS_BEOS) # define VLC_THREAD_PRIORITY_LOW 5 @@ -77,12 +74,12 @@ # define VLC_THREAD_PRIORITY_HIGHEST 15 #elif defined(LIBVLC_USE_PTHREAD) -# define VLC_THREAD_PRIORITY_LOW 0 -# define VLC_THREAD_PRIORITY_INPUT 20 -# define VLC_THREAD_PRIORITY_AUDIO 10 -# define VLC_THREAD_PRIORITY_VIDEO 0 -# define VLC_THREAD_PRIORITY_OUTPUT 30 -# define VLC_THREAD_PRIORITY_HIGHEST 40 +# define VLC_THREAD_PRIORITY_LOW 0 +# define VLC_THREAD_PRIORITY_INPUT 10 +# define VLC_THREAD_PRIORITY_AUDIO 5 +# define VLC_THREAD_PRIORITY_VIDEO 0 +# define VLC_THREAD_PRIORITY_OUTPUT 15 +# define VLC_THREAD_PRIORITY_HIGHEST 20 #elif defined(WIN32) || defined(UNDER_CE) /* Define different priorities for WinNT/2K/XP and Win9x/Me */ @@ -183,9 +180,9 @@ VLC_EXPORT( void, __vlc_thread_join, ( vlc_object_t *, const char *, int ) ); #define vlc_mutex_lock( P_MUTEX ) \ __vlc_mutex_lock( __FILE__, __LINE__, P_MUTEX ) -#if defined(LIBVLC_USE_PTHREAD) VLC_EXPORT(void, vlc_pthread_fatal, (const char *action, int error, const char *file, unsigned line)); +#if defined(LIBVLC_USE_PTHREAD) # define VLC_THREAD_ASSERT( action ) \ if (val) \ vlc_pthread_fatal (action, val, psz_file, i_line)