Re: [Chicken-users] replace signal with sigaction

2011-09-30 Thread Jörg F . Wittenberger
There is one thing about the modified signaling: I now can better see from the signal handler what all the thread states are. The bad (good actually, wild guesses before) news: it *is* possible to end up with the current thread state as "blocked". However I just found out, and the thread which i

Re: [Chicken-users] replace signal with sigaction

2011-09-30 Thread Jörg F . Wittenberger
On Sep 30 2011, Alan Post wrote: Thank you for this. I notice, right away, that your io_needs_restart handles EAGAIN in the same way it handles EINTR. I have always introduced a timeout when I get an EAGAIN, and I give up after say 3 tries. While I can follow the reasoning, it might not (or

Re: [Chicken-users] remove enable/disable interrupt flag

2011-09-30 Thread alaric
>> AIUI mmap of /dev/zero (to allocate more >> empty heap) can't block on very much... >I don't think you can mmap a > device, can you? Sure you can! Mmapping /dev/zero gets you zeroed writable pages and, last I looked, is how the heap is obtained. Devices representing frame buffers support m

Re: [Chicken-users] replace signal with sigaction

2011-09-30 Thread Jörg F . Wittenberger
On Sep 30 2011, Jörg F. Wittenberger wrote: Alan, I figured that you did almost have you for the process-io-ports code I cited the other day. Alan, another warning: I just fixed a case of EINTR, where the code shows strong heritage from the tcp unit. (I wrote some parallel code base on it,

Re: [Chicken-users] replace signal with sigaction

2011-09-30 Thread Alan Post
Thank you for this. I notice, right away, that your io_needs_restart handles EAGAIN in the same way it handles EINTR. I have always introduced a timeout when I get an EAGAIN, and I give up after say 3 tries. My use case here: Let's say fork() returns EAGAIN. This could happen because ulimit ha

Re: [Chicken-users] replace signal with sigaction

2011-09-30 Thread Jörg F . Wittenberger
Alan, I figured that you did almost have you for the process-io-ports code I cited the other day. It might make your live easier, if I just post the code as I'm using it right now. Be warned: it does one thing NOT. When there is a bad fd encountered while reading/writing to a fd, the read/writ

Re: [Chicken-users] replace signal with sigaction

2011-09-30 Thread Jörg F . Wittenberger
On Sep 30 2011, Jörg F. Wittenberger wrote: ;; Now a tentatively replacement for process-wait. I'm not using ;; That anywhere. Falls back to the state of affairs in pid=0 (define (alt-process-wait pid nohang) (if (<= pid 0) (process-wait pid nohang (if nohang (process-te

Re: [Chicken-users] remove enable/disable interrupt flag

2011-09-30 Thread John Cowan
Alan Post scripsit: > I was misremembering a statement from APUE (Advanced Programming in > the Unix Environment), which talks about signal queuing being > *permitted* by Posix, but not required. And no one does it. Yes. I was confusing the conventional signals with the real-time signal interfa

Re: [Chicken-users] remove enable/disable interrupt flag

2011-09-30 Thread Jörg F . Wittenberger
On Sep 30 2011, Alan Post wrote: I think your point about signal being a wrapper around sigaction deserves to be repeated: it's my understanding too, and means that as it stands, my sigaction patch is essentially or completely a no-op on most platforms. Jerry's experience with it confusingly no

Re: [Chicken-users] replace signal with sigaction

2011-09-30 Thread Jörg F . Wittenberger
Now let's see how we can use those modifications. This code is far from what I'd like it to be. It starts out with the idea, that it tries to resemble the process-wait API as it stands. However in the presence of green threads I feel that the API is not the best we could have. This translates

Re: [Chicken-users] remove enable/disable interrupt flag

2011-09-30 Thread Alan Post
> > Your other points about multiple signals sugget it should be a proper > > queue, not just a bitmask. Although I have a vague feeling that Unix was > > allowed to coalesce pending signals as it just used a bitmask itself... > > In the old days, yes. Now signals have guaranteed delivery, at lea

Re: [Chicken-users] remove enable/disable interrupt flag

2011-09-30 Thread Alan Post
On Fri, Sep 30, 2011 at 09:30:13AM +0100, Alaric Snell-Pym wrote: > Your other points about multiple signals sugget it should be a proper > queue, not just a bitmask. Although I have a vague feeling that Unix was > allowed to coalesce pending signals as it just used a bitmask itself... > Meh, I dun

Re: [Chicken-users] remove enable/disable interrupt flag

2011-09-30 Thread John Cowan
Alaric Snell-Pym scripsit: > Yeah. We need to make sure that Chicken's stack limit (which triggers a > GC) is sufficiently clear of the real stack limit to give us legroom for > any fun and games that may occur in the runtime. The chance of a stack blowup is essentially nil. Chicken, the last ti

[Chicken-users] tests/match-tests.scm

2011-09-30 Thread Jörg F . Wittenberger
the file is mentioned in distribution/manifest but not in the directory ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users

Re: [Chicken-users] location of chicken.h

2011-09-30 Thread Christian Kellermann
* Sven Hartrumpf [110930 12:20]: > Hi all. > > Why does "chicken-install silex" wants to include chicken.h, although current > chicken versions install only chicken/chicken.h ? I have just installed silex via chicken-install from kitten technologies without problems. This has been done on a linu

[Chicken-users] location of chicken.h

2011-09-30 Thread Sven Hartrumpf
Hi all. Why does "chicken-install silex" wants to include chicken.h, although current chicken versions install only chicken/chicken.h ? > chicken-install silex retrieving ... connecting to host "chicken.kitten-technologies.co.uk", port 80 ... ... installing silex: ... changing current directory

Re: [Chicken-users] remove enable/disable interrupt flag

2011-09-30 Thread Alaric Snell-Pym
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/29/2011 05:24 PM, Alan Post wrote: [signal near stack limit] > The Minix source code is illustrative on this point. I think a > program being near the stack limit when a signal arrives is the only > time in that operating system that a process

Re: [Chicken-users] valgrind

2011-09-30 Thread Alex Queiroz
Hallo, On Thu, Sep 29, 2011 at 10:25 PM, Jörg F. Wittenberger wrote: > > The pattern is to allocate some space on the stack, fill stuff in, > eventually jump to the continuation.  GC will only happen during the > jump, not within the time between allocation and assignment of initial > values.  (B