Changeset 3:e4ca2e057cec in xplcommon for src/xplcommon/win32/Thread.h
- Timestamp:
- 12/27/12 13:01:22 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/xplcommon/win32/Thread.h
r1 r3 28 28 // either expressed or implied, of the FreeBSD Project. 29 29 30 #ifndef XPLCOMMON_WIN32THREAD_H 31 #define XPLCOMMON_WIN32THREAD_H 32 //------------------------------------------------------------------------------ 33 34 #include "config.h" 35 36 #ifdef HAVE_WINDOWS_H 30 #ifndef XPLCOMMON_WIN32_THREAD_H 31 #define XPLCOMMON_WIN32_THREAD_H 37 32 //------------------------------------------------------------------------------ 38 33 … … 41 36 //------------------------------------------------------------------------------ 42 37 43 namespace xplcommon { 38 namespace xplcommon { namespace win32 { 44 39 45 40 //------------------------------------------------------------------------------ … … 48 43 * A Win32 API thread implementation. 49 44 */ 50 class Win32Thread45 class Thread 51 46 { 52 47 private: … … 65 60 * Virtual destructor. 66 61 */ 67 virtual ~ Win32Thread();62 virtual ~Thread(); 68 63 69 64 /** … … 86 81 87 82 //------------------------------------------------------------------------------ 88 89 /// Common type for OS-independent code90 typedef Win32Thread Thread;91 92 //------------------------------------------------------------------------------93 83 // Inline definitions 94 84 //------------------------------------------------------------------------------ 95 85 96 inline Win32Thread::~Win32Thread()86 inline Thread::~Thread() 97 87 { 98 88 } … … 100 90 //------------------------------------------------------------------------------ 101 91 102 inline bool Win32Thread::start()92 inline bool Thread::start() 103 93 { 104 94 handle = CreateThread(0, 0, &threadFn, this, 0, 0); … … 108 98 //------------------------------------------------------------------------------ 109 99 110 inline void Win32Thread::join()100 inline void Thread::join() 111 101 { 112 102 WaitForSingleObject(handle, INFINITE); … … 115 105 //------------------------------------------------------------------------------ 116 106 117 } /* namespace xplcommon */107 } /* namespace xplcommon::win32 */ } /* namespace xplcommon */ 118 108 119 109 //------------------------------------------------------------------------------ 120 #endif // HAVE_PTHREAD_H 121 122 #endif // XPLCOMMON_POSIXTHREAD_H 110 #endif // XPLCOMMON_WIN32_THREAD_H 123 111 124 112 // Local Variables:
Note:
See TracChangeset
for help on using the changeset viewer.