comparison dvdnav_internal.h @ 402:3776e1559236 src

Fix pthread_mutex_destroy macro for Win32 Win32 has a DestroyCriticalSection call that is the equivalent to pthread_mutex_destroy. The macro for the Win32 port should have this. The VLC project fixed the Win32 macro for pthread_mutex_destroy about 3 years ago. So this is a well tested patch according to them. Thanks goes to Jean-Baptiste for submitting this patch to the dvdnav-discuss list. Patch by Jean-Baptiste Kempf /jb*videolan#org\
author erik
date Thu, 27 May 2010 15:26:27 +0000
parents 0a5a6f03b029
children 0d2d897a6558
comparison
equal deleted inserted replaced
401:390fbf2a9602 402:3776e1559236
32 #include <process.h> 32 #include <process.h>
33 typedef CRITICAL_SECTION pthread_mutex_t; 33 typedef CRITICAL_SECTION pthread_mutex_t;
34 #define pthread_mutex_init(a, b) InitializeCriticalSection(a) 34 #define pthread_mutex_init(a, b) InitializeCriticalSection(a)
35 #define pthread_mutex_lock(a) EnterCriticalSection(a) 35 #define pthread_mutex_lock(a) EnterCriticalSection(a)
36 #define pthread_mutex_unlock(a) LeaveCriticalSection(a) 36 #define pthread_mutex_unlock(a) LeaveCriticalSection(a)
37 #define pthread_mutex_destroy(a) 37 #define pthread_mutex_destroy(a) DeleteCriticalSection(a)
38 38
39 #ifndef HAVE_GETTIMEOFDAY 39 #ifndef HAVE_GETTIMEOFDAY
40 /* replacement gettimeofday implementation */ 40 /* replacement gettimeofday implementation */
41 #include <sys/timeb.h> 41 #include <sys/timeb.h>
42 static inline int _private_gettimeofday( struct timeval *tv, void *tz ) 42 static inline int _private_gettimeofday( struct timeval *tv, void *tz )