2013-11-17 16:42:57 +01:00
|
|
|
#ifndef MP_OSDEP_THREADS_H_
|
|
|
|
#define MP_OSDEP_THREADS_H_
|
|
|
|
|
2023-10-22 02:43:15 +02:00
|
|
|
#include "config.h"
|
|
|
|
|
2023-10-21 20:37:18 +02:00
|
|
|
enum mp_mutex_type {
|
|
|
|
MP_MUTEX_NORMAL = 0,
|
|
|
|
MP_MUTEX_RECURSIVE,
|
|
|
|
};
|
|
|
|
|
|
|
|
#define mp_mutex_init(mutex) \
|
|
|
|
mp_mutex_init_type(mutex, MP_MUTEX_NORMAL)
|
|
|
|
|
|
|
|
#define mp_mutex_init_type(mutex, mtype) \
|
|
|
|
assert(!mp_mutex_init_type_internal(mutex, mtype))
|
|
|
|
|
2023-10-22 02:43:15 +02:00
|
|
|
#if HAVE_WIN32_THREADS
|
|
|
|
#include "threads-win32.h"
|
|
|
|
#else
|
2023-10-21 20:37:18 +02:00
|
|
|
#include "threads-posix.h"
|
2023-10-22 02:43:15 +02:00
|
|
|
#endif
|
2023-10-21 20:37:18 +02:00
|
|
|
|
2013-11-17 16:42:57 +01:00
|
|
|
#endif
|