1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00

Improve doc of getaffinity' and setaffinity'.

* doc/ref/posix.texi (Processes): Add cross-reference from `setaffinity'
  and `getaffinity' to the corresponding node in the glibc manual.

* libguile/posix.c (scm_getaffinity, scm_setaffinity): Likewise.
This commit is contained in:
Ludovic Courtès 2010-12-07 22:56:07 +01:00
parent 99dbafd66a
commit 3ae78cac88
2 changed files with 12 additions and 4 deletions

View file

@ -1840,7 +1840,9 @@ has its corresponding bit set in the returned bitvector.
The number of bits set is a good estimate of how many CPUs
Guile can use without stepping on other processes' toes.
Currently this procedure is only defined on GNU variants.
Currently this procedure is only defined on GNU variants
(@pxref{CPU Affinity, @code{sched_getaffinity},, libc, The
GNU C Library Reference Manual}).
@end deffn
@deffn {Scheme Procedure} setaffinity pid mask
@ -1849,7 +1851,9 @@ Install the CPU affinity mask @var{mask}, a bitvector, for
the process or thread with ID @var{pid}. The return value
is unspecified.
Currently this procedure is only defined on GNU variants.
Currently this procedure is only defined on GNU variants
(@pxref{CPU Affinity, @code{sched_setaffinity},, libc, The
GNU C Library Reference Manual}).
@end deffn

View file

@ -1930,7 +1930,9 @@ SCM_DEFINE (scm_getaffinity, "getaffinity", 1, 0, 0,
"has its corresponding bit set in the returned bitvector.\n"
"The number of bits set is a good estimate of how many CPUs\n"
"Guile can use without stepping on other processes' toes.\n\n"
"Currently this procedure is only defined on GNU variants.\n")
"Currently this procedure is only defined on GNU variants\n"
"(@pxref{CPU Affinity, @code{sched_getaffinity},, libc, The\n"
"GNU C Library Reference Manual}).\n")
#define FUNC_NAME s_scm_getaffinity
{
int err;
@ -1954,7 +1956,9 @@ SCM_DEFINE (scm_setaffinity, "setaffinity", 2, 0, 0,
"Install the CPU affinity mask @var{mask}, a bitvector, for\n"
"the process or thread with ID @var{pid}. The return value\n"
"is unspecified.\n\n"
"Currently this procedure is only defined on GNU variants.\n")
"Currently this procedure is only defined on GNU variants\n"
"(@pxref{CPU Affinity, @code{sched_setaffinity},, libc, The\n"
"GNU C Library Reference Manual}).\n")
#define FUNC_NAME s_scm_setaffinity
{
cpu_set_t cs;