[MPlayer-cvslog] r31202 - trunk/stream/cache2.c

reimar subversion at mplayerhq.hu
Mon May 24 00:04:01 CEST 2010


Author: reimar
Date: Mon May 24 00:04:01 2010
New Revision: 31202

Log:
Try reducing the #ifdef mess for the different cache variants.

Modified:
   trunk/stream/cache2.c

Modified: trunk/stream/cache2.c
==============================================================================
--- trunk/stream/cache2.c	Sun May 23 23:58:50 2010	(r31201)
+++ trunk/stream/cache2.c	Mon May 24 00:04:01 2010	(r31202)
@@ -439,32 +439,30 @@ err_out:
     return res;
   }
 
-#if defined(__MINGW32__) || defined(PTHREAD_CACHE) || defined(__OS2__)
-}
-#ifdef PTHREAD_CACHE
-static void *ThreadProc( void *s ){
-#else
-static void ThreadProc( void *s ){
-#endif
-#endif
-
+#if !defined(__MINGW32__) && !defined(PTHREAD_CACHE) && !defined(__OS2__)
 #ifdef CONFIG_GUI
   use_gui = 0; // mp_msg may not use gui stuff in forked code
 #endif
-// cache thread mainloop:
   signal(SIGTERM,exit_sighandler); // kill
   signal(SIGUSR1, dummy_sighandler); // wakeup
   cache_mainloop(s);
-#if defined(__MINGW32__) || defined(__OS2__)
-  _endthread();
-#elif defined(PTHREAD_CACHE)
-  return NULL;
-#else
   // make sure forked code never leaves this function
   exit(0);
 #endif
 }
 
+#ifdef PTHREAD_CACHE
+static void *ThreadProc( void *s ){
+  cache_mainloop(s);
+  return NULL;
+}
+#elif defined(__MINGW32__) || defined(__OS2__)
+static void ThreadProc( void *s ){
+  cache_mainloop(s);
+  _endthread();
+}
+#endif
+
 int cache_stream_fill_buffer(stream_t *s){
   int len;
   if(s->eof){ s->buf_pos=s->buf_len=0; return 0; }


More information about the MPlayer-cvslog mailing list