chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Change setjmp/longjmp to _setjmp/_longjmp


From: Felix
Subject: Re: [Chicken-hackers] [PATCH] Change setjmp/longjmp to _setjmp/_longjmp to avoid overhead and fix signal masking bug
Date: Sat, 07 Jul 2012 22:44:39 +0200 (CEST)

From: Peter Bex <address@hidden>
Subject: Re: [Chicken-hackers] [PATCH] Change setjmp/longjmp to 
_setjmp/_longjmp to avoid overhead and fix signal masking bug
Date: Sat, 7 Jul 2012 22:04:32 +0200

> On Fri, Jun 15, 2012 at 12:45:28PM +0200, Felix wrote:
>> > Other than figuring that out, it would be a good idea to test on mingw
>> > and OS X (I was going to do this).  However testing on other platforms
>> > like cygwin or Solaris (or more obscure?) is problematic.  It is not
>> > really a question of whether _setjmp works but if every platform supports
>> > _setjmp.  I don't know if this is something to throw in before the
>> > release, if one is coming soon, unless we are going to test every
>> > supported platform before release.  Anyone else?
>> 
>> Changing this IMHO should be postponed until we have a new release.
> 
> After some more consideration, I think the signal mask reset bug warrants
> fixing it before the next release.  Attached is a better patch which
> tries to avoid using fringe POSIX functions and instead simply using
> sigsetjmp()/siglongjmp() on platforms where we know they are supported.
> 
> After asking on #chicken, "creidiki" tried the old patch on Windows and
> mentioned it didn't compile due to an undeclared function _longjmp
> (oddly, _setjmp *does* seem to exist...) so I haven't added sigsetjmp
> to Windows either.  In any case, Windows doesn't have POSIX signals
> anyway so it doesn't matter which flavor of "*jmp" we use there.
> 
> If someone using, say, Solaris or Haiku figures that sigsetjmp is
> supported on their platform after all, it's a simple matter of adding
> the define to Makefile.solaris or Makefile.haiku.  At least this way
> it gets fixed on platforms that are known to have the signal problem.
> 

Pushed.


cheers,
felix



reply via email to

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