mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:32:59 +00:00
- Compile csrss with intrinsics
- Remove the intrlck dependency svn path=/trunk/; revision=25671
This commit is contained in:
parent
ae8e954d79
commit
fa5cd6e23c
3 changed files with 6 additions and 5 deletions
|
@ -88,7 +88,7 @@ CsrReleaseObjectByPointer(Object_t *Object)
|
||||||
unsigned DefIndex;
|
unsigned DefIndex;
|
||||||
|
|
||||||
/* dec ref count */
|
/* dec ref count */
|
||||||
if (InterlockedDecrement(&Object->ReferenceCount) == 0)
|
if (_InterlockedDecrement(&Object->ReferenceCount) == 0)
|
||||||
{
|
{
|
||||||
Found = FALSE;
|
Found = FALSE;
|
||||||
for (DefIndex = 0; ! Found && DefIndex < ObjectDefinitionsCount; DefIndex++)
|
for (DefIndex = 0; ! Found && DefIndex < ObjectDefinitionsCount; DefIndex++)
|
||||||
|
@ -166,13 +166,13 @@ NTSTATUS STDCALL CsrInsertObject( PCSRSS_PROCESS_DATA ProcessData, PHANDLE Handl
|
||||||
RtlCopyMemory(Block,
|
RtlCopyMemory(Block,
|
||||||
ProcessData->HandleTable,
|
ProcessData->HandleTable,
|
||||||
ProcessData->HandleTableSize * sizeof(HANDLE));
|
ProcessData->HandleTableSize * sizeof(HANDLE));
|
||||||
Block = InterlockedExchangePointer(&ProcessData->HandleTable, Block);
|
Block = _InterlockedExchangePointer((volatile void*)&ProcessData->HandleTable, Block);
|
||||||
RtlFreeHeap( CsrssApiHeap, 0, Block );
|
RtlFreeHeap( CsrssApiHeap, 0, Block );
|
||||||
ProcessData->HandleTableSize += 64;
|
ProcessData->HandleTableSize += 64;
|
||||||
}
|
}
|
||||||
ProcessData->HandleTable[i] = Object;
|
ProcessData->HandleTable[i] = Object;
|
||||||
*Handle = (HANDLE)(((i + 1) << 2) | 0x3);
|
*Handle = (HANDLE)(((i + 1) << 2) | 0x3);
|
||||||
InterlockedIncrement( &Object->ReferenceCount );
|
_InterlockedIncrement( &Object->ReferenceCount );
|
||||||
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
|
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
|
||||||
return(STATUS_SUCCESS);
|
return(STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ NTSTATUS STDCALL CsrDuplicateHandleTable(PCSRSS_PROCESS_DATA SourceProcessData,
|
||||||
if (SourceProcessData->HandleTable[i])
|
if (SourceProcessData->HandleTable[i])
|
||||||
{
|
{
|
||||||
TargetProcessData->HandleTable[i] = SourceProcessData->HandleTable[i];
|
TargetProcessData->HandleTable[i] = SourceProcessData->HandleTable[i];
|
||||||
InterlockedIncrement( &SourceProcessData->HandleTable[i]->ReferenceCount );
|
_InterlockedIncrement( &SourceProcessData->HandleTable[i]->ReferenceCount );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RtlLeaveCriticalSection(&SourceProcessData->HandleTableLock);
|
RtlLeaveCriticalSection(&SourceProcessData->HandleTableLock);
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
#define NTOS_MODE_USER
|
#define NTOS_MODE_USER
|
||||||
#include <ndk/ntndk.h>
|
#include <ndk/ntndk.h>
|
||||||
|
|
||||||
|
#include <intrin.h>
|
||||||
|
|
||||||
/* Build Number */
|
/* Build Number */
|
||||||
#include <reactos/buildno.h>
|
#include <reactos/buildno.h>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
<define name="NTLPC" />
|
<define name="NTLPC" />
|
||||||
</if>
|
</if>
|
||||||
<library>nt</library>
|
<library>nt</library>
|
||||||
<library>intrlck</library>
|
|
||||||
<library>ntdll</library>
|
<library>ntdll</library>
|
||||||
<library>smdll</library>
|
<library>smdll</library>
|
||||||
<directory name="api">
|
<directory name="api">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue