llvm seems to solve our cancellation issues. Revert "Tentative hack for OSX msleep...
authorDerk-Jan Hartman <hartman@videolan.org>
Fri, 20 Feb 2009 14:06:10 +0000 (15:06 +0100)
committerDerk-Jan Hartman <hartman@videolan.org>
Fri, 20 Feb 2009 14:07:45 +0000 (15:07 +0100)
This reverts commit 3b6ed8084e27fa27f51d3abdeb37052ea9af38fb.

src/misc/mtime.c

index 96049e5..bc622c1 100644 (file)
@@ -350,25 +350,6 @@ void mwait( mtime_t date )
     }
     vlc_testcancel();
 
-#elif defined( __APPLE__ )
-    /* Explicit hack: OSX does not cancel at nanosleep() */
-    struct vlc_mutex_t lock;
-    struct vlc_cond_t  wait;
-
-    vlc_mutex_init (&lock);
-    vlc_cond_init (&wait);
-    vlc_mutex_lock (&lock);
-
-    vlc_cleanup_push (vlc_mutex_destroy, &lock);
-    vlc_cleanup_push (vlc_cond_destroy, &wait);
-    vlc_cleanup_push (vlc_mutex_unlock, &lock);
-
-    vlc_cond_timedwait (&wait, &lock, date);
-
-    vlc_cleanup_run ();
-    vlc_cleanup_run ();
-    vlc_cleanup_run ();
-
 #else
     mtime_t delay = date - mdate();
     if( delay > 0 )
@@ -417,7 +398,7 @@ void msleep( mtime_t delay )
 #elif defined( HAVE_KERNEL_OS_H )
     snooze( delay );
 
-#elif defined( WIN32 ) || defined( UNDER_CE ) || defined( __APPLE__ )
+#elif defined( WIN32 ) || defined( UNDER_CE )
     mwait (mdate () + delay);
 
 #elif defined( HAVE_NANOSLEEP )