1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-03 10:05:22 +00:00
Files
Interlisp.maiko/inc
Nick Briggs 439d92adbd Add experimental SUBR to call nanosleep() for experiments in reducing CPU load
This adds a SUBR, sb_YIELD, value (octal) 0322 which takes a single number
0..999999999 which is the number of nanoseconds to pass to nanosleep().

The return value is T if the call to nanosleep() was executed or NIL
if it was not (argument out-of-range, or other error in getting the
number from the argument).

To use this experimental SUBR in a sysout you should:

   (SETQ \INITSUBRS (CONS '(YIELD #o322) \INITSUBRS))

then you can define functions that use that SUBR:

   (DEFINEQ (BACKGROUND-YIELD (SUBRCALL YIELD 833333)))
   (COMPILE 'BACKGROUND-YIELD)
   (SETQ BACKGROUNDFNS (CONS 'BACKGROUND-YIELD BACKGROUNDFNS))
2021-02-24 12:42:23 -08:00
..
2021-02-10 20:33:54 -08:00
2021-01-05 10:26:02 -08:00
2021-01-05 10:26:02 -08:00
2021-02-10 20:33:54 -08:00
2021-02-22 11:54:51 +07:00
2020-12-21 18:09:14 +00:00
2021-02-22 09:44:43 -08:00