mirror of
https://github.com/reactos/reactos.git
synced 2025-01-13 01:22:03 +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;
|
||||
|
||||
/* 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 @@ NTSTATUS STDCALL CsrInsertObject( PCSRSS_PROCESS_DATA ProcessData, PHANDLE Handl
|
|||
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 @@ NTSTATUS STDCALL CsrDuplicateHandleTable(PCSRSS_PROCESS_DATA SourceProcessData,
|
|||
if (SourceProcessData->HandleTable[i])
|
||||
{
|
||||
TargetProcessData->HandleTable[i] = SourceProcessData->HandleTable[i];
|
||||
InterlockedIncrement( &SourceProcessData->HandleTable[i]->ReferenceCount );
|
||||
_InterlockedIncrement( &SourceProcessData->HandleTable[i]->ReferenceCount );
|
||||
}
|
||||
}
|
||||
RtlLeaveCriticalSection(&SourceProcessData->HandleTableLock);
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#define NTOS_MODE_USER
|
||||
#include <ndk/ntndk.h>
|
||||
|
||||
#include <intrin.h>
|
||||
|
||||
/* Build Number */
|
||||
#include <reactos/buildno.h>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<define name="NTLPC" />
|
||||
</if>
|
||||
<library>nt</library>
|
||||
<library>intrlck</library>
|
||||
<library>ntdll</library>
|
||||
<library>smdll</library>
|
||||
<directory name="api">
|
||||
|
|
Loading…
Reference in a new issue