(define c-sleep
(foreign-procedure __collect_safe "sleep" (unsigned) unsigned))
(c-sleep 10) ; sleeps for 10 seconds without blocking other threads
$ chezscheme collect-safe.sls
Chez Scheme Version 9.5
Copyright 1984-2017 Cisco Systems, Inc.
Exception: invalid foreign-procedure convention __collect_safe at line 2, char 22 of collect-safe.sls
I get this when I try to use __collect_safe foreign-procedure convention:
Exception: invalid foreign-procedure convention __collect_safe
Even if I try to run the example from: https://cisco.github.io/ChezScheme/csug9.5/foreign.html
I'm on Linux and Chez version 9.5