Author: greatlrd
Date: Tue Nov 13 22:32:36 2007
New Revision: 30427
URL: http://svn.reactos.org/svn/reactos?rev=30427&view=rev
Log:
Bugfix : Do not assume unini value ( OPENGL32_tls ) are set to -1 (0xFFFFFFFF), do not assume DWORD always will be 32bits convert all 0xFFFFFFFF value for OPENGL32_tls to -1
Modified:
trunk/reactos/dll/win32/opengl32/opengl32.c
Modified: trunk/reactos/dll/win32/opengl32/opengl32.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/opengl32/opengl3…
==============================================================================
--- trunk/reactos/dll/win32/opengl32/opengl32.c (original)
+++ trunk/reactos/dll/win32/opengl32/opengl32.c Tue Nov 13 22:32:36 2007
@@ -29,7 +29,8 @@
/* global vars */
-DWORD OPENGL32_tls;
+/* Do not assume it have the free value -1 set, any value can be in here */
+DWORD OPENGL32_tls = -1;
GLPROCESSDATA OPENGL32_processdata;
@@ -110,7 +111,7 @@
TRUE /* bInheritHandle */ };
OPENGL32_tls = TlsAlloc();
- if (0xFFFFFFFF == OPENGL32_tls)
+ if (-1 == OPENGL32_tls)
return FALSE;
memset( &OPENGL32_processdata, 0, sizeof (OPENGL32_processdata) );
@@ -186,7 +187,7 @@
CloseHandle( OPENGL32_processdata.dcdata_mutex );
/* free TLS */
- if (OPENGL32_tls != 0xffffffff)
+ if (OPENGL32_tls != -1)
TlsFree(OPENGL32_tls);
}
Author: fireball
Date: Tue Nov 13 18:45:33 2007
New Revision: 30424
URL: http://svn.reactos.org/svn/reactos?rev=30424&view=rev
Log:
- Make file lock and unlock operations succeed without doing actual locking (enough to make some apps work even if they don't have proper locking). DPRINT1s are inserted, so that this is not going to be forgotten.
Modified:
trunk/reactos/ntoskrnl/fsrtl/filelock.c
Modified: trunk/reactos/ntoskrnl/fsrtl/filelock.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/filelock.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/filelock.c (original)
+++ trunk/reactos/ntoskrnl/fsrtl/filelock.c Tue Nov 13 18:45:33 2007
@@ -77,8 +77,34 @@
IN PVOID Context OPTIONAL,
IN BOOLEAN AlreadySynchronized)
{
- KEBUGCHECK(0);
- return FALSE;
+ NTSTATUS Status;
+
+ DPRINT1("FsRtlPrivateLock() is stubplemented!\n");
+
+ /* Initialize the lock, if necessary */
+ if (!FileLock->LockInformation)
+ {
+ DPRINT("LockInformation is uninitialized!\n");
+ }
+
+ /* Assume all is cool, and lock is set */
+ IoStatus->Status = STATUS_SUCCESS;
+
+ if (Irp)
+ {
+ /* Complete the request */
+ FsRtlCompleteLockIrpReal(FileLock->CompleteLockIrpRoutine,
+ Context,
+ Irp,
+ IoStatus->Status,
+ &Status,
+ FileObject);
+
+ /* Update the status */
+ IoStatus->Status = Status;
+ }
+
+ return TRUE;
}
/*
@@ -151,8 +177,9 @@
IN PVOID Context OPTIONAL,
IN BOOLEAN AlreadySynchronized)
{
- KEBUGCHECK(0);
- return STATUS_UNSUCCESSFUL;
+ DPRINT1("FsRtlFastUnlockSingle() is stubplemented!\n");
+
+ return STATUS_SUCCESS;
}
/*