2013-11-17 15:42:57 +00:00
|
|
|
#ifndef MP_OSDEP_THREADS_H_
|
|
|
|
#define MP_OSDEP_THREADS_H_
|
|
|
|
|
2023-10-22 00:43:15 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2023-10-21 18:37:18 +00: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) \
|
2023-11-06 03:55:36 +00:00
|
|
|
mp_mutex_init_type_internal(mutex, mtype)
|
2023-10-21 18:37:18 +00:00
|
|
|
|
2023-10-22 00:43:15 +00:00
|
|
|
#if HAVE_WIN32_THREADS
|
|
|
|
#include "threads-win32.h"
|
|
|
|
#else
|
2023-10-21 18:37:18 +00:00
|
|
|
#include "threads-posix.h"
|
2023-10-22 00:43:15 +00:00
|
|
|
#endif
|
2023-10-21 18:37:18 +00:00
|
|
|
|
2013-11-17 15:42:57 +00:00
|
|
|
#endif
|