Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / src / utils / SkCondVar.h
index 6f18e1a..7f4225c 100644 (file)
@@ -8,31 +8,29 @@
 #ifndef SkCondVar_DEFINED
 #define SkCondVar_DEFINED
 
-/**
- * Import any thread model setting from configuration files.
- */
 #include "SkTypes.h"
 
 #ifdef SK_USE_POSIX_THREADS
-#include <pthread.h>
+    #include <pthread.h>
 #elif defined(SK_BUILD_FOR_WIN32)
-#include <windows.h>
+    #include <windows.h>
 #else
-/**
- * Warn if the implementation of this class is empty, i.e. thread safety is not working.
- */
-#warning "Thread safety class SkCondVar has no implementation!"
+    #error "SkCondVar requires pthreads or Windows."
 #endif
 
 /**
  * Condition variable for blocking access to shared data from other threads and
  * controlling which threads are awake.
  *
- * Currently only supported on platforms with posix threads and Windows Vista and
- * above.
+ * Currently only supported on platforms with posix threads and Windows Vista and above.
  */
 class SkCondVar {
 public:
+    /** Returns true if it makes sense to create and use SkCondVars.
+     *  You _MUST_ call this method and it must return true before creating any SkCondVars.
+     */
+    static bool Supported();
+
     SkCondVar();
     ~SkCondVar();