mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 00:31:27 +00:00
- Sync 36654 to trunk
svn path=/trunk/; revision=37149
This commit is contained in:
parent
174ffe7d8c
commit
d14b6b0318
3 changed files with 89 additions and 5 deletions
|
@ -113,6 +113,33 @@ ExEnumHandleTable(
|
||||||
OUT PHANDLE Handle OPTIONAL
|
OUT PHANDLE Handle OPTIONAL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Resource Functions
|
||||||
|
//
|
||||||
|
PVOID
|
||||||
|
NTAPI
|
||||||
|
ExEnterCriticalRegionAndAcquireResourceExclusive(
|
||||||
|
IN PERESOURCE Resource
|
||||||
|
);
|
||||||
|
|
||||||
|
PVOID
|
||||||
|
NTAPI
|
||||||
|
ExEnterCriticalRegionAndAcquireResourceShared(
|
||||||
|
IN PERESOURCE Resource
|
||||||
|
);
|
||||||
|
|
||||||
|
PVOID
|
||||||
|
NTAPI
|
||||||
|
ExEnterCriticalRegionAndAcquireSharedWaitForExclusive(
|
||||||
|
IN PERESOURCE Resource
|
||||||
|
);
|
||||||
|
|
||||||
|
VOID
|
||||||
|
FASTCALL
|
||||||
|
ExReleaseResourceAndLeaveCriticalRegion(
|
||||||
|
IN PERESOURCE Resource
|
||||||
|
);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -2198,6 +2198,66 @@ ExEnterCriticalRegionAndAcquireResourceExclusive(IN PERESOURCE Resource)
|
||||||
return KeGetCurrentThread()->Win32Thread;
|
return KeGetCurrentThread()->Win32Thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*++
|
||||||
|
* @name ExEnterCriticalRegionAndAcquireResourceShared
|
||||||
|
* @implemented NT5.2
|
||||||
|
*
|
||||||
|
* The ExEnterCriticalRegionAndAcquireResourceShared routine
|
||||||
|
* enters a critical region and then acquires a resource shared.
|
||||||
|
*
|
||||||
|
* @param Resource
|
||||||
|
* Pointer to the resource to acquire.
|
||||||
|
*
|
||||||
|
* @return Pointer to the Win32K thread pointer of the current thread.
|
||||||
|
*
|
||||||
|
* @remarks See ExAcquireResourceSharedLite.
|
||||||
|
*
|
||||||
|
*--*/
|
||||||
|
PVOID
|
||||||
|
NTAPI
|
||||||
|
ExEnterCriticalRegionAndAcquireResourceShared(IN PERESOURCE Resource)
|
||||||
|
{
|
||||||
|
/* Enter critical region */
|
||||||
|
KeEnterCriticalRegion();
|
||||||
|
|
||||||
|
/* Acquire the resource */
|
||||||
|
ExAcquireResourceSharedLite(Resource, TRUE);
|
||||||
|
|
||||||
|
/* Return the Win32 Thread */
|
||||||
|
return KeGetCurrentThread()->Win32Thread;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*++
|
||||||
|
* @name ExEnterCriticalRegionAndAcquireSharedWaitForExclusive
|
||||||
|
* @implemented NT5.2
|
||||||
|
*
|
||||||
|
* The ExEnterCriticalRegionAndAcquireSharedWaitForExclusive routine
|
||||||
|
* enters a critical region and then acquires a resource shared if
|
||||||
|
* shared access can be granted and there are no exclusive waiters.
|
||||||
|
* It then acquires the resource exclusively.
|
||||||
|
*
|
||||||
|
* @param Resource
|
||||||
|
* Pointer to the resource to acquire.
|
||||||
|
*
|
||||||
|
* @return Pointer to the Win32K thread pointer of the current thread.
|
||||||
|
*
|
||||||
|
* @remarks See ExAcquireSharedWaitForExclusive.
|
||||||
|
*
|
||||||
|
*--*/
|
||||||
|
PVOID
|
||||||
|
NTAPI
|
||||||
|
ExEnterCriticalRegionAndAcquireSharedWaitForExclusive(IN PERESOURCE Resource)
|
||||||
|
{
|
||||||
|
/* Enter critical region */
|
||||||
|
KeEnterCriticalRegion();
|
||||||
|
|
||||||
|
/* Acquire the resource */
|
||||||
|
ExAcquireSharedWaitForExclusive(Resource, TRUE);
|
||||||
|
|
||||||
|
/* Return the Win32 Thread */
|
||||||
|
return KeGetCurrentThread()->Win32Thread;
|
||||||
|
}
|
||||||
|
|
||||||
/*++
|
/*++
|
||||||
* @name ExReleaseResourceAndLeaveCriticalRegion
|
* @name ExReleaseResourceAndLeaveCriticalRegion
|
||||||
* @implemented NT5.1
|
* @implemented NT5.1
|
||||||
|
@ -2223,6 +2283,3 @@ ExReleaseResourceAndLeaveCriticalRegion(IN PERESOURCE Resource)
|
||||||
/* Leave critical region */
|
/* Leave critical region */
|
||||||
KeLeaveCriticalRegion();
|
KeLeaveCriticalRegion();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
|
||||||
|
|
||||||
|
|
|
@ -80,8 +80,8 @@
|
||||||
@ stdcall ExDisableResourceBoostLite(ptr)
|
@ stdcall ExDisableResourceBoostLite(ptr)
|
||||||
@ fastcall ExEnterCriticalRegionAndAcquireFastMutexUnsafe(ptr)
|
@ fastcall ExEnterCriticalRegionAndAcquireFastMutexUnsafe(ptr)
|
||||||
@ stdcall ExEnterCriticalRegionAndAcquireResourceExclusive(ptr)
|
@ stdcall ExEnterCriticalRegionAndAcquireResourceExclusive(ptr)
|
||||||
;ExEnterCriticalRegionAndAcquireResourceShared
|
@ stdcall ExEnterCriticalRegionAndAcquireResourceShared(ptr)
|
||||||
;ExEnterCriticalRegionAndAcquireSharedWaitForExclusive
|
@ stdcall ExEnterCriticalRegionAndAcquireSharedWaitForExclusive(ptr)
|
||||||
@ stdcall ExEnumHandleTable(ptr ptr ptr ptr)
|
@ stdcall ExEnumHandleTable(ptr ptr ptr ptr)
|
||||||
@ extern ExEventObjectType _ExEventObjectType
|
@ extern ExEventObjectType _ExEventObjectType
|
||||||
@ stdcall ExExtendZone(ptr ptr long)
|
@ stdcall ExExtendZone(ptr ptr long)
|
||||||
|
|
Loading…
Reference in a new issue