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

@@ -80,8 +80,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(Runnable& target);
void startImpl(Callable target, void* pData = 0);
@@ -142,17 +142,19 @@ inline int ThreadImpl::getOSPriorityImpl() const
return _pData->osPrio;
}
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()
inline int ThreadImpl::getAffinityImpl()
{
throw Poco::NotImplementedException("Thread affinity not supported on this system");
return -1;
}
inline bool ThreadImpl::isRunningImpl() const
{
return _pData->pRunnableTarget != 0 ||