projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
846dca1
)
threads: check defines before using them in automatic thread detection
author
Janne Grunau
<janne-libav@jannau.net>
Fri, 23 Dec 2011 10:10:37 +0000
(11:10 +0100)
committer
Janne Grunau
<janne-libav@jannau.net>
Fri, 23 Dec 2011 13:41:03 +0000
(14:41 +0100)
libavcodec/pthread.c
patch
|
blob
|
history
diff --git
a/libavcodec/pthread.c
b/libavcodec/pthread.c
index
8914150
..
f842edf
100644
(file)
--- a/
libavcodec/pthread.c
+++ b/
libavcodec/pthread.c
@@
-152,7
+152,7
@@
typedef struct FrameThreadContext {
static int get_logical_cpus(AVCodecContext *avctx)
{
int ret, nb_cpus = 1;
-#if HAVE_SCHED_GETAFFINITY
+#if HAVE_SCHED_GETAFFINITY
&& defined(CPU_COUNT)
cpu_set_t cpuset;
CPU_ZERO(&cpuset);
@@
-165,7
+165,7
@@
static int get_logical_cpus(AVCodecContext *avctx)
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
nb_cpus = sysinfo.dwNumberOfProcessors;
-#elif HAVE_SYSCTL
+#elif HAVE_SYSCTL
&& defined(HW_NCPU)
int mib[2] = { CTL_HW, HW_NCPU };
size_t len = sizeof(nb_cpus);