mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
CComponentsTimer: move pthread members into startTimer()
This commit is contained in:
@@ -55,9 +55,6 @@ CComponentsTimer::~CComponentsTimer()
|
|||||||
//thread handle
|
//thread handle
|
||||||
void* CComponentsTimer::initTimerThread(void *arg)
|
void* CComponentsTimer::initTimerThread(void *arg)
|
||||||
{
|
{
|
||||||
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,0);
|
|
||||||
pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS,0);
|
|
||||||
|
|
||||||
CComponentsTimer *timer = static_cast<CComponentsTimer*>(arg);
|
CComponentsTimer *timer = static_cast<CComponentsTimer*>(arg);
|
||||||
|
|
||||||
//start loop
|
//start loop
|
||||||
@@ -76,6 +73,9 @@ bool CComponentsTimer::startTimer()
|
|||||||
{
|
{
|
||||||
void *ptr = static_cast<void*>(this);
|
void *ptr = static_cast<void*>(this);
|
||||||
|
|
||||||
|
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,0);
|
||||||
|
pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS,0);
|
||||||
|
|
||||||
if(!tm_thread) {
|
if(!tm_thread) {
|
||||||
int res = pthread_create (&tm_thread, NULL, initTimerThread, ptr) ;
|
int res = pthread_create (&tm_thread, NULL, initTimerThread, ptr) ;
|
||||||
if (res != 0){
|
if (res != 0){
|
||||||
|
Reference in New Issue
Block a user