summaryrefslogtreecommitdiff
path: root/doc/ref/posix.texi
diff options
context:
space:
mode:
authorMike Gran <spk121@yahoo.com>2017-03-06 22:57:03 -0800
committerMike Gran <spk121@yahoo.com>2017-03-06 23:08:25 -0800
commitf5b362586d7622c408d4402c7cb496c45ffb56e8 (patch)
treedc29f257b5b753a5b2d82968b09699a718f7f288 /doc/ref/posix.texi
parent4ce31fd387e89c8f64716866705a5a34651506ea (diff)
downloadguile-wip-itimer-checks.tar.gz
Check for working profiling and virtual itimerswip-itimer-checks
* configure.ac (HAVE_USABLE_GETITIMER_PROF, HAVE_USABLE_GETITIMER_VIRTUAL): new tests * doc/ref/posix.texi (setitimer, getitimer): document provided? 'ITIMER_VIRTUAL and 'ITIMER_PROF * doc/ref/statprof.texi (statprof): document ITIMER_PROF requirements * libguile/scmsigs.c (scm_setitimer, scm_getitimer): document (provided? 'ITIMER_VIRTUAL) and (provided? 'ITIMER_READ) (scm_init_scmsigs): add features ITIMER_VIRTUAL and ITIMER_PROF * test-suite/tests/asyncs.test ("prevention via sigprof"): throw when unsupported * test-suite/tests/signals.test: throw when not supported * test-suite/tests/statprof.test: throw when not supported
Diffstat (limited to 'doc/ref/posix.texi')
-rw-r--r--doc/ref/posix.texi15
1 files changed, 11 insertions, 4 deletions
diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi
index 64e668d17..5cb68a292 100644
--- a/doc/ref/posix.texi
+++ b/doc/ref/posix.texi
@@ -1,7 +1,7 @@
@c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual.
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2007,
-@c 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+@c 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2017 Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions.
@node POSIX
@@ -2162,12 +2162,12 @@ expiry will be signalled.
A real-time timer, counting down elapsed real time. At zero it raises
@code{SIGALRM}. This is like @code{alarm} above, but with a higher
resolution period.
-@end defvar
+@end defvar
@defvar ITIMER_VIRTUAL
A virtual-time timer, counting down while the current process is
actually using CPU. At zero it raises @code{SIGVTALRM}.
-@end defvar
+@end defvar
@defvar ITIMER_PROF
A profiling timer, counting down while the process is running (like
@@ -2176,7 +2176,7 @@ process's behalf. At zero it raises a @code{SIGPROF}.
This timer is intended for profiling where a program is spending its
time (by looking where it is when the timer goes off).
-@end defvar
+@end defvar
@code{getitimer} returns the restart timer value and its current value,
as a list containing two pairs. Each pair is a time in seconds and
@@ -2196,6 +2196,13 @@ previous setting, in the same form as @code{getitimer} returns.
Although the timers are programmed in microseconds, the actual
accuracy might not be that high.
+
+Note that @code{ITIMER_PROF} and @code{ITIMER_VIRTUAL} are not
+functional on all platforms and may always error when called.
+@code{(provided? 'ITIMER_PROF)} and @code{(provided? 'ITIMER_VIRTUAL)}
+can be used to test if the those itimers are supported on the given
+host. @code{ITIMER_REAL} is supported on all platforms that support
+@code{setitimer}.
@end deffn