Author: hbelusca
Date: Mon Nov 11 02:35:06 2013
New Revision: 60934

URL: http://svn.reactos.org/svn/reactos?rev=60934&view=rev
Log:
[NTVDM]: Fix CMOS file sharing access (so that we allow multiple ntvdm running 
with the same cmos data).

Modified:
    branches/ntvdm/subsystems/ntvdm/cmos.c
    branches/ntvdm/subsystems/ntvdm/cmos.h

Modified: branches/ntvdm/subsystems/ntvdm/cmos.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/cmos.c?rev=60934&r1=60933&r2=60934&view=diff
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/cmos.c      [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/cmos.c      [iso-8859-1] Mon Nov 11 
02:35:06 2013
@@ -366,11 +366,11 @@
     /* 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,

Modified: branches/ntvdm/subsystems/ntvdm/cmos.h
URL: 
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/cmos.h?rev=60934&r1=60933&r2=60934&view=diff
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/cmos.h      [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/cmos.h      [iso-8859-1] Mon Nov 11 
02:35:06 2013
@@ -77,6 +77,8 @@
  * 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)


Reply via email to