From: SeokYeon Hwang Date: Mon, 14 Oct 2013 06:40:29 +0000 (+0900) Subject: brillcodec: Fixed deadlock problem. X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~667^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f734e060266190da7f534288f97596fb5c2f0b3a;p=sdk%2Femulator%2Fqemu.git brillcodec: Fixed deadlock problem. This problem happened frequently on Windows and wrong use of pthread_cond_signal a cause of deadlock. pthread_cond_wait api has to be locked by mutex when you use it. Change-Id: I3e6d670a36a8dcec92e49aa71d301d6b7854be8a Signed-off-by: SeokYeon Hwang --- diff --git a/tizen/src/hw/maru_brill_codec.c b/tizen/src/hw/maru_brill_codec.c index 7b276426fa..b65db1daff 100644 --- a/tizen/src/hw/maru_brill_codec.c +++ b/tizen/src/hw/maru_brill_codec.c @@ -221,7 +221,9 @@ static void maru_brill_codec_wakeup_threads(MaruBrillCodecState *s, int api_inde } maru_brill_codec_add_ioparam_queue(s, (void *)ioparam); + qemu_mutex_lock(&s->context_mutex); qemu_cond_signal(&s->threadpool.cond); + qemu_mutex_unlock(&s->context_mutex); } static void *maru_brill_codec_threads(void *opaque)