#if HAVE_PTHREAD_H
pthread_mutex_init (&p->mutex, 0);
#endif
+#ifdef WIN32
+ InitializeCriticalSection (&p->mutex);
+#endif
return 0;
}
#if HAVE_PTHREAD_H
pthread_mutex_destroy (&p->mutex);
#endif
+#ifdef WIN32
+ DeleteCriticalSection (&p->mutex);
+#endif
return 0;
}
#if HAVE_PTHREAD_H
pthread_mutex_lock (&p->mutex);
#endif
+#ifdef WIN32
+ EnterCriticalSection (&p->mutex);
+#endif
return 0;
}
#if HAVE_PTHREAD_H
pthread_mutex_unlock (&p->mutex);
#endif
+#ifdef WIN32
+ LeaveCriticalSection (&p->mutex);
+#endif
return 0;
}