From c9b99082369aaae71dcaf3bed0a34bb7962a6f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= Date: Thu, 18 Oct 2012 18:38:17 +0200 Subject: [PATCH 06/13] posix/thread: add a hack to work-around crashes when using the buggy iOS 6 runtime --- src/posix/thread.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/posix/thread.c b/src/posix/thread.c index 514f592..6a95bb0 100644 --- a/src/posix/thread.c +++ b/src/posix/thread.c @@ -355,6 +355,18 @@ void vlc_cond_init_daytime (vlc_cond_t *p_condvar) void vlc_cond_destroy (vlc_cond_t *p_condvar) { int val = pthread_cond_destroy( p_condvar ); + +#ifdef __APPLE__ + if (val != 0) { + printf("pthread_cond_destroy returned %i\n", val); + + if (val == EBUSY) { + printf("this is a EBUSY!\n"); + return; + } + } +#endif + VLC_THREAD_ASSERT ("destroying condition"); } -- 1.7.12.4 (Apple Git-37)