style and interface fixes for thread affinity

This commit is contained in:
Guenter Obiltschnig
2015-03-18 16:40:22 +01:00
parent 8b96fd4a33
commit 2b1301b3e3
12 changed files with 217 additions and 174 deletions

View File

@@ -67,8 +67,8 @@ public:
static int getMaxOSPriorityImpl(int policy);
void setStackSizeImpl(int size);
int getStackSizeImpl() const;
void setAffinityImpl(unsigned cpu);
unsigned getAffinityImpl() const;
void setAffinityImpl(int cpu);
int getAffinityImpl() const;
void startImpl(SharedPtr<Runnable> pTarget);
void joinImpl();
bool joinImpl(long milliseconds);
@@ -146,17 +146,19 @@ inline int ThreadImpl::getMaxOSPriorityImpl(int /* policy */)
return PRIO_HIGHEST_IMPL;
}
inline void ThreadImpl::setAffinityImpl(unsigned cpu)
inline void ThreadImpl::setAffinityImpl(int)
{
(void)cpu;
throw Poco::NotImplementedException("Thread affinity not supported on this system");
// not supported
}
inline unsigned ThreadImpl::getAffinityImpl() const
inline int ThreadImpl::getAffinityImpl() const
{
throw Poco::NotImplementedException("Thread affinity not supported on this system");
return -1;
}
inline void ThreadImpl::sleepImpl(long milliseconds)
{
Sleep(DWORD(milliseconds));