From 9b5f666fc505ac09027227b54bb600f5d242f58c Mon Sep 17 00:00:00 2001 From: "William E. Kempf" Date: Thu, 18 Oct 2001 19:56:32 +0000 Subject: [PATCH] Removed tabs and trailing white space. [SVN r11403] --- include/boost/thread/condition.hpp | 14 ++-- include/boost/thread/config.hpp | 2 +- include/boost/thread/detail/lock.hpp | 36 ++++----- include/boost/thread/mutex.hpp | 24 +++--- include/boost/thread/once.hpp | 4 +- include/boost/thread/recursive_mutex.hpp | 26 +++---- include/boost/thread/semaphore.hpp | 8 +- include/boost/thread/thread.hpp | 4 +- include/boost/thread/tss.hpp | 4 +- include/boost/thread/xtime.hpp | 2 +- src/_atomic.cpp | 94 ++++++++++++------------ src/condition.cpp | 38 +++++----- src/mutex.cpp | 4 +- src/once.cpp | 22 +++--- src/recursive_mutex.cpp | 10 +-- src/semaphore.cpp | 8 +- src/thread.cpp | 6 +- src/threadmon.cpp | 14 ++-- src/threadmon.hpp | 4 +- src/timeconv.inl | 4 +- src/tss.cpp | 6 +- src/xtime.cpp | 4 +- 22 files changed, 169 insertions(+), 169 deletions(-) diff --git a/include/boost/thread/condition.hpp b/include/boost/thread/condition.hpp index d90ffa4b..f88c18bb 100644 --- a/include/boost/thread/condition.hpp +++ b/include/boost/thread/condition.hpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #ifndef BOOST_CONDITION_WEK070601_HPP @@ -14,7 +14,7 @@ #include #ifndef BOOST_HAS_THREADS -# error Thread support is unavailable! +# error Thread support is unavailable! #endif #include @@ -33,7 +33,7 @@ class condition : private noncopyable public: condition(); ~condition(); - + void notify_one(); void notify_all(); @@ -42,7 +42,7 @@ public: { if (!lock) throw lock_error(); - + do_wait(lock.m_mutex); } @@ -51,7 +51,7 @@ public: { if (!lock) throw lock_error(); - + while (!pred()) do_wait(lock.m_mutex); } @@ -61,7 +61,7 @@ public: { if (!lock) throw lock_error(); - + return do_timed_wait(lock.m_mutex, xt); } @@ -70,7 +70,7 @@ public: { if (!lock) throw lock_error(); - + while (!pred()) { if (!do_timed_wait(lock.m_mutex, xt)) diff --git a/include/boost/thread/config.hpp b/include/boost/thread/config.hpp index b8cd68c0..0b67eb43 100644 --- a/include/boost/thread/config.hpp +++ b/include/boost/thread/config.hpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. // This file is used to configure Boost.Threads during development diff --git a/include/boost/thread/detail/lock.hpp b/include/boost/thread/detail/lock.hpp index b4a81762..d74fe87b 100644 --- a/include/boost/thread/detail/lock.hpp +++ b/include/boost/thread/detail/lock.hpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #ifndef BOOST_XLOCK_WEK070601_HPP @@ -27,7 +27,7 @@ struct xtime; { public: typedef Mutex mutex_type; - + explicit scoped_lock(Mutex& mx, bool initially_locked=true) : m_mutex(mx), m_locked(false) { @@ -37,7 +37,7 @@ struct xtime; { if (m_locked) unlock(); } - + void lock() { if (m_locked) throw lock_error(); @@ -51,12 +51,12 @@ struct xtime; m_locked = false; } - bool locked() const { return m_locked; } + bool locked() const { return m_locked; } operator const void*() const { return m_locked ? this : 0; } - + private: friend class boost::condition; - + Mutex& m_mutex; bool m_locked; }; @@ -66,7 +66,7 @@ struct xtime; { public: typedef TryMutex mutex_type; - + explicit scoped_try_lock(TryMutex& mx) : m_mutex(mx), m_locked(false) { @@ -81,7 +81,7 @@ struct xtime; { if (m_locked) unlock(); } - + void lock() { if (m_locked) throw lock_error(); @@ -99,13 +99,13 @@ struct xtime; m_mutex.do_unlock(); m_locked = false; } - - bool locked() const { return m_locked; } + + bool locked() const { return m_locked; } operator const void*() const { return m_locked ? this : 0; } - + private: friend class boost::condition; - + TryMutex& m_mutex; bool m_locked; }; @@ -115,7 +115,7 @@ struct xtime; { public: typedef TimedMutex mutex_type; - + scoped_timed_lock(TimedMutex& mx, const xtime& xt) : m_mutex(mx), m_locked(false) { @@ -130,7 +130,7 @@ struct xtime; { if (m_locked) unlock(); } - + void lock() { if (m_locked) throw lock_error(); @@ -148,13 +148,13 @@ struct xtime; m_mutex.do_unlock(); m_locked = false; } - - bool locked() const { return m_locked; } + + bool locked() const { return m_locked; } operator const void*() const { return m_locked ? this : 0; } - + private: friend class boost::condition; - + TimedMutex& m_mutex; bool m_locked; }; diff --git a/include/boost/thread/mutex.hpp b/include/boost/thread/mutex.hpp index 4e091797..da1146cf 100644 --- a/include/boost/thread/mutex.hpp +++ b/include/boost/thread/mutex.hpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #ifndef BOOST_MUTEX_WEK070601_HPP @@ -14,7 +14,7 @@ #include #ifndef BOOST_HAS_THREADS -# error Thread support is unavailable! +# error Thread support is unavailable! #endif #include @@ -34,12 +34,12 @@ class mutex : private noncopyable public: friend class detail::thread::scoped_lock; friend class condition; - + typedef detail::thread::scoped_lock scoped_lock; - + mutex(); ~mutex(); - + private: #if defined(BOOST_HAS_WINTHREADS) typedef void* cv_state; @@ -67,13 +67,13 @@ public: friend class detail::thread::scoped_lock; friend class detail::thread::scoped_try_lock; friend class condition; - + typedef detail::thread::scoped_lock scoped_lock; typedef detail::thread::scoped_try_lock scoped_try_lock; - + try_mutex(); ~try_mutex(); - + private: #if defined(BOOST_HAS_WINTHREADS) typedef void* cv_state; @@ -103,14 +103,14 @@ public: friend class detail::thread::scoped_try_lock; friend class detail::thread::scoped_timed_lock; friend class condition; - + typedef detail::thread::scoped_lock scoped_lock; typedef detail::thread::scoped_try_lock scoped_try_lock; typedef detail::thread::scoped_timed_lock scoped_timed_lock; - + timed_mutex(); ~timed_mutex(); - + private: #if defined(BOOST_HAS_WINTHREADS) typedef void* cv_state; @@ -126,7 +126,7 @@ private: void do_unlock(); void do_lock(cv_state& state); void do_unlock(cv_state& state); - + #if defined(BOOST_HAS_WINTHREADS) unsigned long m_mutex; #elif defined(BOOST_HAS_PTHREADS) diff --git a/include/boost/thread/once.hpp b/include/boost/thread/once.hpp index 7dd553ff..a6451902 100644 --- a/include/boost/thread/once.hpp +++ b/include/boost/thread/once.hpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #ifndef BOOST_ONCE_WEK080101_HPP @@ -14,7 +14,7 @@ #include #ifndef BOOST_HAS_THREADS -# error Thread support is unavailable! +# error Thread support is unavailable! #endif #if defined(BOOST_HAS_PTHREADS) diff --git a/include/boost/thread/recursive_mutex.hpp b/include/boost/thread/recursive_mutex.hpp index 5471bf00..b5680dbc 100644 --- a/include/boost/thread/recursive_mutex.hpp +++ b/include/boost/thread/recursive_mutex.hpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #ifndef BOOST_RECURSIVE_MUTEX_WEK070601_HPP @@ -14,7 +14,7 @@ #include #ifndef BOOST_HAS_THREADS -# error Thread support is unavailable! +# error Thread support is unavailable! #endif #include @@ -34,12 +34,12 @@ class recursive_mutex : private noncopyable public: friend class detail::thread::scoped_lock; friend class condition; - + typedef detail::thread::scoped_lock scoped_lock; - + recursive_mutex(); ~recursive_mutex(); - + private: #if defined(BOOST_HAS_WINTHREADS) typedef std::size_t cv_state; @@ -75,13 +75,13 @@ public: friend class detail::thread::scoped_lock; friend class detail::thread::scoped_try_lock; friend class condition; - + typedef detail::thread::scoped_lock scoped_lock; typedef detail::thread::scoped_try_lock scoped_try_lock; - + recursive_try_mutex(); ~recursive_try_mutex(); - + private: #if defined(BOOST_HAS_WINTHREADS) typedef std::size_t cv_state; @@ -97,7 +97,7 @@ private: void do_unlock(); void do_lock(cv_state& state); void do_unlock(cv_state& state); - + #if defined(BOOST_HAS_WINTHREADS) unsigned long m_mutex; unsigned long m_count; @@ -119,14 +119,14 @@ public: friend class detail::thread::scoped_try_lock; friend class detail::thread::scoped_timed_lock; friend class condition; - + typedef detail::thread::scoped_lock scoped_lock; typedef detail::thread::scoped_try_lock scoped_try_lock; typedef detail::thread::scoped_timed_lock scoped_timed_lock; - + recursive_timed_mutex(); ~recursive_timed_mutex(); - + private: #if defined(BOOST_HAS_WINTHREADS) typedef std::size_t cv_state; @@ -143,7 +143,7 @@ private: void do_unlock(); void do_lock(cv_state& state); void do_unlock(cv_state& state); - + #if defined(BOOST_HAS_WINTHREADS) unsigned long m_mutex; unsigned long m_count; diff --git a/include/boost/thread/semaphore.hpp b/include/boost/thread/semaphore.hpp index 05111719..32d78383 100644 --- a/include/boost/thread/semaphore.hpp +++ b/include/boost/thread/semaphore.hpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #ifndef BOOST_SEMAPHORE_WEK070601_HPP @@ -14,7 +14,7 @@ #include #ifndef BOOST_HAS_THREADS -# error Thread support is unavailable! +# error Thread support is unavailable! #endif #include @@ -32,11 +32,11 @@ class semaphore : private noncopyable public: explicit semaphore(unsigned count=0, unsigned max=0); ~semaphore(); - + bool up(unsigned count=1, unsigned* prev=0); void down(); bool down(const xtime& xt); - + private: #if defined(BOOST_HAS_WINTHREADS) unsigned long m_sema; diff --git a/include/boost/thread/thread.hpp b/include/boost/thread/thread.hpp index 5fc881dd..57f49ace 100644 --- a/include/boost/thread/thread.hpp +++ b/include/boost/thread/thread.hpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #ifndef BOOST_THREAD_WEK070601_HPP @@ -14,7 +14,7 @@ #include #ifndef BOOST_HAS_THREADS -# error Thread support is unavailable! +# error Thread support is unavailable! #endif #include diff --git a/include/boost/thread/tss.hpp b/include/boost/thread/tss.hpp index 07bdfa66..d573daa9 100644 --- a/include/boost/thread/tss.hpp +++ b/include/boost/thread/tss.hpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #ifndef BOOST_TSS_WEK070601_HPP @@ -14,7 +14,7 @@ #include #ifndef BOOST_HAS_THREADS -# error Thread support is unavailable! +# error Thread support is unavailable! #endif #include diff --git a/include/boost/thread/xtime.hpp b/include/boost/thread/xtime.hpp index 4e10fd7d..e5d84d36 100644 --- a/include/boost/thread/xtime.hpp +++ b/include/boost/thread/xtime.hpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #ifndef BOOST_XTIME_WEK070601_HPP diff --git a/src/_atomic.cpp b/src/_atomic.cpp index 8a56faf1..4295eacd 100644 --- a/src/_atomic.cpp +++ b/src/_atomic.cpp @@ -8,13 +8,13 @@ * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. William E. Kempf makes no representations - * about the suitability of this software for any purpose. + * about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * Revision History (excluding minor changes for specific compilers) * 8 Feb 01 Initial version. */ - + #include #if defined(BOOST_HAS_WINTHREADS) @@ -22,59 +22,59 @@ #endif namespace boost { - atomic_t::value_type read(const atomic_t& x) - { - return x._value; - } + atomic_t::value_type read(const atomic_t& x) + { + return x._value; + } #if defined(BOOST_HAS_WINTHREADS) - atomic_t::value_type increment(atomic_t& x) - { - return InterlockedIncrement(const_cast(&x._value)); - } + atomic_t::value_type increment(atomic_t& x) + { + return InterlockedIncrement(const_cast(&x._value)); + } - atomic_t::value_type decrement(atomic_t& x) - { - return InterlockedDecrement(const_cast(&x._value)); - } + atomic_t::value_type decrement(atomic_t& x) + { + return InterlockedDecrement(const_cast(&x._value)); + } - atomic_t::value_type swap(atomic_t& x, atomic_t::value_type y) - { - return InterlockedExchange(const_cast(&x._value), y); - } + atomic_t::value_type swap(atomic_t& x, atomic_t::value_type y) + { + return InterlockedExchange(const_cast(&x._value), y); + } - atomic_t::value_type compare_swap(atomic_t& x, atomic_t::value_type y, atomic_t::value_type z) - { - return InterlockedCompareExchange(const_cast(&x._value), y, z); - } + atomic_t::value_type compare_swap(atomic_t& x, atomic_t::value_type y, atomic_t::value_type z) + { + return InterlockedCompareExchange(const_cast(&x._value), y, z); + } #else - atomic_t::value_type increment(atomic_t& x) - { - mutex::lock lock(x._mutex); - return ++x._value; - } + atomic_t::value_type increment(atomic_t& x) + { + mutex::lock lock(x._mutex); + return ++x._value; + } - atomic_t::value_type decrement(atomic_t& x) - { - mutex::lock lock(x._mutex); - return --x._value; - } + atomic_t::value_type decrement(atomic_t& x) + { + mutex::lock lock(x._mutex); + return --x._value; + } - atomic_t::value_type swap(atomic_t& x, atomic_t::value_type y) - { - mutex::lock lock(x._mutex); - atomic_t::value_type temp = x._value; - x._value = y; - return temp; - } + atomic_t::value_type swap(atomic_t& x, atomic_t::value_type y) + { + mutex::lock lock(x._mutex); + atomic_t::value_type temp = x._value; + x._value = y; + return temp; + } - atomic_t::value_type compare_swap(atomic_t& x, atomic_t::value_type y, atomic_t::value_type z) - { - mutex::lock lock(x._mutex); - atomic_t::value_type temp = x._value; - if (temp == z) - x._value = y; - return temp; - } + atomic_t::value_type compare_swap(atomic_t& x, atomic_t::value_type y, atomic_t::value_type z) + { + mutex::lock lock(x._mutex); + atomic_t::value_type temp = x._value; + if (temp == z) + x._value = y; + return temp; + } #endif } // namespace boost diff --git a/src/condition.cpp b/src/condition.cpp index 8e987380..beac6fd7 100644 --- a/src/condition.cpp +++ b/src/condition.cpp @@ -6,12 +6,12 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #include #include -#include +#include #include #include #include @@ -37,21 +37,21 @@ condition::condition() if (!m_gate || !m_queue || !m_mutex) { int res = 0; - if (m_gate) - { - res = CloseHandle(reinterpret_cast(m_gate)); - assert(res); - } - if (m_queue) - { - res = CloseHandle(reinterpret_cast(m_queue)); - assert(res); - } - if (m_mutex) - { - res = CloseHandle(reinterpret_cast(m_mutex)); - assert(res); - } + if (m_gate) + { + res = CloseHandle(reinterpret_cast(m_gate)); + assert(res); + } + if (m_queue) + { + res = CloseHandle(reinterpret_cast(m_queue)); + assert(res); + } + if (m_mutex) + { + res = CloseHandle(reinterpret_cast(m_mutex)); + assert(res); + } throw thread_resource_error(); } @@ -185,7 +185,7 @@ void condition::do_wait() int res = 0; res = WaitForSingleObject(reinterpret_cast(m_queue), INFINITE); assert(res == WAIT_OBJECT_0); - + unsigned was_waiting=0; unsigned was_gone=0; @@ -245,7 +245,7 @@ bool condition::do_timed_wait(const xtime& xt) assert(res != WAIT_FAILED && res != WAIT_ABANDONED); bool ret = (res == WAIT_OBJECT_0); - + unsigned was_waiting=0; unsigned was_gone=0; diff --git a/src/mutex.cpp b/src/mutex.cpp index b82a1b84..78829c63 100644 --- a/src/mutex.cpp +++ b/src/mutex.cpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #include @@ -338,7 +338,7 @@ bool timed_mutex::do_timedlock(const xtime& xt) if (res == ETIMEDOUT) break; } - + bool ret = false; if (!m_locked) { diff --git a/src/once.cpp b/src/once.cpp index 898e6020..efe10de2 100644 --- a/src/once.cpp +++ b/src/once.cpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #include @@ -68,8 +68,8 @@ void call_once(void (*func)(), once_flag& flag) // Memory barrier would be needed here to prevent race conditions on some platforms with // partial ordering. - if (!tmp) - { + if (!tmp) + { #if defined(BOOST_NO_STRINGSTREAM) std::ostrstream strm; strm << "2AC1A572DB6944B0A65C38C4140AF2F4" << std::hex << GetCurrentProcessId() << &flag << std::ends; @@ -78,7 +78,7 @@ void call_once(void (*func)(), once_flag& flag) #else std::ostringstream strm; strm << "2AC1A572DB6944B0A65C38C4140AF2F4" << std::hex << GetCurrentProcessId() << &flag << std::ends; - HANDLE mutex = CreateMutex(NULL, FALSE, strm.str().c_str()); + HANDLE mutex = CreateMutex(NULL, FALSE, strm.str().c_str()); #endif assert(mutex != NULL); @@ -87,22 +87,22 @@ void call_once(void (*func)(), once_flag& flag) assert(res == WAIT_OBJECT_0); tmp = flag; - if (!tmp) - { - func(); + if (!tmp) + { + func(); tmp = true; // Memory barrier would be needed here to prevent race conditions on some platforms // with partial ordering. - flag = tmp; - } + flag = tmp; + } - res = ReleaseMutex(mutex); + res = ReleaseMutex(mutex); assert(res); res = CloseHandle(mutex); assert(res); - } + } #elif defined(BOOST_HAS_PTHREADS) pthread_once(&once, &key_init); pthread_setspecific(key, &func); diff --git a/src/recursive_mutex.cpp b/src/recursive_mutex.cpp index d9b5e891..c5088ac7 100644 --- a/src/recursive_mutex.cpp +++ b/src/recursive_mutex.cpp @@ -6,11 +6,11 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #include -#include +#include #include #include #include @@ -249,7 +249,7 @@ void recursive_timed_mutex::do_unlock(cv_state& state) { state = m_count; m_count = 0; - + int res = 0; res = ReleaseMutex(reinterpret_cast(m_mutex)); assert(res); @@ -610,7 +610,7 @@ recursive_timed_mutex::recursive_timed_mutex() res = pthread_mutex_init(&m_mutex, 0); if (res != 0) throw thread_resource_error(); - + res = pthread_cond_init(&m_unlocked, 0); if (res != 0) { @@ -706,7 +706,7 @@ bool recursive_timed_mutex::do_timedlock(const xtime& xt) break; assert(res == 0); } - + if (!m_valid_id) { m_thread_id = tid; diff --git a/src/semaphore.cpp b/src/semaphore.cpp index bbe34d2b..3f225d9c 100644 --- a/src/semaphore.cpp +++ b/src/semaphore.cpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #define NOMINMAX @@ -110,21 +110,21 @@ bool semaphore::up(unsigned count, unsigned* prev) if (prev) *prev = m_available; - + if (m_available + count > m_max) { res = pthread_mutex_unlock(&m_mutex); assert(res == 0); return false; } - + m_available += count; res = pthread_cond_broadcast(&m_condition); assert(res == 0); res = pthread_mutex_unlock(&m_mutex); - assert(res == 0); + assert(res == 0); return true; } diff --git a/src/thread.cpp b/src/thread.cpp index 44e3fcfb..fa987152 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #include @@ -163,8 +163,8 @@ void thread::sleep(const xtime& xt) timespec ts; to_timespec_duration(xt, ts); - // nanosleep takes a timespec that is an offset, not - // an absolute time. + // nanosleep takes a timespec that is an offset, not + // an absolute time. nanosleep(&ts, 0); # else semaphore sema; diff --git a/src/threadmon.cpp b/src/threadmon.cpp index 9d1abb26..ab6a5036 100644 --- a/src/threadmon.cpp +++ b/src/threadmon.cpp @@ -4,7 +4,7 @@ #define BOOST_THREADMON_EXPORTS #include "threadmon.hpp" -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include #ifdef BOOST_MSVC @@ -33,14 +33,14 @@ namespace BOOL APIENTRY DllMain(HANDLE module, DWORD reason, LPVOID) { switch (reason) - { - case DLL_PROCESS_ATTACH: + { + case DLL_PROCESS_ATTACH: InitializeCriticalSection(&cs); key = TlsAlloc(); break; - case DLL_THREAD_ATTACH: + case DLL_THREAD_ATTACH: break; - case DLL_THREAD_DETACH: + case DLL_THREAD_DETACH: { // Call the thread's exit handlers. exit_handlers* handlers = static_cast(TlsGetValue(key)); @@ -57,7 +57,7 @@ BOOL APIENTRY DllMain(HANDLE module, DWORD reason, LPVOID) } } break; - case DLL_PROCESS_DETACH: + case DLL_PROCESS_DETACH: { // Assume the main thread is ending (call its handlers) and all other threads // have already ended. If this DLL is loaded and unloaded dynamically at run time @@ -79,7 +79,7 @@ BOOL APIENTRY DllMain(HANDLE module, DWORD reason, LPVOID) DeleteCriticalSection(&cs); TlsFree(key); } - break; + break; } return TRUE; } diff --git a/src/threadmon.hpp b/src/threadmon.hpp index 6f1b2584..82c68fe1 100644 --- a/src/threadmon.hpp +++ b/src/threadmon.hpp @@ -1,8 +1,8 @@ -// The following ifdef block is the standard way of creating macros which make exporting +// The following ifdef block is the standard way of creating macros which make exporting // from a DLL simpler. All files within this DLL are compiled with the BOOST_THREADMON_EXPORTS // symbol defined on the command line. this symbol should not be defined on any project -// that uses this DLL. This way any other project whose source files include this file see +// that uses this DLL. This way any other project whose source files include this file see // BOOST_THREADMON_API functions as being imported from a DLL, wheras this DLL sees symbols // defined with this macro as being exported. #ifdef BOOST_THREADMON_EXPORTS diff --git a/src/timeconv.inl b/src/timeconv.inl index 55e6d64e..4f0d5e40 100644 --- a/src/timeconv.inl +++ b/src/timeconv.inl @@ -6,9 +6,9 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. - + namespace { const unsigned MILLISECONDS_PER_SECOND = 1000; const unsigned NANOSECONDS_PER_SECOND = 1000000000; diff --git a/src/tss.cpp b/src/tss.cpp index 34fae241..6682945a 100644 --- a/src/tss.cpp +++ b/src/tss.cpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #include @@ -106,8 +106,8 @@ bool tss::set(void* value) assert(handlers); if (!handlers) return false; - cleanup_info info(m_cleanup, value); - (*handlers)[m_key] = info; + cleanup_info info(m_cleanup, value); + (*handlers)[m_key] = info; } return !!TlsSetValue(m_key, value); } diff --git a/src/xtime.cpp b/src/xtime.cpp index 7fb5f0b3..e667a066 100644 --- a/src/xtime.cpp +++ b/src/xtime.cpp @@ -6,7 +6,7 @@ // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations -// about the suitability of this software for any purpose. +// about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #include @@ -14,7 +14,7 @@ #if defined(BOOST_HAS_FTIME) # include #elif defined(BOOST_HAS_GETTIMEOFDAY) -# include +# include #endif namespace boost {