+
+ inline void
+ unlock() {
+ _mutex->unlock();
+ }
+
+ mutex_type *
+ mutex() const {
+ return _mutex;
+ }
+
+ protected:
+ mutex_type *_mutex;
+ };
+
+
+ /**
+ * Same interface as std::condition_variable
+ */
+ class condition_variable
+ {
+ private:
+#ifdef _WIN32
+# if USE_WIN32_CONDITION_VARIABLES
+ // XXX: Only supported on Vista an higher. Not yet supported by WINE.
+ typedef CONDITION_VARIABLE native_handle_type;
+ native_handle_type _native_handle;
+#else
+ // http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
+ LONG cWaiters;
+ HANDLE hEvent;
+#endif
+#else
+ typedef pthread_cond_t native_handle_type;
+ native_handle_type _native_handle;