git-svn-id: svn://db.shs.com.ru/pip@492 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-05-02 12:40:56 +00:00
parent 08052ac9e2
commit 2bb1ab82a9
8 changed files with 162 additions and 117 deletions

View File

@@ -28,11 +28,6 @@
#include "piinit.h"
#include "pimutex.h"
#include "piobject.h"
#ifdef WINDOWS
# define __THREAD_FUNC__ uint __stdcall
#else
# define __THREAD_FUNC__ void*
#endif
typedef void (*ThreadFunc)(void * );
@@ -104,6 +99,9 @@ public:
//! \brief Returns thread ID
llong tid() const {return tid_;}
static void __thread_func__(void*);
static void __thread_func_once__(void*);
EVENT(started)
EVENT(stopped)
@@ -176,10 +174,7 @@ public:
//! \}
protected:
static __THREAD_FUNC__ thread_function(void * t);
static __THREAD_FUNC__ thread_function_once(void * t);
static int priority2System(PIThread::Priority p);
//! Function executed once at the start of thread.
virtual void begin() {;}