+#endif
+ return 0;
+}
+
+int zebra_mutex_cond_init (Zebra_mutex_cond *p)
+{
+#if YAZ_POSIX_THREADS
+ pthread_cond_init (&p->cond, 0);
+ pthread_mutex_init (&p->mutex, 0);
+#endif
+ return 0;
+}
+
+int zebra_mutex_cond_destroy (Zebra_mutex_cond *p)
+{
+#if YAZ_POSIX_THREADS
+ pthread_cond_destroy (&p->cond);
+ pthread_mutex_destroy (&p->mutex);
+#endif
+ return 0;
+}
+
+int zebra_mutex_cond_lock (Zebra_mutex_cond *p)
+{
+#if YAZ_POSIX_THREADS
+ return pthread_mutex_lock (&p->mutex);
+#else
+ return 0;
+#endif
+}
+
+int zebra_mutex_cond_unlock (Zebra_mutex_cond *p)
+{
+#if YAZ_POSIX_THREADS
+ return pthread_mutex_unlock (&p->mutex);
+#else
+ return 0;
+#endif
+}
+
+int zebra_mutex_cond_wait (Zebra_mutex_cond *p)
+{
+#if YAZ_POSIX_THREADS
+ return pthread_cond_wait (&p->cond, &p->mutex);
+#else
+ return 0;
+#endif
+}
+
+int zebra_mutex_cond_signal (Zebra_mutex_cond *p)
+{
+#if YAZ_POSIX_THREADS
+ return pthread_cond_signal (&p->cond);
+#else