summaryrefslogtreecommitdiff
path: root/libguile/posix.h
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-12-01 23:58:39 +0100
committerLudovic Courtès <ludo@gnu.org>2010-12-03 00:38:29 +0100
commitfe613fe25d55ac293fbce510a3ac6057b270fa31 (patch)
treefc7847df11f18f38c82ba3283b88cb84d4dc68f7 /libguile/posix.h
parent50a4533f82e930adc357345e364672ac6c07ea16 (diff)
downloadguile-fe613fe25d55ac293fbce510a3ac6057b270fa31.tar.gz
Add bindings to GNU `sched_setaffinity' and `sched_getaffinity'.
* configure.ac: Add checks for `sched_setaffinity' and `sched_getaffinity'. * doc/ref/posix.texi (Processes): Document `getaffinity' and `setaffinity'. * libguile/posix.c (cpu_set_to_bitvector, scm_getaffinity)[HAVE_SCHED_GETAFFINITY]: New functions. (scm_setaffinity)[HAVE_SCHED_SETAFFINITY]: New function. * libguile/posix.h (scm_getaffinity, scm_setaffinity): New declarations. * test-suite/tests/posix.test ("affinity"): New test prefix.
Diffstat (limited to 'libguile/posix.h')
-rw-r--r--libguile/posix.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libguile/posix.h b/libguile/posix.h
index da588352a..aa5e12cbd 100644
--- a/libguile/posix.h
+++ b/libguile/posix.h
@@ -89,6 +89,8 @@ SCM_API SCM scm_getpass (SCM prompt);
SCM_API SCM scm_flock (SCM file, SCM operation);
SCM_API SCM scm_sethostname (SCM name);
SCM_API SCM scm_gethostname (void);
+SCM_API SCM scm_getaffinity (SCM pid);
+SCM_API SCM scm_setaffinity (SCM pid, SCM cpu_set);
SCM_INTERNAL void scm_init_posix (void);
SCM_INTERNAL scm_i_pthread_mutex_t scm_i_locale_mutex;