From: <cli...@li...> - 2009-01-30 12:08:06
|
Send clisp-cvs mailing list submissions to cli...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/clisp-cvs or, via email, send a message with subject or body 'help' to cli...@li... You can reach the person managing the list at cli...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of clisp-cvs digest..." CLISP CVS commits for today Today's Topics: 1. clisp/src ChangeLog,1.6804,1.6805 spvw.d,1.478,1.479 (Vladimir Tzankov) ---------------------------------------------------------------------- Message: 1 Date: Fri, 30 Jan 2009 00:51:50 +0000 From: Vladimir Tzankov <vt...@us...> Subject: clisp/src ChangeLog,1.6804,1.6805 spvw.d,1.478,1.479 To: cli...@li... Message-ID: <E1L...@dd...> Update of /cvsroot/clisp/clisp/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10982/src Modified Files: ChangeLog spvw.d Log Message: handle ualarm() failures when run in virtual machines Index: spvw.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/spvw.d,v retrieving revision 1.478 retrieving revision 1.479 diff -u -d -r1.478 -r1.479 --- spvw.d 18 Jan 2009 16:07:36 -0000 1.478 +++ spvw.d 30 Jan 2009 00:51:48 -0000 1.479 @@ -3880,7 +3880,7 @@ #endif #else #ifdef HAVE_SIGNALS - install_sigcld_handler(); /* TODO: probably not good. */ + install_sigcld_handler(); install_async_signal_handlers(); #endif #ifdef WIN32_NATIVE @@ -4500,12 +4500,15 @@ if (chain) { var struct timeval diff; timeval_subtract(&diff, chain->expire, &now); - if (diff.tv_sec > 10) { - /* if we have more that 10 secs - schedule for 10 sec. */ - ualarm(10000000,0); - } else { - ualarm(diff.tv_sec*1000000+diff.tv_usec,0); - } + useconds_t wait = + diff.tv_sec > 10 ? 10000000 : diff.tv_sec*1000000 + diff.tv_usec; + /* Under virtualization (tested on vmware and virtualbox) passing + more than a second causes ualarm() to return -1 and signal is + never delivered !!!. This is strange since according to POSIX no + errors are defined for ualarm. If this is the case - just ask for + something less than a second */ + if (ualarm(wait,0) == (useconds_t)-1) + ualarm(999999,0); } /* release the chain spinlock */ spinlock_release(&timeout_call_chain_lock); Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.6804 retrieving revision 1.6805 diff -u -d -r1.6804 -r1.6805 --- ChangeLog 29 Jan 2009 00:11:22 -0000 1.6804 +++ ChangeLog 30 Jan 2009 00:51:47 -0000 1.6805 @@ -1,3 +1,8 @@ +2009-01-30 Vladimir Tzankov <vtz...@gm...> + + * spvw.d (signal_handler_thread): handle ualarm() failures when run in + virtual machines (timer resolution is too low) + 2009-01-29 Vladimir Tzankov <vtz...@gm...> * spvw_memfile.d (find_memdump): ignore _per_thread_symvalues in the ------------------------------ ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ------------------------------ _______________________________________________ clisp-cvs mailing list cli...@li... https://lists.sourceforge.net/lists/listinfo/clisp-cvs End of clisp-cvs Digest, Vol 33, Issue 39 ***************************************** |