SET_LEXPR_ACTUALS (nargs);
cstack_depth -= 1;
+ alienate_float_environment ();
}
DEFINE_PRIMITIVE ("RUN-CALLBACK", Prim_run_callback, 0, 0, 0)
/* All the smarts are in the kernel. */
PRIMITIVE_HEADER (0);
- {
+ {
char * tos;
CallbackKernel kernel;
int depth;
/* To avoid the normal IO system when debugging a callback. */
PRIMITIVE_HEADER (1);
- {
+ {
SCM arg = ARG_REF (1);
if (STRING_P (arg))
{
(define-integrable alien-function/filename %alien-function/filename)
(define-integrable (alien-function/name alienf)
- (string-tail (%alien-function/name alienf) 4))
+ (string-tail (%alien-function/name alienf) 4))
(define (%set-alien-function/address! alienf address)
(let ((qr (integer-divide address %radix)))
(lambda ()
(without-interrupts
(lambda ()
- (call-alien* alien-function args))))))
+ (flo:preserving-environment
+ (lambda ()
+ (call-alien* alien-function args))))))))
#;(define-integrable (call-alien* alien-function args)
(apply (ucode-primitive c-call -1) alien-function args))
;; by a callback trampoline. The callout should have already masked
;; all but the GC interrupts.
- (if (not (< id (vector-length registered-callbacks)))
- (error:bad-range-argument id 'apply-callback))
- (let ((procedure (vector-ref registered-callbacks id)))
- (if (not procedure)
- (error:bad-range-argument id 'apply-callback))
- (normalize-aliens! args)
- (callback-handler* procedure args)))
+ (flo:with-default-environment
+ (lambda ()
+ (if (not (< id (vector-length registered-callbacks)))
+ (error:bad-range-argument id 'apply-callback))
+ (let ((procedure (vector-ref registered-callbacks id)))
+ (if (not procedure)
+ (error:bad-range-argument id 'apply-callback))
+ (normalize-aliens! args)
+ (callback-handler* procedure args)))))
#;(define-integrable (callback-handler* procedure args)
(apply-callback-proc procedure args))