Go to the documentation of this file.
20 #if defined(__LINUX__)
21 void* threadFunction(
void* pvThread)
30 void threadFunction(
void* pvThread)
38 unsigned int __stdcall threadFunction(
void* pvThread)
53 m_uiStackSize(1228000),
56 m_bThreadRunFlag(false),
57 m_bThreadStopFlag(false),
59 m_pfuThreadFunction(0)
65 error(-1,
"copy contructor : method should no be called!");
70 debug(1,
"destructed");
81 error(-1,
"assignment operator : method should not be called!");
120 unsigned int iThreadId;
122 m_hThreadHandle = (HANDLE)_beginthreadex(NULL, 0, threadFunction, (
void*)
this, 0, &iThreadId);
124 if(m_hThreadHandle == NULL)
126 warning(
"createThread : creating thread failed!");
136 #if defined(__LINUX__)
137 pthread_attr_t Thread_attr;
139 int retVal = pthread_create(&m_hThreadHandle, NULL, threadFunction, (
void*)
this);
142 warning(
"createThread : creating thread failed!");
160 warning(
"createThread : creating stack failed!");
168 warning(
"createThread : creating thread failed!");
unsigned int m_uiStackSize
void error(const int iErrorCode, const char *pcErrorMessage,...) const
void terminateThread()
called outside the thread function to terminate the thread
bool checkThreadStop()
check inside the thread function to check termination
void exitThread()
called inside the thread function before leaving the thread
int createThread(void(*fuThreadFunction)(CThread *), void *pThreadObject)
void(* m_pfuThreadFunction)(CThread *)
void setThreadStackSize(unsigned int uiSize)
void debug(const int iDebugLevel, const char *pcDebugMessage,...) const
bool checkThreadRun()
check outside the thread function to check running
CThread & operator=(const CThread &clThread)
void warning(const char *pcWarningMessage,...) const
schunk_libm5api
Author(s): Florian Weisshardt
autogenerated on Sat May 7 2022 02:17:13