(lambda ()
(without-interrupts
(lambda ()
- (flo:preserving-environment
- (lambda ()
- (call-alien* alien-function args))))))))
+ (let* ((saved (flo:environment))
+ (value (call-alien* alien-function args)))
+ (flo:set-environment! saved)
+ value))))))
#;(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.
- (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)))))
+ (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))