[ros-diffs] [janderwald] 25671: - Compile csrss with intrinsics - Remove the intrlck dependency

janderwald at svn.reactos.org janderwald at svn.reactos.org
Thu Feb 1 22:44:23 CET 2007


Author: janderwald
Date: Fri Feb  2 00:44:23 2007
New Revision: 25671

URL: http://svn.reactos.org/svn/reactos?rev=25671&view=rev
Log:
- Compile csrss with intrinsics
- Remove the intrlck dependency

Modified:
    trunk/reactos/subsystems/win32/csrss/api/handle.c
    trunk/reactos/subsystems/win32/csrss/csrss.h
    trunk/reactos/subsystems/win32/csrss/csrss.rbuild

Modified: trunk/reactos/subsystems/win32/csrss/api/handle.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/api/handle.c?rev=25671&r1=25670&r2=25671&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/api/handle.c (original)
+++ trunk/reactos/subsystems/win32/csrss/api/handle.c Fri Feb  2 00:44:23 2007
@@ -88,7 +88,7 @@
   unsigned DefIndex;
 
   /* dec ref count */
-  if (InterlockedDecrement(&Object->ReferenceCount) == 0)
+  if (_InterlockedDecrement(&Object->ReferenceCount) == 0)
     {
       Found = FALSE;
       for (DefIndex = 0; ! Found && DefIndex < ObjectDefinitionsCount; DefIndex++)
@@ -166,13 +166,13 @@
        RtlCopyMemory(Block,
 		     ProcessData->HandleTable,
 		     ProcessData->HandleTableSize * sizeof(HANDLE));
-       Block = InterlockedExchangePointer(&ProcessData->HandleTable, Block);
+       Block = _InterlockedExchangePointer((volatile void*)&ProcessData->HandleTable, Block);
        RtlFreeHeap( CsrssApiHeap, 0, Block );
        ProcessData->HandleTableSize += 64;
      }
    ProcessData->HandleTable[i] = Object;
    *Handle = (HANDLE)(((i + 1) << 2) | 0x3);
-   InterlockedIncrement( &Object->ReferenceCount );
+   _InterlockedIncrement( &Object->ReferenceCount );
    RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
    return(STATUS_SUCCESS);
 }
@@ -207,7 +207,7 @@
         if (SourceProcessData->HandleTable[i])
         {
             TargetProcessData->HandleTable[i] = SourceProcessData->HandleTable[i];
-            InterlockedIncrement( &SourceProcessData->HandleTable[i]->ReferenceCount );
+            _InterlockedIncrement( &SourceProcessData->HandleTable[i]->ReferenceCount );
         }
     }
    RtlLeaveCriticalSection(&SourceProcessData->HandleTableLock);

Modified: trunk/reactos/subsystems/win32/csrss/csrss.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csrss.h?rev=25671&r1=25670&r2=25671&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrss.h (original)
+++ trunk/reactos/subsystems/win32/csrss/csrss.h Fri Feb  2 00:44:23 2007
@@ -4,6 +4,8 @@
 #include <windows.h>
 #define NTOS_MODE_USER
 #include <ndk/ntndk.h>
+
+#include <intrin.h>
 
 /* Build Number */
 #include <reactos/buildno.h>

Modified: trunk/reactos/subsystems/win32/csrss/csrss.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csrss.rbuild?rev=25671&r1=25670&r2=25671&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrss.rbuild (original)
+++ trunk/reactos/subsystems/win32/csrss/csrss.rbuild Fri Feb  2 00:44:23 2007
@@ -10,7 +10,6 @@
         <define name="NTLPC" />
     </if>
 	<library>nt</library>
-	<library>intrlck</library>
 	<library>ntdll</library>
 	<library>smdll</library>
 	<directory name="api">




More information about the Ros-diffs mailing list