issue#11: cds: changed __CDS_ guard prefix to CDSLIB_ for all .h files
[libcds.git] / cds / os / thread.h
1 //$$CDS-header$$
2
3 #ifndef CDSLIB_OS_THREAD_H
4 #define CDSLIB_OS_THREAD_H
5
6 #include <thread>
7 #include <cds/details/defs.h>
8
9 #if CDS_OS_TYPE == CDS_OS_WIN32 || CDS_OS_TYPE == CDS_OS_WIN64 || CDS_OS_TYPE == CDS_OS_MINGW
10 #    include <cds/os/win/thread.h>
11 #else
12 #    include <cds/os/posix/thread.h>
13 #endif
14
15 namespace cds { namespace OS {
16
17     /// Default backoff::yield implementation
18     static inline void    backoff()
19     {
20         std::this_thread::yield();
21     }
22 }} // namespace cds::OS
23
24 #endif    // #ifndef CDSLIB_OS_THREAD_H