From 9afd62035da781127f09672a85cd363e6aecc44f Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Tue, 18 Sep 2012 17:48:11 +0100 Subject: [PATCH] Minor fixups from 001e9f8966 --- pod/perldelta.pod | 4 ++-- pod/perlport.pod | 4 +--- win32/win32.c | 15 ++++++++------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/pod/perldelta.pod b/pod/perldelta.pod index a06ea12..e698041 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -643,8 +643,8 @@ Fixed a problem where perl could crash while cleaning up threads (including the main thread) in threaded debugging builds on Win32 and possibly other platforms [perl #114496]. -A rare race condition that would lead to L -taking more time than requested, and upto a hang has been fixed [perl #33096]. +A rare race condition that would lead to L taking more +time than requested, and possibly even hanging, has been fixed [perl #33096]. =item Solaris diff --git a/pod/perlport.pod b/pod/perlport.pod index 839468b..6be7487 100644 --- a/pod/perlport.pod +++ b/pod/perlport.pod @@ -1923,9 +1923,7 @@ Not implemented. (Win32, VMS, S, VOS) =item sleep -On Win32 C is limited to a maximum of 4294967 seconds, approximately 49 -days, and also signals do not cause C to return early once a signal -fires. C will always wait the full time period before returning. +Limited to a maximum of 4294967 seconds, approximately 49 days. (Win32) =item sockatmark diff --git a/win32/win32.c b/win32/win32.c index 47127d9..0a13ecd 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -2239,10 +2239,11 @@ win32_msgwait(pTHX_ DWORD count, LPHANDLE handles, DWORD timeout, LPDWORD result * causes msctf.dll to be loaded into Perl by kernel), see [perl #33096]. */ while (ticks.ft_i64 <= endtime) { - /* if timeout's type is lengthened, remember to split 64b timeout - * into multiple non-infinity runs of MWFMO */ - DWORD result = MsgWaitForMultipleObjects(count,handles,FALSE,(DWORD)(endtime-ticks.ft_i64) - , QS_POSTMESSAGE|QS_TIMER|QS_SENDMESSAGE); + /* if timeout's type is lengthened, remember to split 64b timeout + * into multiple non-infinity runs of MWFMO */ + DWORD result = MsgWaitForMultipleObjects(count, handles, FALSE, + (DWORD)(endtime - ticks.ft_i64), + QS_POSTMESSAGE|QS_TIMER|QS_SENDMESSAGE); if (resultp) *resultp = result; if (result == WAIT_TIMEOUT) { @@ -2265,12 +2266,12 @@ win32_msgwait(pTHX_ DWORD count, LPHANDLE handles, DWORD timeout, LPDWORD result } } /* If we are past the end say zero */ - if(!ticks.ft_i64 || ticks.ft_i64 > endtime) + if (!ticks.ft_i64 || ticks.ft_i64 > endtime) return 0; /* compute time left to wait */ ticks.ft_i64 = endtime - ticks.ft_i64; - /*if more ms than DWORD, then return max DWORD*/ - return ticks.ft_i64 <= UINT_MAX ? (DWORD)ticks.ft_i64:UINT_MAX; + /* if more ms than DWORD, then return max DWORD */ + return ticks.ft_i64 <= UINT_MAX ? (DWORD)ticks.ft_i64 : UINT_MAX; } int -- 2.7.4