From ff2d706fb51227e97b4b20bd3a6139f205213359 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Mon, 11 Nov 2013 02:35:06 +0000 Subject: [PATCH] [NTVDM]: Fix CMOS file sharing access (so that we allow multiple ntvdm running with the same cmos data). svn path=/branches/ntvdm/; revision=60934 --- subsystems/ntvdm/cmos.c | 4 ++-- subsystems/ntvdm/cmos.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/subsystems/ntvdm/cmos.c b/subsystems/ntvdm/cmos.c index f982bb3ac84..8b1bbceac28 100644 --- a/subsystems/ntvdm/cmos.c +++ b/subsystems/ntvdm/cmos.c @@ -366,11 +366,11 @@ BOOLEAN CmosInitialize(VOID) /* Clear the CMOS memory */ ZeroMemory(&CmosMemory, sizeof(CmosMemory)); - /* Always open (and if needed, create) a RAM file with exclusive access */ + /* Always open (and if needed, create) a RAM file with shared access */ SetLastError(0); // For debugging purposes hCmosRam = CreateFileW(L"cmos.ram", GENERIC_READ | GENERIC_WRITE, - 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, diff --git a/subsystems/ntvdm/cmos.h b/subsystems/ntvdm/cmos.h index 6caec7b01f1..807e4e32cee 100644 --- a/subsystems/ntvdm/cmos.h +++ b/subsystems/ntvdm/cmos.h @@ -77,6 +77,8 @@ typedef enum _CMOS_REGISTERS * See the following documentation for more information: * http://www.intel-assembler.it/portale/5/cmos-memory-map-123/cmos-memory-map-123.asp * http://wiki.osdev.org/CMOS + * http://www.walshcomptech.com/ohlandl/config/cmos_registers.html + * http://www.fysnet.net/cmosinfo.htm * http://www.bioscentral.com/misc/cmosmap.htm */ #pragma pack(push, 1) -- 2.17.1