From 6db98ac6f10cd774ba280f7ba79fac281e7ca217 Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Wed, 31 Jul 1991 14:37:20 +0000 Subject: [PATCH] Fix UX_times problem in OS_real_time_clock. --- v7/src/microcode/uxenv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/v7/src/microcode/uxenv.c b/v7/src/microcode/uxenv.c index e5f7188c4..ddb92eb70 100644 --- a/v7/src/microcode/uxenv.c +++ b/v7/src/microcode/uxenv.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxenv.c,v 1.4 1991/07/24 01:29:29 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxenv.c,v 1.5 1991/07/31 14:37:20 jinx Exp $ Copyright (c) 1990-91 Massachusetts Institute of Technology @@ -139,7 +139,11 @@ DEFUN_VOID (OS_real_time_clock) clock_t ct = (UX_SC_CLK_TCK ()); struct tms buffer; clock_t t; - STD_UINT_SYSTEM_CALL (syscall_times, t, (UX_times (&buffer))); + /* Was STD_UINT_SYSTEM_CALL, but at least one version of Ultrix + returns negative numbers other than -1 when there are no errors. */ + while ((t = (UX_times (&buffer))) == (-1)) + if (errno != EINTR) + error_system_call (errno, syscall_times); return ((((t - initial_rtc) * 2000) + ct) / (2 * ct)); } -- 2.25.1