summaryrefslogtreecommitdiffstats
path: root/osdep/path-win.c
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-10-21 04:55:41 +0200
committerDudemanguy <random342@airmail.cc>2023-11-05 17:36:17 +0000
commit174df99ffa53f1091589eaa4fa0c16cdd55a9326 (patch)
tree3a60d45615f18beed98a9b08267c28ed7e05dd5f /osdep/path-win.c
parent3a8b107f6216b38a151d5ca1e9d4f2727e3418f5 (diff)
downloadmpv-174df99ffa53f1091589eaa4fa0c16cdd55a9326.tar.bz2
mpv-174df99ffa53f1091589eaa4fa0c16cdd55a9326.tar.xz
ALL: use new mp_thread abstraction
Diffstat (limited to 'osdep/path-win.c')
-rw-r--r--osdep/path-win.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/osdep/path-win.c b/osdep/path-win.c
index 844a502020..bddf5a5e19 100644
--- a/osdep/path-win.c
+++ b/osdep/path-win.c
@@ -18,15 +18,15 @@
#include <windows.h>
#include <shlobj.h>
#include <knownfolders.h>
-#include <pthread.h>
-#include "osdep/path.h"
-#include "osdep/io.h"
#include "options/path.h"
+#include "osdep/io.h"
+#include "osdep/path.h"
+#include "osdep/threads.h"
// Warning: do not use PATH_MAX. Cygwin messed it up.
-static pthread_once_t path_init_once = PTHREAD_ONCE_INIT;
+static mp_once path_init_once = MP_STATIC_ONCE_INITIALIZER;
static char *portable_path;
@@ -88,7 +88,7 @@ static void path_init(void)
const char *mp_get_platform_path_win(void *talloc_ctx, const char *type)
{
- pthread_once(&path_init_once, path_init);
+ mp_exec_once(&path_init_once, path_init);
if (portable_path) {
if (strcmp(type, "home") == 0)
return portable_path;