summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2012-09-18 17:48:11 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2012-09-18 17:48:11 +0100
commit9afd62035da781127f09672a85cd363e6aecc44f (patch)
treee7d6bc215182961aaa3c921ab8e5fa4538aa5948
parent001e9f8966c22ce5f6e43f663bffdffb73bf623c (diff)
downloadperl-9afd62035da781127f09672a85cd363e6aecc44f.tar.gz
Minor fixups from 001e9f8966
-rw-r--r--pod/perldelta.pod4
-rw-r--r--pod/perlport.pod4
-rw-r--r--win32/win32.c15
3 files changed, 11 insertions, 12 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index a06ea1291b..e698041dcf 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<sleep|perlfunc/sleep>
-taking more time than requested, and upto a hang has been fixed [perl #33096].
+A rare race condition that would lead to L<sleep|perlfunc/sleep> 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 839468b62c..6be7487c3d 100644
--- a/pod/perlport.pod
+++ b/pod/perlport.pod
@@ -1923,9 +1923,7 @@ Not implemented. (Win32, VMS, S<RISC OS>, VOS)
=item sleep
-On Win32 C<sleep> is limited to a maximum of 4294967 seconds, approximately 49
-days, and also signals do not cause C<sleep> to return early once a signal
-fires. C<sleep> 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 47127d9a19..0a13ecd271 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