[vlc-commits] thread: Implement vlc_GetCPUCount for android.
Hugo Beauzée-Luyssen
git at videolan.org
Sat Jan 28 19:53:25 CET 2012
vlc/vlc-2.0 | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Fri Jan 27 23:09:03 2012 +0100| [046f33df26d269cfc1216ea2f4a2284436f372c9] | committer: Jean-Baptiste Kempf
thread: Implement vlc_GetCPUCount for android.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 739f1233633c09f7095c1d53c85b65307e58b7fa)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=046f33df26d269cfc1216ea2f4a2284436f372c9
---
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 122e201..f6b5165 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -1218,7 +1218,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