summaryrefslogtreecommitdiff
path: root/libguile/scmsigs.c
diff options
context:
space:
mode:
authorMikael Djurfeldt <djurfeldt@nada.kth.se>1998-04-20 00:40:09 +0000
committerMikael Djurfeldt <djurfeldt@nada.kth.se>1998-04-20 00:40:09 +0000
commitce874f2db771045adda570adf498dfb41f268453 (patch)
tree351f964e30616d9496cd6e81f2279dc12dcb09c5 /libguile/scmsigs.c
parent7105a806eef103c74d94a456ae6525a2db5ae0eb (diff)
downloadguile-ce874f2db771045adda570adf498dfb41f268453.tar.gz
* scmsigs.c (scm_usleep): New procedure; Declare usleep if it
isn't found in the OS.
Diffstat (limited to 'libguile/scmsigs.c')
-rw-r--r--libguile/scmsigs.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c
index 6440419fd..27287fcff 100644
--- a/libguile/scmsigs.c
+++ b/libguile/scmsigs.c
@@ -52,6 +52,9 @@
#include <unistd.h>
#endif
+#if defined(DECLARE_USLEEP) || (defined(GUILE_ISELECT) && !defined(HAVE_USLEEP))
+extern int usleep (unsigned);
+#endif
@@ -352,6 +355,20 @@ scm_sleep (i)
return SCM_MAKINUM (j);
}
+#if defined(GUILE_ISELECT) || defined(HAVE_USLEEP)
+SCM_PROC(s_usleep, "usleep", 1, 0, 0, scm_usleep);
+
+SCM
+scm_usleep (i)
+ SCM i;
+{
+ int j;
+ SCM_ASSERT (SCM_INUMP (i) && (SCM_INUM (i) >= 0), i, SCM_ARG1, s_usleep);
+ j = usleep (SCM_INUM(i));
+ return SCM_MAKINUM (j);
+}
+#endif
+
SCM_PROC(s_raise, "raise", 1, 0, 0, scm_raise);
SCM