[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] chicken interupt handling
From: |
Jörg F . Wittenberger |
Subject: |
Re: [Chicken-users] chicken interupt handling |
Date: |
08 Sep 2011 13:40:28 +0200 |
On Sep 5 2011, John Cowan wrote:
Jörg F. Wittenberger scripsit:
But not being allowed to allocate memory in the signal handler was
still too much of a road block for me.
Unfortunately, that's what Posix says. If you look at the table at
Wait, no!
POSIX is concerned about the POSIX level of signals. Chicken runs
the signal handler later anyway. No POSIX restrictions apply.
Furthermore not being able to allocate memory, or for that matter
unblock a handler thread ("green" thread that is), that's not a POSIX
conforming restriction.
In fact I don't understand exactly why it is implemented that way.
That's why my "textbook solution" to defer the handler invocation
until gc is done was to easy to do.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03
you'll see a list of Posix functions that it's safe to call from a signal
handler, and malloc() and free(), or anything traditionally implemented
using either one, is not on that list. The reason is that most C
libraries don't have reentrant allocators.
- Re: [Chicken-users] Fwd: Re: process-wait, (continued)
- Re: [Chicken-users] Fwd: Re: process-wait, Jörg F . Wittenberger, 2011/09/02
- Re: [Chicken-users] Fwd: Re: process-wait, Jörg F . Wittenberger, 2011/09/02
- Re: [Chicken-users] Fwd: Re: process-wait, Jörg F . Wittenberger, 2011/09/03
- Re: [Chicken-users] Fwd: Re: process-wait, John Cowan, 2011/09/03
- Re: [Chicken-users] Fwd: Re: process-wait, Alan Post, 2011/09/03
- Re: [Chicken-users] Fwd: Re: process-wait, Jörg F . Wittenberger, 2011/09/03
- [Chicken-users] chicken interupt handling, Jörg F . Wittenberger, 2011/09/04
- Re: [Chicken-users] chicken interupt handling, Felix, 2011/09/05
- Re: [Chicken-users] chicken interupt handling, Jörg F . Wittenberger, 2011/09/05
- Re: [Chicken-users] chicken interupt handling, John Cowan, 2011/09/05
- Re: [Chicken-users] chicken interupt handling,
Jörg F . Wittenberger <=