Hello Michael,
pthread_setaffinity_np() and pthread_getaffinity_np(), "on error, return
a non-zero error number". Usually that kind of library functions return
-1, and I don't know if this case is different. The RETURN VALUE
section doesn't specify. Actually the words "error number" hint that it
is an `errno` value, because it's the same words in errno.3, but it
could be clearer, and maybe also point to errno(3) in that page.
In the EXAMPLES section, however, the return value is used as if it were
an `errno` value, printing the corresponding string with perror().
Is that example printing random strings (a bug)?
Or is it that those functions return an error code that corresponds to a
valid `errno` error number? In that case it could be documented better
IMHO.
If that is the case, do those functions set `errno` and also return that
same `errno` value redundantly?
Thanks,
Alex.