From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: scm_current_time, scm_gettimeofday, SCM_DEFER_INTS Date: Tue, 26 Aug 2003 08:03:04 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <878yphcs4n.fsf@zip.com.au> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1061871943 26135 80.91.224.253 (26 Aug 2003 04:25:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 26 Aug 2003 04:25:43 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Aug 26 06:25:41 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19rVOn-0005qt-00 for ; Tue, 26 Aug 2003 06:25:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19rVMf-0002Vv-16 for guile-devel@m.gmane.org; Tue, 26 Aug 2003 00:23:29 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19rVDc-0006qb-3T for guile-devel@gnu.org; Tue, 26 Aug 2003 00:14:08 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19rV9u-0004D4-RU for guile-devel@gnu.org; Tue, 26 Aug 2003 00:10:51 -0400 Original-Received: from [61.8.0.36] (helo=snoopy.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.20) id 19rV7H-0002gq-Oz for guile-devel@gnu.org; Tue, 26 Aug 2003 00:07:36 -0400 Original-Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.4) with ESMTP id h7PM3Y0J022210 for ; Tue, 26 Aug 2003 08:03:34 +1000 Original-Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h7PM3Ykv011343 for ; Tue, 26 Aug 2003 08:03:34 +1000 (EST) Original-Received: from localhost (ppp74.dyn228.pacific.net.au [203.143.228.74]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h7PM3Gos003160 for ; Tue, 26 Aug 2003 08:03:25 +1000 (EST) Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19rPQW-0000l7-00; Tue, 26 Aug 2003 08:03:04 +1000 Original-To: guile-devel@gnu.org Mail-Copies-To: never User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2716 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2716 --=-=-= * stime.c (scm_current_time, scm_gettimeofday): Remove SCM_DEFER_INTS, time() and gettimeofday() should be thread safe and unaffected by temporary timezone changes. --=-=-= Content-Disposition: attachment; filename=stime.c.defer-time.diff --- stime.c.~1.79.~ 1970-01-01 10:00:00.000000000 +1000 +++ stime.c 2003-08-23 14:22:05.000000000 +1000 @@ -188,10 +188,8 @@ { timet timv; - SCM_DEFER_INTS; if ((timv = time (0)) == -1) SCM_SYSERROR; - SCM_ALLOW_INTS; return scm_long2num((long) timv); } #undef FUNC_NAME @@ -207,10 +205,8 @@ #ifdef HAVE_GETTIMEOFDAY struct timeval time; - SCM_DEFER_INTS; if (gettimeofday (&time, NULL) == -1) SCM_SYSERROR; - SCM_ALLOW_INTS; return scm_cons (scm_long2num ((long) time.tv_sec), scm_long2num ((long) time.tv_usec)); #else @@ -223,10 +219,8 @@ # else timet timv; - SCM_DEFER_INTS; if ((timv = time (0)) == -1) SCM_SYSERROR; - SCM_ALLOW_INTS; return scm_cons (scm_long2num (timv), SCM_MAKINUM (0)); # endif #endif --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel --=-=-=--