Move libcds 1.6.0 from SVN
[libcds.git] / cds / user_setup / threading.h
diff --git a/cds/user_setup/threading.h b/cds/user_setup/threading.h
new file mode 100644 (file)
index 0000000..b6bca44
--- /dev/null
@@ -0,0 +1,24 @@
+//$$CDS-header$$
+
+#ifndef __CDS_USER_SETUP_THREADING_MODEL_H
+#define __CDS_USER_SETUP_THREADING_MODEL_H
+
+/**
+    CDS threading model
+
+    CDS_THREADING_AUTODETECT - auto-detect appropriate threading model (default)
+
+    CDS_THREADING_MSVC - use MS Visual C++ declspec( thread ) declaration to mantain thread-specific data
+
+    CDS_THREADING_WIN_TLS - use Windows TLS API to mantain thread-specific data
+
+    CDS_THREADING_GCC - use GCC __thread keyword to mantain thread-specific data
+
+    CDS_THREADING_PTHREAD - use cds::Threading::Manager implementation based on pthread thread-specific
+    data functions pthread_getspecific/pthread_setspecific
+
+    CDS_THREADING_USER_DEFINED - use user-defined threading model
+*/
+#define CDS_THREADING_AUTODETECT
+
+#endif    // #ifndef __CDS_USER_SETUP_THREADING_MODEL_H