thread: Implement vlc_GetCPUCount for android.
authorHugo Beauzée-Luyssen <beauze.h@gmail.com>
Fri, 27 Jan 2012 22:09:03 +0000 (23:09 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 27 Jan 2012 23:16:49 +0000 (00:16 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
src/posix/thread.c

index 7c4860e..001240b 100644 (file)
@@ -1204,7 +1204,8 @@ unsigned vlc_GetCPUCount(void)
         count = sysconf (_SC_NPROCESSORS_ONLN);
     free (cpulist);
     return count ? count : 1;
-
+#elif defined(__ANDROID__)
+    return sysconf(_SC_NPROCESSORS_CONF);
 #else
 #   warning "vlc_GetCPUCount is not implemented for your platform"
     return 1;