}
if (pthread_join(tid, (void**)&ptr) < 0) {
- tid = 0;
MODULE_ERROR("pthread_join is failed : %s", strerror(errno));
return -1;
}
+ stop = 0;
+
tid = 0;
if (ptr == PTHREAD_CANCELED) {
MODULE_LOG("pthread canceled");
MODULE_LOG("clean up handler!!! : %d", tid);
- stop = 0;
-
for (i = 0; i < pbuffer->channels; ++i) {
free(pbuffer->ppbuffer[i]);
pbuffer->ppbuffer[i] = NULL;
}
}
+ pthread_mutex_lock(&mutex);
+ __haptic_predefine_action(gbuffer.handle, STOP, NULL);
+ pthread_mutex_unlock(&mutex);
+
pthread_cleanup_pop(1);
pthread_exit((void *)0);
}