chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Safe interrupt handlers?


From: John Cowan
Subject: Re: [Chicken-users] Safe interrupt handlers?
Date: Mon, 26 Feb 2007 11:02:03 -0500
User-agent: Mutt/1.5.13 (2006-08-11)

Tony Sidaway scripsit:

> An interrupt handler written in Chicken Scheme probably can't do a lot
> without knocking over a heap of dominoes.
> 
> Nevertheless, would a simple lambda that only changes a top level flag
> variable be stable enough to be useful?  This is often all that posix
> interrupt handlers written in C do anyway.

The trouble is that Posix signal handlers have to return, and Chicken
procedures don't return.  You are probably better off writing the handler
and its associated flag in C, and then using define-foreign-variable to
get access to the flag from Scheme code.

-- 
Ambassador Trentino: I've said enough. I'm a man of few words.
Rufus T. Firefly: I'm a man of one word: scram!
        --Duck Soup                     John Cowan <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]