summaryrefslogtreecommitdiff
path: root/RISCOS/sleep.c
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2007-08-16 14:35:24 +0000
committerSkip Montanaro <skip@pobox.com>2007-08-16 14:35:24 +0000
commit7a98be2efbdc44a6271e3bf6117a1e6c77828414 (patch)
tree64b6306494f992605ef5bd854dfc9e4922f8b967 /RISCOS/sleep.c
parentc5aba174477a4bdbda31d859ce407c6ee7cef293 (diff)
downloadcpython-git-7a98be2efbdc44a6271e3bf6117a1e6c77828414.tar.gz
Remove RISCOS support
Diffstat (limited to 'RISCOS/sleep.c')
-rw-r--r--RISCOS/sleep.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/RISCOS/sleep.c b/RISCOS/sleep.c
deleted file mode 100644
index c85eb8651f..0000000000
--- a/RISCOS/sleep.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include "oslib/osmodule.h"
-#include <stdio.h>
-#include "kernel.h"
-#include <limits.h>
-#include <errno.h>
-#include "oslib/taskwindow.h"
-#include "Python.h"
-
-
-int riscos_sleep(double delay)
-{
- os_t starttime, endtime, time; /* monotonic times (centiseconds) */
- int *pollword, ret;
- osbool claimed;
-
- /* calculate end time */
- starttime = os_read_monotonic_time();
- if (starttime + 100.0*delay >INT_MAX)
- endtime = INT_MAX;
- else
- endtime = (os_t)(starttime + 100.0*delay);
-
- /* allocate (in RMA) and set pollword for xupcall_sleep */
- pollword = osmodule_alloc(4);
- *pollword = 1;
-
- time = starttime;
- ret = 0;
- while ( time<endtime && time>=starttime ) {
- xupcall_sleep (pollword, &claimed);
- if (PyErr_CheckSignals()) {
- ret = 1;
- break;
- }
- time = os_read_monotonic_time();
- }
-
- /* deallocate pollword */
- osmodule_free(pollword);
- return ret;
-}