Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/common Modified Files: evas_cpu.c Log Message: fix detect for k6 cpu's =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_cpu.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- evas_cpu.c 28 Mar 2005 02:27:16 -0000 1.21 +++ evas_cpu.c 3 Apr 2005 15:31:35 -0000 1.22 @@ -7,19 +7,26 @@ #include <setjmp.h> #ifndef WIN32 -static sigjmp_buf detect_buf; +static sigjmp_buf detect_buf, detect_buf2; #endif static int cpu_feature_mask = 0; #ifndef WIN32 static void evas_common_cpu_catch_ill(int sig); +static void evas_common_cpu_catch_segv(int sig); static void evas_common_cpu_catch_ill(int sig) { siglongjmp(detect_buf, 1); } + +static void +evas_common_cpu_catch_segv(int sig) +{ + siglongjmp(detect_buf2, 1); +} #endif void @@ -76,7 +83,7 @@ { #ifndef WIN32 int enabled = 1; - struct sigaction act, oact; + struct sigaction act, oact, oact2; act.sa_handler = evas_common_cpu_catch_ill; act.sa_flags = SA_RESTART; @@ -87,8 +94,21 @@ sigaction(SIGILL, &oact, NULL); return 0; } + act.sa_handler = evas_common_cpu_catch_segv; + act.sa_flags = SA_RESTART; + sigemptyset(&act.sa_mask); + sigaction(SIGSEGV, &act, &oact2); + if (sigsetjmp(detect_buf2, 1)) + { + sigaction(SIGILL, &oact, NULL); + sigaction(SIGSEGV, &oact2, NULL); + return 0; + } + feature(); + sigaction(SIGILL, &oact, NULL); + sigaction(SIGSEGV, &oact2, NULL); return enabled; #else return 0; ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs