>>>>> "Michal" == Michal Maru¹ka <mmc@maruska.dyndns.org> writes:
Michal> mmc@maruska.dyndns.org (Michal Maru¹ka) writes:
>> i would need a macro(?) to protect some code (file ops)
>> against user/keyboard's control-c. Anybody has done it (and wants to share)?
Michal> ok, i've found it: (with-enabled-interrupts interrupt-set . body)
Michal> But how to make up the interrupt-set, if i want to remove just one
signal?
Michal> it seems, that scsh/low-interrupt.scm does not export the necessary ops
on the
Michal> i-set (e.g. remove-interrupt).
Michal> or am i just missing something?
I also think that these operations should be exported. However, I
don't like the current representation of interrupt sets by "a
two's-complement representation of the bit set".
Michal> ........ [experimentation: looking up the package, interface ....]
11> (interrupt-in-set? (enabled-interrupts) interrupt/int)
Michal> Error: undefined variable
>> interrupt-in-set?
>> (package user)
12> ,open low-interrupt
Michal> Newly accessible in user: (interrupt-in-set?)
12>
12> (interrupt-in-set? (enabled-interrupts)
Michal> interrupt/int)
Michal> Scheme48 heap overflow
Michal> Process scheme exited abnormally with code 255
Michal> let's restart:
Michal> Welcome to scsh 0.6.1 (Combinatorial Algorithms)
Michal> Type ,? for help.
>>
>> ,open low-interrupt
>> (interrupt-in-set? (enabled-interrupts)
Michal> interrupt/int)
Michal> Scheme48 heap overflow
Michal> Process scheme exited abnormally with code 255
This is not a bug, you just confused the order of the
arguments. (enabled-interrupts) as a interrupt number and thereby an
index in a bit set is just too large for a 32 bit machine ;-)
--
Martin
|