[FFmpeg-devel] [PATCH] Runtime detection for the number of processors/cores

Philipp Meinen philipp
Wed May 21 16:14:02 CEST 2008

On Wednesday 21 May 2008 15.54:15 Fran?ois Revol wrote:
> >
> >   _SC_NPROCESSORS_ONLN    Number of processors online
> >
> > Seems to mean the same to me, unlike:
> Unless of course sched_get_affinity() returns a subset mask for
> NUMA machines, then disregard.
> It's POSIX only anyway so it has to be platform dependant...
> Hmm doesn't pthread have a less linuxish call for that btw ?
> Else one can still #ifdef __linux__ to use sched_get_affinity and
> fall back to sysconf.
> Fran?ois.

Im working on that and on a windows version.
Its somewhat tricky because the sched_getaffinity is not widely
To make sched_getaffinity available i need to define _GNU_SOURCE
for the code fragment in question.
A short grep told me that _GNU_SOURCE has not been defined in any
other part of ffmpeg. Am I even allowed to use this definition for

More information about the ffmpeg-devel mailing list