On 06/08/2014 03:31 PM, Pranith Kumar wrote:
> + AS_IF([test "x$sched_set_affinity_args" = "x3"], [
> + # test if sched_setaffinity works
> + AC_MSG_CHECKING([if sched_setaffinity works])
> + AC_RUN_IFELSE([AC_LANG_SOURCE([[
> + #include <sched.h>
> + int main()
> + {
> + cpu_set_t foo;
> + return sched_setaffinity(0, sizeof (foo), &foo);
This passes uninitialized stack memory to the system call; the return
value is unpredictable.
If it turns out that such a test is necessary, it should probably call
sched_getaffinity first and pass the result to sched_setaffinity.
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev