As of 0.9.2, the documentation has been updated to state that
`numa_available` returns `-1` on failure[1]. In
previous versions the documentation stated "any negative value",
although `-1` appears to be the only error return value as far back as
v0.5[2].
`0` should be considered a successful response when checking the
return code of this function.
[1]: https://github.com/numactl/numactl/blob/
4eee394215cde8420e5d3a75fcad02f27940bd6d/numa.3#L154
[2]: https://github.com/numactl/numactl/blob/
0ab0fa63dac14d08ab967ec9916122aada0fc6b0/libnuma.c#L190
Change-Id: Ic44274971f39ea76082246692c1d6d7bc1515c2f
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
if (ret && errno == ENOSYS) {
return false;
}
- return numa_available() > 0;
+ return numa_available() >= 0;
}
#endif
if (ret && errno == ENOSYS) {
return false;
}
- return numa_available() > 0;
+ return numa_available() >= 0;
}
#endif