[vlc-commits] thread: Implement vlc_GetCPUCount for android.

Hugo Beauzée-Luyssen git at videolan.org
Sat Jan 28 00:19:28 CET 2012


vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Fri Jan 27 23:09:03 2012 +0100| [739f1233633c09f7095c1d53c85b65307e58b7fa] | committer: Jean-Baptiste Kempf

thread: Implement vlc_GetCPUCount for android.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=739f1233633c09f7095c1d53c85b65307e58b7fa
---

 src/posix/thread.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/posix/thread.c b/src/posix/thread.c
index 7c4860e..001240b 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -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;



More information about the vlc-commits mailing list