summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tizen/DEVICE/src/file.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tizen/DEVICE/src/file.c b/tizen/DEVICE/src/file.c
index eea51e8..b640e0c 100644
--- a/tizen/DEVICE/src/file.c
+++ b/tizen/DEVICE/src/file.c
@@ -130,11 +130,12 @@ static int _cancel_thread(void)
}
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");
@@ -152,8 +153,6 @@ static void __clean_up(void *arg)
MODULE_LOG("clean up handler!!! : %d", tid);
- stop = 0;
-
for (i = 0; i < pbuffer->channels; ++i) {
free(pbuffer->ppbuffer[i]);
pbuffer->ppbuffer[i] = NULL;
@@ -197,6 +196,10 @@ static void* __play_cb(void *arg)
}
}
+ pthread_mutex_lock(&mutex);
+ __haptic_predefine_action(gbuffer.handle, STOP, NULL);
+ pthread_mutex_unlock(&mutex);
+
pthread_cleanup_pop(1);
pthread_exit((void *)0);
}