trunk/branch integration: VxWorks & Wince

This commit is contained in:
Marian Krivos
2011-08-22 18:02:56 +00:00
parent f66cd72471
commit 68306c2960
5 changed files with 201 additions and 110 deletions

View File

@@ -45,7 +45,11 @@
#if defined(POCO_OS_FAMILY_WINDOWS)
#if defined(_WIN32_WCE)
#include "Poco/Thread_WINCE.h"
#else
#include "Poco/Thread_WIN32.h"
#endif
#else
#include "Poco/Thread_POSIX.h"
#endif
@@ -68,6 +72,8 @@ class Foundation_API Thread: private ThreadImpl
/// The name of a thread can be changed at any time.
{
public:
typedef ThreadImpl::TIDImpl TID;
using ThreadImpl::Callable;
enum Priority
@@ -92,6 +98,9 @@ public:
int id() const;
/// Returns the unique thread ID of the thread.
TID tid() const;
/// Returns the native thread ID of the thread.
std::string name() const;
/// Returns the name of the thread.
@@ -118,6 +127,8 @@ public:
int getOSPriority() const;
/// Returns the thread's priority, expressed as an operating system
/// specific priority value.
///
/// May return 0 if the priority has not been explicitly set.
static int getMinOSPriority();
/// Returns the mininum operating system-specific priority value,
@@ -172,6 +183,9 @@ public:
/// Returns the Thread object for the currently active thread.
/// If the current thread is the main thread, 0 is returned.
static TID currentTid();
/// Returns the native thread ID for the current thread.
protected:
ThreadLocalStorage& tls();
/// Returns a reference to the thread's local storage.
@@ -202,6 +216,12 @@ private:
//
// inlines
//
inline Thread::TID Thread::tid() const
{
return tidImpl();
}
inline int Thread::id() const
{
return _id;
@@ -284,6 +304,12 @@ inline int Thread::getStackSize() const
}
inline Thread::TID Thread::currentTid()
{
return currentTidImpl();
}
} // namespace Poco