From 8ea7221511d3ca28d63f030cb276690417a76c4e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 20 Mar 2012 18:01:09 +0000 Subject: [PATCH] * ntdll.h (SharedUserData): Add volatile qualifier. This fixes a possible infinite loop in hires_ms::timeGetTime_ns. --- winsup/cygwin/ChangeLog | 10 ++++++++++ winsup/cygwin/include/cygwin/socket.h | 6 +++--- winsup/cygwin/ntdll.h | 7 ++++--- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7ce112a22..63d4c8b36 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,13 @@ +2012-03-20 Christian Franke + + * ntdll.h (SharedUserData): Add volatile qualifier. This fixes a + possible infinite loop in hires_ms::timeGetTime_ns. + +2012-03-20 Corinna Vinschen + + * include/cygwin/socket.h: Fix definitions of MCAST_INCLUDE and + MCAST_EXCLUDE. + 2012-03-20 Christopher Faylor * child_info.h (CURR_CHILD_INFO_MAGIC): Reset. diff --git a/winsup/cygwin/include/cygwin/socket.h b/winsup/cygwin/include/cygwin/socket.h index 0f099241a..41c2eb5f8 100644 --- a/winsup/cygwin/include/cygwin/socket.h +++ b/winsup/cygwin/include/cygwin/socket.h @@ -1,6 +1,6 @@ /* cygwin/socket.h - Copyright 1999, 2000, 2001, 2005, 2006, 2007, 2009, 2010 Red Hat, Inc. + Copyright 1999, 2000, 2001, 2005, 2006, 2007, 2009, 2010, 2012 Red Hat, Inc. This file is part of Cygwin. @@ -269,8 +269,8 @@ struct OLD_msghdr #define MCAST_JOIN_SOURCE_GROUP 45 #define MCAST_LEAVE_SOURCE_GROUP 46 -#define MCAST_EXCLUDE 0 -#define MCAST_INCLUDE 1 +#define MCAST_INCLUDE 0 +#define MCAST_EXCLUDE 1 /* Old WinSock1 values, needed internally */ #ifdef __INSIDE_CYGWIN__ diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index d921867bd..7eee720aa 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -1106,9 +1106,10 @@ typedef VOID (APIENTRY *PTIMER_APC_ROUTINE)(PVOID, ULONG, ULONG); #ifdef __cplusplus /* This is the mapping of the KUSER_SHARED_DATA structure into the 32 bit - user address space. We need it here to access the current DismountCount. */ -static KUSER_SHARED_DATA &SharedUserData - = *(volatile PKUSER_SHARED_DATA) 0x7ffe0000; + user address space. We need it here to access the current DismountCount + and InterruptTime. */ +static volatile KUSER_SHARED_DATA &SharedUserData + = *(volatile KUSER_SHARED_DATA *) 0x7ffe0000; extern "C" { -- 2.43.5