Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
7c46763e
Commit
7c46763e
authored
Oct 10, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Oct 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement RtlIsCriticalSectionLocked[ByThread].
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b028f2c0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
1 deletion
+42
-1
critsection.c
dlls/ntdll/critsection.c
+37
-0
ntdll.spec
dlls/ntdll/ntdll.spec
+2
-0
rtl.c
dlls/ntdll/tests/rtl.c
+1
-1
winternl.h
include/winternl.h
+2
-0
No files found.
dlls/ntdll/critsection.c
View file @
7c46763e
...
...
@@ -610,6 +610,43 @@ BOOL WINAPI RtlTryEnterCriticalSection( RTL_CRITICAL_SECTION *crit )
/***********************************************************************
* RtlIsCriticalSectionLocked (NTDLL.@)
*
* Checks if the critical section is locked by any thread.
*
* PARAMS
* crit [I/O] Critical section to check.
*
* RETURNS
* Success: TRUE. The critical section is locked.
* Failure: FALSE. The critical section is not locked.
*/
BOOL
WINAPI
RtlIsCriticalSectionLocked
(
RTL_CRITICAL_SECTION
*
crit
)
{
return
crit
->
RecursionCount
!=
0
;
}
/***********************************************************************
* RtlIsCriticalSectionLockedByThread (NTDLL.@)
*
* Checks if the critical section is locked by the current thread.
*
* PARAMS
* crit [I/O] Critical section to check.
*
* RETURNS
* Success: TRUE. The critical section is locked.
* Failure: FALSE. The critical section is not locked.
*/
BOOL
WINAPI
RtlIsCriticalSectionLockedByThread
(
RTL_CRITICAL_SECTION
*
crit
)
{
return
crit
->
OwningThread
==
ULongToHandle
(
GetCurrentThreadId
())
&&
crit
->
RecursionCount
;
}
/***********************************************************************
* RtlLeaveCriticalSection (NTDLL.@)
*
* Leaves a critical section.
...
...
dlls/ntdll/ntdll.spec
View file @
7c46763e
...
...
@@ -719,6 +719,8 @@
# @ stub RtlIpv6StringToAddressExW
# @ stub RtlIpv6StringToAddressW
@ stdcall RtlIsActivationContextActive(ptr)
@ stdcall RtlIsCriticalSectionLocked(ptr)
@ stdcall RtlIsCriticalSectionLockedByThread(ptr)
@ stdcall RtlIsDosDeviceName_U(wstr)
@ stub RtlIsGenericTableEmpty
# @ stub RtlIsGenericTableEmptyAvl
...
...
dlls/ntdll/tests/rtl.c
View file @
7c46763e
...
...
@@ -2008,7 +2008,7 @@ static void test_RtlIsCriticalSectionLocked(void)
if
(
!
pRtlIsCriticalSectionLocked
||
!
pRtlIsCriticalSectionLockedByThread
)
{
skip
(
"skipping RtlIsCriticalSectionLocked tests, required functions not available
\n
"
);
win_
skip
(
"skipping RtlIsCriticalSectionLocked tests, required functions not available
\n
"
);
return
;
}
...
...
include/winternl.h
View file @
7c46763e
...
...
@@ -2483,6 +2483,8 @@ NTSYSAPI NTSTATUS WINAPI RtlInt64ToUnicodeString(ULONGLONG,ULONG,UNICODE_STRING
NTSYSAPI
NTSTATUS
WINAPI
RtlIntegerToChar
(
ULONG
,
ULONG
,
ULONG
,
PCHAR
);
NTSYSAPI
NTSTATUS
WINAPI
RtlIntegerToUnicodeString
(
ULONG
,
ULONG
,
UNICODE_STRING
*
);
NTSYSAPI
BOOLEAN
WINAPI
RtlIsActivationContextActive
(
HANDLE
);
NTSYSAPI
BOOL
WINAPI
RtlIsCriticalSectionLocked
(
RTL_CRITICAL_SECTION
*
);
NTSYSAPI
BOOL
WINAPI
RtlIsCriticalSectionLockedByThread
(
RTL_CRITICAL_SECTION
*
);
NTSYSAPI
ULONG
WINAPI
RtlIsDosDeviceName_U
(
PCWSTR
);
NTSYSAPI
BOOLEAN
WINAPI
RtlIsNameLegalDOS8Dot3
(
const
UNICODE_STRING
*
,
POEM_STRING
,
PBOOLEAN
);
NTSYSAPI
BOOLEAN
WINAPI
RtlIsTextUnicode
(
LPCVOID
,
INT
,
INT
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment