From 2a93c3e84fa004bf2ab18d511d8888d90cacd5f3 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Thu, 24 Apr 2008 10:06:35 +0000 Subject: [PATCH] some cosmetic changes --- Foundation/include/Poco/RunnableAdapter.h | 2 +- Foundation/include/Poco/Thread.h | 4 ++-- Foundation/include/Poco/Thread_POSIX.h | 8 ++++---- Foundation/include/Poco/Thread_WIN32.h | 10 +++++----- Foundation/src/Thread.cpp | 2 +- Foundation/src/Thread_POSIX.cpp | 6 +++--- Foundation/src/Thread_WIN32.cpp | 8 ++++---- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Foundation/include/Poco/RunnableAdapter.h b/Foundation/include/Poco/RunnableAdapter.h index 68944ef22..d79c28494 100644 --- a/Foundation/include/Poco/RunnableAdapter.h +++ b/Foundation/include/Poco/RunnableAdapter.h @@ -54,7 +54,7 @@ class RunnableAdapter: public Runnable /// Usage: /// RunnableAdapter ra(myObject, &MyObject::doSomething)); /// Thread thr; - /// thr.Start(ra); + /// thr.start(ra); { public: typedef void (C::*Callback)(); diff --git a/Foundation/include/Poco/Thread.h b/Foundation/include/Poco/Thread.h index 87afbc7b2..ea2c08246 100644 --- a/Foundation/include/Poco/Thread.h +++ b/Foundation/include/Poco/Thread.h @@ -68,7 +68,7 @@ class Foundation_API Thread: private ThreadImpl /// The name of a thread can be changed at any time. { public: - using ThreadImpl::Callback; + using ThreadImpl::Callable; enum Priority /// Thread priorities. @@ -140,7 +140,7 @@ public: void start(Runnable& target); /// Starts the thread with the given target. - void start(Callback target, void* pData = 0); + void start(Callable target, void* pData = 0); /// Starts the thread with the given target and parameter. void join(); diff --git a/Foundation/include/Poco/Thread_POSIX.h b/Foundation/include/Poco/Thread_POSIX.h index 8403031df..4137b6c9c 100644 --- a/Foundation/include/Poco/Thread_POSIX.h +++ b/Foundation/include/Poco/Thread_POSIX.h @@ -59,7 +59,7 @@ namespace Poco { class Foundation_API ThreadImpl { public: - typedef void (*Callback)(void*); + typedef void (*Callable)(void*); enum Priority { @@ -76,7 +76,7 @@ public: { } - Callback callback; + Callable callback; void* pData; }; @@ -92,7 +92,7 @@ public: void setStackSizeImpl(int size); int getStackSizeImpl() const; void startImpl(Runnable& target); - void startImpl(Callback target, void* pData = 0); + void startImpl(Callable target, void* pData = 0); void joinImpl(); bool joinImpl(long milliseconds); @@ -103,7 +103,7 @@ public: protected: static void* runnableEntry(void* pThread); - static void* functionEntry(void* pThread); + static void* callableEntry(void* pThread); static int mapPrio(int prio); static int reverseMapPrio(int osPrio); diff --git a/Foundation/include/Poco/Thread_WIN32.h b/Foundation/include/Poco/Thread_WIN32.h index 1d931cb72..673b62245 100644 --- a/Foundation/include/Poco/Thread_WIN32.h +++ b/Foundation/include/Poco/Thread_WIN32.h @@ -51,7 +51,7 @@ namespace Poco { class Foundation_API ThreadImpl { public: - typedef void (*Callback)(void*); + typedef void (*Callable)(void*); #if defined(_DLL) typedef DWORD (WINAPI *Entry)(LPVOID); @@ -65,7 +65,7 @@ public: { } - Callback callback; + Callable callback; void* pData; }; @@ -90,7 +90,7 @@ public: void setStackSizeImpl(int size); int getStackSizeImpl() const; void startImpl(Runnable& target); - void startImpl(Callback target, void* pData = 0); + void startImpl(Callable target, void* pData = 0); void joinImpl(); bool joinImpl(long milliseconds); @@ -107,9 +107,9 @@ protected: #endif #if defined(_DLL) - static DWORD WINAPI functionEntry(LPVOID pThread); + static DWORD WINAPI callableEntry(LPVOID pThread); #else - static unsigned __stdcall functionEntry(void* pThread); + static unsigned __stdcall callableEntry(void* pThread); #endif void createImpl(Entry ent, void* pData); diff --git a/Foundation/src/Thread.cpp b/Foundation/src/Thread.cpp index acc16f52f..cc522b2f5 100644 --- a/Foundation/src/Thread.cpp +++ b/Foundation/src/Thread.cpp @@ -91,7 +91,7 @@ void Thread::start(Runnable& target) } -void Thread::start(Callback target, void* pData) +void Thread::start(Callable target, void* pData) { startImpl(target, pData); } diff --git a/Foundation/src/Thread_POSIX.cpp b/Foundation/src/Thread_POSIX.cpp index 8b4694853..cb4b90296 100644 --- a/Foundation/src/Thread_POSIX.cpp +++ b/Foundation/src/Thread_POSIX.cpp @@ -184,7 +184,7 @@ void ThreadImpl::startImpl(Runnable& target) } -void ThreadImpl::startImpl(Callback target, void* pData) +void ThreadImpl::startImpl(Callable target, void* pData) { if (_pData->pCallbackTarget && _pData->pCallbackTarget->callback) throw SystemException("thread already running"); @@ -204,7 +204,7 @@ void ThreadImpl::startImpl(Callback target, void* pData) _pData->pCallbackTarget->callback = target; _pData->pCallbackTarget->pData = pData; - if (pthread_create(&_pData->thread, &attributes, functionEntry, this)) + if (pthread_create(&_pData->thread, &attributes, callableEntry, this)) { _pData->pCallbackTarget->callback = 0; _pData->pCallbackTarget->pData = 0; @@ -290,7 +290,7 @@ void* ThreadImpl::runnableEntry(void* pThread) } -void* ThreadImpl::functionEntry(void* pThread) +void* ThreadImpl::callableEntry(void* pThread) { pthread_setspecific(_currentKey, pThread); diff --git a/Foundation/src/Thread_WIN32.cpp b/Foundation/src/Thread_WIN32.cpp index b6aa597e1..6ebb5c055 100644 --- a/Foundation/src/Thread_WIN32.cpp +++ b/Foundation/src/Thread_WIN32.cpp @@ -98,7 +98,7 @@ void ThreadImpl::startImpl(Runnable& target) } -void ThreadImpl::startImpl(Callback target, void* pData) +void ThreadImpl::startImpl(Callable target, void* pData) { if (isRunningImpl()) throw SystemException("thread already running"); @@ -106,7 +106,7 @@ void ThreadImpl::startImpl(Callback target, void* pData) _callbackTarget.callback = target; _callbackTarget.pData = pData; - createImpl(functionEntry, this); + createImpl(callableEntry, this); } @@ -213,9 +213,9 @@ unsigned __stdcall ThreadImpl::runnableEntry(void* pThread) #if defined(_DLL) -DWORD WINAPI ThreadImpl::functionEntry(LPVOID pThread) +DWORD WINAPI ThreadImpl::callableEntry(LPVOID pThread) #else -unsigned __stdcall ThreadImpl::functionEntry(void* pThread) +unsigned __stdcall ThreadImpl::callableEntry(void* pThread) #endif { TlsSetValue(_currentKey, pThread);