mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-15 07:14:46 +02:00
Thread fixes for WinCE
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/Runnable.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include "Poco/UnWindows.h"
|
||||
|
||||
|
||||
@@ -40,16 +41,6 @@ public:
|
||||
typedef void (*Callable)(void*);
|
||||
typedef DWORD (WINAPI *Entry)(LPVOID);
|
||||
|
||||
struct CallbackData
|
||||
{
|
||||
CallbackData(): callback(0), pData(0)
|
||||
{
|
||||
}
|
||||
|
||||
Callable callback;
|
||||
void* pData;
|
||||
};
|
||||
|
||||
enum Priority
|
||||
{
|
||||
PRIO_LOWEST_IMPL = THREAD_PRIORITY_LOWEST,
|
||||
@@ -76,9 +67,7 @@ public:
|
||||
static int getMaxOSPriorityImpl(int policy);
|
||||
void setStackSizeImpl(int size);
|
||||
int getStackSizeImpl() const;
|
||||
void startImpl(Runnable& target);
|
||||
void startImpl(Callable target, void* pData = 0);
|
||||
|
||||
void startImpl(SharedPtr<Runnable> pTarget);
|
||||
void joinImpl();
|
||||
bool joinImpl(long milliseconds);
|
||||
bool isRunningImpl() const;
|
||||
@@ -89,7 +78,6 @@ public:
|
||||
|
||||
protected:
|
||||
static DWORD WINAPI runnableEntry(LPVOID pThread);
|
||||
static DWORD WINAPI callableEntry(LPVOID pThread);
|
||||
|
||||
void createImpl(Entry ent, void* pData);
|
||||
void threadCleanup();
|
||||
@@ -120,8 +108,7 @@ private:
|
||||
DWORD _slot;
|
||||
};
|
||||
|
||||
Runnable* _pRunnableTarget;
|
||||
CallbackData _callbackTarget;
|
||||
SharedPtr<Runnable> _pRunnableTarget;
|
||||
HANDLE _thread;
|
||||
DWORD _threadId;
|
||||
int _prio;
|
||||
|
Reference in New Issue
Block a user