Subject: Re: JDK status (was: Re: Netscape on macppc: it works!)
To: Todd Vierling <tv@wasabisystems.com>
From: Emmanuel Dreyfus <p99dreyf@criens.u-psud.fr>
List: port-macppc
Date: 03/03/2001 17:12:49
[kernel support for sigsetjmp/siglongjmp]
> Typically they end up in sigreturn() or something similar in order to do
> stack and other context switching goo.  (In particular, I belive
> siglongjmp() does this.)

I tried this, and ktrace shows no system call neither for sigsetjmp nor
for siglongjmp. This is true for both native NetBSD/PowerPC and for
Linux emulation on NetBSD/PowerPC

#include <setjmp.h>
#include <stdio.h>

void g(void);

jmp_buf env;
int i = 0;
int savemask;

int main (int argc, char* argv) {
        if (sigsetjmp(env, savemask) != 0) {
                 (void) printf("2nd return from setjmp: i = %d\n", i);
                exit(0);
        }
        (void)  printf("1st return from setjmp: i = %d\n", i);
        i = 1;
        g();
        /*NOTREACHED*/
}

void g(void) {
        siglongjmp(env, 1);
        /*NOTREACHED*/
}

-- 
Emmanuel Dreyfus
- Quel est le meilleur moyen d'accelerer un PC?
- 9,81 m/s^2
p99dreyf@criens.u-psud.fr