Rebase against 158a9e738421cd16f2e8296f11baa724c64c8ca7.

This commit is contained in:
Zebediah Figura 2021-01-21 17:44:50 -06:00
parent 310072bb63
commit 64877514fb
10 changed files with 157 additions and 196 deletions

View File

@ -1,4 +1,4 @@
From 6242434571910c686887b51cbbee8f6cb9b83389 Mon Sep 17 00:00:00 2001
From 73b91ff2ff705bf35d9603a6446b424af90fb199 Mon Sep 17 00:00:00 2001
From: Lucian Poston <lucianposton@pm.me>
Date: Wed, 23 May 2018 00:01:42 -0700
Subject: [PATCH] dwrite: Test GetMetrics with custom fontcollection
@ -9,10 +9,10 @@ Signed-off-by: Lucian Poston <lucianposton@pm.me>
1 file changed, 279 insertions(+), 1 deletion(-)
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
index d89ccc9d995..bf003376f86 100644
index 4cba57764fd..26f4693e862 100644
--- a/dlls/dwrite/tests/layout.c
+++ b/dlls/dwrite/tests/layout.c
@@ -3297,7 +3297,7 @@ todo_wine
@@ -3339,7 +3339,7 @@ todo_wine
DWRITE_FONT_STRETCH_NORMAL, 10.0, L"en-us", &format);
ok(hr == S_OK, "got 0x%08x\n", hr);
@ -21,7 +21,7 @@ index d89ccc9d995..bf003376f86 100644
ok(hr == S_OK, "got 0x%08x\n", hr);
count = 0;
@@ -4480,6 +4480,7 @@ static void test_SetWordWrapping(void)
@@ -4522,6 +4522,7 @@ static void test_SetWordWrapping(void)
/* Collection dedicated to fallback testing */
static const WCHAR g_blahfontW[] = {'B','l','a','h',0};
@ -29,7 +29,7 @@ index d89ccc9d995..bf003376f86 100644
static HRESULT WINAPI fontcollection_QI(IDWriteFontCollection *iface, REFIID riid, void **obj)
{
if (IsEqualIID(riid, &IID_IDWriteFontCollection) || IsEqualIID(riid, &IID_IUnknown)) {
@@ -4541,6 +4542,9 @@ static HRESULT WINAPI fontcollection_FindFamilyName(IDWriteFontCollection *iface
@@ -4583,6 +4584,9 @@ static HRESULT WINAPI fontcollection_FindFamilyName(IDWriteFontCollection *iface
*index = 123456;
*exists = TRUE;
return S_OK;
@ -39,8 +39,8 @@ index d89ccc9d995..bf003376f86 100644
}
ok(0, "unexpected call, name %s\n", wine_dbgstr_w(name));
return E_NOTIMPL;
@@ -5781,6 +5785,279 @@ todo_wine {
IDWriteFactory_Release(factory);
@@ -5992,6 +5996,279 @@ if (SUCCEEDED(hr))
IDWriteFactory6_Release(factory);
}
+static void test_GetMetrics_with_custom_fontcollection(void)
@ -319,7 +319,7 @@ index d89ccc9d995..bf003376f86 100644
START_TEST(layout)
{
IDWriteFactory *factory;
@@ -5814,6 +6091,7 @@ START_TEST(layout)
@@ -6025,6 +6302,7 @@ START_TEST(layout)
test_SetFontStretch();
test_SetStrikethrough();
test_GetMetrics();
@ -328,5 +328,5 @@ index d89ccc9d995..bf003376f86 100644
test_SetDrawingEffect();
test_GetLineMetrics();
--
2.17.1
2.29.2

View File

@ -1,4 +1,4 @@
From d8cf82ba904cfa956dc5e2146ab98afa6efc46ff Mon Sep 17 00:00:00 2001
From 70c7589e029a19a3b048cdf5c222fb36e489ba69 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <zfigura@codeweavers.com>
Date: Mon, 6 Jul 2020 14:40:43 -0500
Subject: [PATCH] ntdll, server: Implement NtCreateEvent().
@ -6,9 +6,9 @@ Subject: [PATCH] ntdll, server: Implement NtCreateEvent().
---
dlls/ntdll/unix/esync.c | 27 +++++++++++++++++++++++++++
dlls/ntdll/unix/esync.h | 3 +++
dlls/ntdll/unix/sync.c | 3 +++
dlls/ntdll/unix/sync.c | 4 ++++
server/esync.c | 15 +++++++++++++++
4 files changed, 48 insertions(+)
4 files changed, 49 insertions(+)
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
index 1b71105491c..e440e9baa4a 100644
@ -77,13 +77,14 @@ index 87516e7597a..d9c7df967f8 100644
BOOLEAN alertable, const LARGE_INTEGER *timeout ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index 445c2a4324d..51f77b1015f 100644
index 1abc691811b..de4c75afcea 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -434,6 +434,9 @@ NTSTATUS WINAPI NtCreateEvent( HANDLE *handle, ACCESS_MASK access, const OBJECT_
data_size_t len;
@@ -435,6 +435,10 @@ NTSTATUS WINAPI NtCreateEvent( HANDLE *handle, ACCESS_MASK access, const OBJECT_
struct object_attributes *objattr;
if (type != NotificationEvent && type != SynchronizationEvent) return STATUS_INVALID_PARAMETER;
+
+ if (do_esync())
+ return esync_create_event( handle, access, attr, type, state );
+
@ -124,5 +125,5 @@ index 226e70cd1ad..b9e0a455629 100644
assert( 0 );
}
--
2.28.0
2.29.2

View File

@ -1,14 +1,13 @@
From 8be256f9b12b42f5a5fef0b82d34aaacfa7c6115 Mon Sep 17 00:00:00 2001
From be9f0261d9afa05ea32eac251decf42bf5a83b6c Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Thu, 9 Jan 2020 13:44:01 -0600
Subject: [PATCH] ntdll/tests: Move some tests to a new sync.c file.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/ntdll/tests/Makefile.in | 1 +
dlls/ntdll/tests/om.c | 478 -------------------------------
dlls/ntdll/tests/sync.c | 527 +++++++++++++++++++++++++++++++++++
3 files changed, 528 insertions(+), 478 deletions(-)
dlls/ntdll/tests/om.c | 498 -------------------------------
dlls/ntdll/tests/sync.c | 547 +++++++++++++++++++++++++++++++++++
3 files changed, 548 insertions(+), 498 deletions(-)
create mode 100644 dlls/ntdll/tests/sync.c
diff --git a/dlls/ntdll/tests/Makefile.in b/dlls/ntdll/tests/Makefile.in
@ -24,12 +23,12 @@ index ed15c51339f..9a99c01bd7c 100644
time.c \
virtual.c
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
index 120b093fa56..f366a661a16 100644
index f739996c58c..d088a6ee64b 100644
--- a/dlls/ntdll/tests/om.c
+++ b/dlls/ntdll/tests/om.c
@@ -28,10 +28,6 @@
static VOID (WINAPI *pRtlInitUnicodeString)( PUNICODE_STRING, LPCWSTR );
static NTSTATUS (WINAPI *pNtCreateEvent) ( PHANDLE, ACCESS_MASK, const POBJECT_ATTRIBUTES, BOOLEAN, BOOLEAN);
static NTSTATUS (WINAPI *pNtCreateEvent) ( PHANDLE, ACCESS_MASK, const POBJECT_ATTRIBUTES, EVENT_TYPE, BOOLEAN);
static NTSTATUS (WINAPI *pNtOpenEvent) ( PHANDLE, ACCESS_MASK, const POBJECT_ATTRIBUTES);
-static NTSTATUS (WINAPI *pNtPulseEvent) ( HANDLE, PLONG );
-static NTSTATUS (WINAPI *pNtQueryEvent) ( HANDLE, EVENT_INFORMATION_CLASS, PVOID, ULONG, PULONG );
@ -70,7 +69,7 @@ index 120b093fa56..f366a661a16 100644
#define ROUND_UP(value, alignment) (((value) + ((alignment) - 1)) & ~((alignment)-1))
static LPCSTR wine_dbgstr_us( const UNICODE_STRING *us )
@@ -1697,266 +1681,6 @@ static void test_type_mismatch(void)
@@ -1697,286 +1681,6 @@ static void test_type_mismatch(void)
pNtClose( h );
}
@ -87,16 +86,29 @@ index 120b093fa56..f366a661a16 100644
- pRtlInitUnicodeString( &str, L"\\BaseNamedObjects\\testEvent" );
- InitializeObjectAttributes(&attr, &str, 0, 0, NULL);
-
- status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, 1, 0);
- status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, 2, 0);
- ok( status == STATUS_INVALID_PARAMETER, "NtCreateEvent failed %08x\n", status );
-
- status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, NotificationEvent, 0);
- ok( status == STATUS_SUCCESS, "NtCreateEvent failed %08x\n", status );
- memset(&info, 0xcc, sizeof(info));
- status = pNtQueryEvent(Event, EventBasicInformation, &info, sizeof(info), NULL);
- ok( status == STATUS_SUCCESS, "NtQueryEvent failed %08x\n", status );
- ok( info.EventType == NotificationEvent && info.EventState == 0,
- "NtQueryEvent failed, expected 0 0, got %d %d\n", info.EventType, info.EventState );
- pNtClose(Event);
-
- status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, SynchronizationEvent, 0);
- ok( status == STATUS_SUCCESS, "NtCreateEvent failed %08x\n", status );
-
- status = pNtPulseEvent(Event, &prev_state);
- ok( status == STATUS_SUCCESS, "NtPulseEvent failed %08x\n", status );
- ok( !prev_state, "prev_state = %x\n", prev_state );
-
- memset(&info, 0xcc, sizeof(info));
- status = pNtQueryEvent(Event, EventBasicInformation, &info, sizeof(info), NULL);
- ok( status == STATUS_SUCCESS, "NtQueryEvent failed %08x\n", status );
- ok( info.EventType == 1 && info.EventState == 0,
- ok( info.EventType == SynchronizationEvent && info.EventState == 0,
- "NtQueryEvent failed, expected 1 0, got %d %d\n", info.EventType, info.EventState );
-
- status = pNtOpenEvent(&Event2, GENERIC_ALL, &attr);
@ -105,15 +117,22 @@ index 120b093fa56..f366a661a16 100644
- pNtClose(Event);
- Event = Event2;
-
- memset(&info, 0xcc, sizeof(info));
- status = pNtQueryEvent(Event, EventBasicInformation, &info, sizeof(info), NULL);
- ok( status == STATUS_SUCCESS, "NtQueryEvent failed %08x\n", status );
- ok( info.EventType == 1 && info.EventState == 0,
- ok( info.EventType == SynchronizationEvent && info.EventState == 0,
- "NtQueryEvent failed, expected 1 0, got %d %d\n", info.EventType, info.EventState );
-
- status = pNtSetEvent( Event, &prev_state );
- ok( status == STATUS_SUCCESS, "NtSetEvent failed: %08x\n", status );
- ok( !prev_state, "prev_state = %x\n", prev_state );
-
- memset(&info, 0xcc, sizeof(info));
- status = pNtQueryEvent(Event, EventBasicInformation, &info, sizeof(info), NULL);
- ok( status == STATUS_SUCCESS, "NtQueryEvent failed %08x\n", status );
- ok( info.EventType == SynchronizationEvent && info.EventState == 1,
- "NtQueryEvent failed, expected 1 1, got %d %d\n", info.EventType, info.EventState );
-
- status = pNtSetEvent( Event, &prev_state );
- ok( status == STATUS_SUCCESS, "NtSetEvent failed: %08x\n", status );
- ok( prev_state == 1, "prev_state = %x\n", prev_state );
@ -319,13 +338,13 @@ index 120b093fa56..f366a661a16 100644
- status = pNtPulseEvent( handle, NULL );
- ok( status == STATUS_OBJECT_TYPE_MISMATCH, "NtPulseEvent %x\n", status );
-
- status = pNtCreateEvent( &event, GENERIC_ALL, &attr, FALSE, FALSE );
- status = pNtCreateEvent( &event, GENERIC_ALL, &attr, NotificationEvent, FALSE );
- ok( status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_OBJECT_TYPE_MISMATCH /* 7+ */,
- "CreateEvent %x\n", status );
-
- NtClose( handle );
-
- status = pNtCreateEvent( &event, GENERIC_ALL, &attr, FALSE, FALSE );
- status = pNtCreateEvent( &event, GENERIC_ALL, &attr, NotificationEvent, FALSE );
- ok( status == 0, "CreateEvent %x\n", status );
- status = pNtWaitForKeyedEvent( event, (void *)8, 0, &timeout );
- ok( status == STATUS_OBJECT_TYPE_MISMATCH, "NtWaitForKeyedEvent %x\n", status );
@ -337,7 +356,7 @@ index 120b093fa56..f366a661a16 100644
static void test_null_device(void)
{
OBJECT_ATTRIBUTES attr;
@@ -2030,119 +1754,6 @@ static void test_null_device(void)
@@ -2050,119 +1754,6 @@ static void test_null_device(void)
CloseHandle(ov.hEvent);
}
@ -457,7 +476,7 @@ index 120b093fa56..f366a661a16 100644
static void test_semaphore(void)
{
SEMAPHORE_BASIC_INFORMATION info;
@@ -2219,79 +1830,6 @@ static void test_semaphore(void)
@@ -2239,79 +1830,6 @@ static void test_semaphore(void)
NtClose( semaphore );
}
@ -537,7 +556,7 @@ index 120b093fa56..f366a661a16 100644
static void test_process(void)
{
OBJECT_ATTRIBUTES attr;
@@ -2355,13 +1893,7 @@ START_TEST(om)
@@ -2375,13 +1893,7 @@ START_TEST(om)
pNtCreateMailslotFile = (void *)GetProcAddress(hntdll, "NtCreateMailslotFile");
pNtCreateMutant = (void *)GetProcAddress(hntdll, "NtCreateMutant");
pNtOpenEvent = (void *)GetProcAddress(hntdll, "NtOpenEvent");
@ -551,7 +570,7 @@ index 120b093fa56..f366a661a16 100644
pNtOpenFile = (void *)GetProcAddress(hntdll, "NtOpenFile");
pNtClose = (void *)GetProcAddress(hntdll, "NtClose");
pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString");
@@ -2382,15 +1914,9 @@ START_TEST(om)
@@ -2402,15 +1914,9 @@ START_TEST(om)
pNtReleaseSemaphore = (void *)GetProcAddress(hntdll, "NtReleaseSemaphore");
pNtCreateKeyedEvent = (void *)GetProcAddress(hntdll, "NtCreateKeyedEvent");
pNtOpenKeyedEvent = (void *)GetProcAddress(hntdll, "NtOpenKeyedEvent");
@ -567,7 +586,7 @@ index 120b093fa56..f366a661a16 100644
pNtOpenProcess = (void *)GetProcAddress(hntdll, "NtOpenProcess");
pNtQuerySystemInformation = (void *)GetProcAddress(hntdll, "NtQuerySystemInformation");
@@ -2403,11 +1929,7 @@ START_TEST(om)
@@ -2423,11 +1929,7 @@ START_TEST(om)
test_query_object();
test_query_object_types();
test_type_mismatch();
@ -581,10 +600,10 @@ index 120b093fa56..f366a661a16 100644
}
diff --git a/dlls/ntdll/tests/sync.c b/dlls/ntdll/tests/sync.c
new file mode 100644
index 00000000000..9967a2be257
index 00000000000..3f41cdfeedd
--- /dev/null
+++ b/dlls/ntdll/tests/sync.c
@@ -0,0 +1,527 @@
@@ -0,0 +1,547 @@
+/*
+ * Unit tests for NT synchronization objects
+ *
@ -614,7 +633,7 @@ index 00000000000..9967a2be257
+#include "wine/test.h"
+
+static NTSTATUS (WINAPI *pNtClose)( HANDLE );
+static NTSTATUS (WINAPI *pNtCreateEvent)( HANDLE *, ACCESS_MASK, const OBJECT_ATTRIBUTES *, BOOLEAN, BOOLEAN );
+static NTSTATUS (WINAPI *pNtCreateEvent)( HANDLE *, ACCESS_MASK, const OBJECT_ATTRIBUTES *, EVENT_TYPE, BOOLEAN );
+static NTSTATUS (WINAPI *pNtCreateKeyedEvent)( HANDLE *, ACCESS_MASK, const OBJECT_ATTRIBUTES *, ULONG );
+static NTSTATUS (WINAPI *pNtCreateMutant)( HANDLE *, ACCESS_MASK, const OBJECT_ATTRIBUTES *, BOOLEAN );
+static NTSTATUS (WINAPI *pNtOpenEvent)( HANDLE *, ACCESS_MASK, const OBJECT_ATTRIBUTES * );
@ -650,16 +669,29 @@ index 00000000000..9967a2be257
+ pRtlInitUnicodeString(&str, L"\\BaseNamedObjects\\testEvent");
+ InitializeObjectAttributes(&attr, &str, 0, 0, NULL);
+
+ status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, 1, 0);
+ status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, 2, 0);
+ ok( status == STATUS_INVALID_PARAMETER, "NtCreateEvent failed %08x\n", status );
+
+ status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, NotificationEvent, 0);
+ ok( status == STATUS_SUCCESS, "NtCreateEvent failed %08x\n", status );
+ memset(&info, 0xcc, sizeof(info));
+ status = pNtQueryEvent(Event, EventBasicInformation, &info, sizeof(info), NULL);
+ ok( status == STATUS_SUCCESS, "NtQueryEvent failed %08x\n", status );
+ ok( info.EventType == NotificationEvent && info.EventState == 0,
+ "NtQueryEvent failed, expected 0 0, got %d %d\n", info.EventType, info.EventState );
+ pNtClose(Event);
+
+ status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, SynchronizationEvent, 0);
+ ok( status == STATUS_SUCCESS, "NtCreateEvent failed %08x\n", status );
+
+ status = pNtPulseEvent(Event, &prev_state);
+ ok( status == STATUS_SUCCESS, "NtPulseEvent failed %08x\n", status );
+ ok( !prev_state, "prev_state = %x\n", prev_state );
+
+ memset(&info, 0xcc, sizeof(info));
+ status = pNtQueryEvent(Event, EventBasicInformation, &info, sizeof(info), NULL);
+ ok( status == STATUS_SUCCESS, "NtQueryEvent failed %08x\n", status );
+ ok( info.EventType == 1 && info.EventState == 0,
+ ok( info.EventType == SynchronizationEvent && info.EventState == 0,
+ "NtQueryEvent failed, expected 1 0, got %d %d\n", info.EventType, info.EventState );
+
+ status = pNtOpenEvent(&Event2, GENERIC_ALL, &attr);
@ -668,15 +700,22 @@ index 00000000000..9967a2be257
+ pNtClose(Event);
+ Event = Event2;
+
+ memset(&info, 0xcc, sizeof(info));
+ status = pNtQueryEvent(Event, EventBasicInformation, &info, sizeof(info), NULL);
+ ok( status == STATUS_SUCCESS, "NtQueryEvent failed %08x\n", status );
+ ok( info.EventType == 1 && info.EventState == 0,
+ ok( info.EventType == SynchronizationEvent && info.EventState == 0,
+ "NtQueryEvent failed, expected 1 0, got %d %d\n", info.EventType, info.EventState );
+
+ status = pNtSetEvent( Event, &prev_state );
+ ok( status == STATUS_SUCCESS, "NtSetEvent failed: %08x\n", status );
+ ok( !prev_state, "prev_state = %x\n", prev_state );
+
+ memset(&info, 0xcc, sizeof(info));
+ status = pNtQueryEvent(Event, EventBasicInformation, &info, sizeof(info), NULL);
+ ok( status == STATUS_SUCCESS, "NtQueryEvent failed %08x\n", status );
+ ok( info.EventType == SynchronizationEvent && info.EventState == 1,
+ "NtQueryEvent failed, expected 1 1, got %d %d\n", info.EventType, info.EventState );
+
+ status = pNtSetEvent( Event, &prev_state );
+ ok( status == STATUS_SUCCESS, "NtSetEvent failed: %08x\n", status );
+ ok( prev_state == 1, "prev_state = %x\n", prev_state );
@ -882,13 +921,13 @@ index 00000000000..9967a2be257
+ status = pNtPulseEvent( handle, NULL );
+ ok( status == STATUS_OBJECT_TYPE_MISMATCH, "NtPulseEvent %x\n", status );
+
+ status = pNtCreateEvent( &event, GENERIC_ALL, &attr, FALSE, FALSE );
+ status = pNtCreateEvent( &event, GENERIC_ALL, &attr, NotificationEvent, FALSE );
+ ok( status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_OBJECT_TYPE_MISMATCH,
+ "CreateEvent %x\n", status );
+
+ NtClose( handle );
+
+ status = pNtCreateEvent( &event, GENERIC_ALL, &attr, FALSE, FALSE );
+ status = pNtCreateEvent( &event, GENERIC_ALL, &attr, NotificationEvent, FALSE );
+ ok( status == 0, "CreateEvent %x\n", status );
+ status = pNtWaitForKeyedEvent( event, (void *)8, 0, &timeout );
+ ok( status == STATUS_OBJECT_TYPE_MISMATCH, "NtWaitForKeyedEvent %x\n", status );

View File

@ -1,8 +1,7 @@
From 03fe17e93090c3cc3b9cbc9f92bc48ff39d84a07 Mon Sep 17 00:00:00 2001
From a993ebacecfcaa3370b7661baef6767d987ffed2 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Mon, 31 Aug 2020 23:01:25 -0500
Subject: [PATCH 05/13] ntdll/tests: Add basic tests for thread-id alert
functions.
Subject: [PATCH] ntdll/tests: Add basic tests for thread-id alert functions.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
@ -10,7 +9,7 @@ Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
1 file changed, 59 insertions(+)
diff --git a/dlls/ntdll/tests/sync.c b/dlls/ntdll/tests/sync.c
index 152cdd1530d..a6631dd40a9 100644
index 2ebdbd1b6f5..0c04c450948 100644
--- a/dlls/ntdll/tests/sync.c
+++ b/dlls/ntdll/tests/sync.c
@@ -26,6 +26,7 @@
@ -19,7 +18,7 @@ index 152cdd1530d..a6631dd40a9 100644
+static NTSTATUS (WINAPI *pNtAlertThreadByThreadId)( HANDLE );
static NTSTATUS (WINAPI *pNtClose)( HANDLE );
static NTSTATUS (WINAPI *pNtCreateEvent)( HANDLE *, ACCESS_MASK, const OBJECT_ATTRIBUTES *, BOOLEAN, BOOLEAN );
static NTSTATUS (WINAPI *pNtCreateEvent)( HANDLE *, ACCESS_MASK, const OBJECT_ATTRIBUTES *, EVENT_TYPE, BOOLEAN );
static NTSTATUS (WINAPI *pNtCreateKeyedEvent)( HANDLE *, ACCESS_MASK, const OBJECT_ATTRIBUTES *, ULONG );
@@ -40,6 +41,7 @@ static NTSTATUS (WINAPI *pNtReleaseKeyedEvent)( HANDLE, const void *, BOOLEAN, c
static NTSTATUS (WINAPI *pNtReleaseMutant)( HANDLE, LONG * );
@ -29,7 +28,7 @@ index 152cdd1530d..a6631dd40a9 100644
static NTSTATUS (WINAPI *pNtWaitForKeyedEvent)( HANDLE, const void *, BOOLEAN, const LARGE_INTEGER * );
static BOOLEAN (WINAPI *pRtlAcquireResourceExclusive)( RTL_RWLOCK *, BOOLEAN );
static BOOLEAN (WINAPI *pRtlAcquireResourceShared)( RTL_RWLOCK *, BOOLEAN );
@@ -654,10 +656,65 @@ static void test_resource(void)
@@ -674,10 +676,65 @@ static void test_resource(void)
pRtlDeleteResource(&resource);
}
@ -95,7 +94,7 @@ index 152cdd1530d..a6631dd40a9 100644
pNtClose = (void *)GetProcAddress(module, "NtClose");
pNtCreateEvent = (void *)GetProcAddress(module, "NtCreateEvent");
pNtCreateKeyedEvent = (void *)GetProcAddress(module, "NtCreateKeyedEvent");
@@ -672,6 +729,7 @@ START_TEST(sync)
@@ -692,6 +749,7 @@ START_TEST(sync)
pNtReleaseMutant = (void *)GetProcAddress(module, "NtReleaseMutant");
pNtResetEvent = (void *)GetProcAddress(module, "NtResetEvent");
pNtSetEvent = (void *)GetProcAddress(module, "NtSetEvent");
@ -103,7 +102,7 @@ index 152cdd1530d..a6631dd40a9 100644
pNtWaitForKeyedEvent = (void *)GetProcAddress(module, "NtWaitForKeyedEvent");
pRtlAcquireResourceExclusive = (void *)GetProcAddress(module, "RtlAcquireResourceExclusive");
pRtlAcquireResourceShared = (void *)GetProcAddress(module, "RtlAcquireResourceShared");
@@ -688,4 +746,5 @@ START_TEST(sync)
@@ -708,4 +766,5 @@ START_TEST(sync)
test_mutant();
test_keyed_events();
test_resource();

View File

@ -1,4 +1,4 @@
From fb716c2886466b38ca0dcb5f993d66ef0dbb499e Mon Sep 17 00:00:00 2001
From 6dfa30d0a77102ad39285c39b901b16138d894fe Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Mon, 2 Nov 2020 20:24:07 -0600
Subject: [PATCH] ntdll: Reimplement Win32 futexes on top of thread-ID alerts.
@ -231,11 +231,11 @@ index 8e5a3a3a3a3..3a74b55aa1e 100644
}
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 31cfb43d11f..5ab3121dd2c 100644
index 43c769f2d2a..bb386648a70 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -1511,9 +1511,6 @@ static struct unix_funcs unix_funcs =
NtCurrentTeb,
@@ -1513,9 +1513,6 @@ static struct unix_funcs unix_funcs =
#endif
DbgUiIssueRemoteBreakin,
RtlGetSystemTimePrecise,
- RtlWaitOnAddress,
@ -245,7 +245,7 @@ index 31cfb43d11f..5ab3121dd2c 100644
fast_RtlpUnWaitCriticalSection,
fast_RtlDeleteCriticalSection,
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index e4aa03f94da..2bdd3a196bc 100644
index 17c5921cdec..00e9eebe46e 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -77,10 +77,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(sync);
@ -284,7 +284,7 @@ index e4aa03f94da..2bdd3a196bc 100644
/* create a struct security_descriptor and contained information in one contiguous piece of memory */
NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
data_size_t *ret_len )
@@ -2678,71 +2656,6 @@ NTSTATUS CDECL fast_RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable,
@@ -2679,71 +2657,6 @@ NTSTATUS CDECL fast_RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable,
return STATUS_SUCCESS;
}
@ -356,7 +356,7 @@ index e4aa03f94da..2bdd3a196bc 100644
#else
NTSTATUS CDECL fast_RtlTryAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
@@ -2785,79 +2698,4 @@ NTSTATUS CDECL fast_wait_cv( RTL_CONDITION_VARIABLE *variable, const void *value
@@ -2786,79 +2699,4 @@ NTSTATUS CDECL fast_wait_cv( RTL_CONDITION_VARIABLE *variable, const void *value
return STATUS_NOT_IMPLEMENTED;
}
@ -437,19 +437,19 @@ index e4aa03f94da..2bdd3a196bc 100644
- mutex_unlock( &addr_mutex );
-}
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index 7ed3148e4c4..a9c05cbd09b 100644
index 0847c7e07ca..95ed792baee 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -27,7 +27,7 @@
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 106
+#define NTDLL_UNIXLIB_VERSION 107
-#define NTDLL_UNIXLIB_VERSION 107
+#define NTDLL_UNIXLIB_VERSION 108
struct unix_funcs
{
@@ -37,10 +37,6 @@ struct unix_funcs
@@ -39,10 +39,6 @@ struct unix_funcs
/* other Win32 API functions */
NTSTATUS (WINAPI *DbgUiIssueRemoteBreakin)( HANDLE process );
LONGLONG (WINAPI *RtlGetSystemTimePrecise)(void);

View File

@ -1,8 +1,8 @@
From 8b1502d1fc5a6ccb748a8ada38784e79f5612811 Mon Sep 17 00:00:00 2001
From 244f1f1aa95b7d7fbe1aa6d9f5247871e50cd62b Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Mon, 31 Aug 2020 23:38:09 -0500
Subject: [PATCH 11/13] ntdll: Reimplement the critical section fast path on
top of Win32 futexes.
Subject: [PATCH] ntdll: Reimplement the critical section fast path on top of
Win32 futexes.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
@ -14,10 +14,10 @@ Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
5 files changed, 24 insertions(+), 131 deletions(-)
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
index ea327172b86..d7976a742c6 100644
index 41e95f9db4f..28bb184b665 100644
--- a/dlls/ntdll/sync.c
+++ b/dlls/ntdll/sync.c
@@ -658,19 +658,26 @@ static inline HANDLE get_semaphore( RTL_CRITICAL_SECTION *crit )
@@ -736,19 +736,26 @@ static inline HANDLE get_semaphore( RTL_CRITICAL_SECTION *crit )
static inline NTSTATUS wait_semaphore( RTL_CRITICAL_SECTION *crit, int timeout )
{
@ -52,7 +52,7 @@ index ea327172b86..d7976a742c6 100644
}
/******************************************************************************
@@ -760,8 +767,6 @@ NTSTATUS WINAPI RtlDeleteCriticalSection( RTL_CRITICAL_SECTION *crit )
@@ -838,8 +845,6 @@ NTSTATUS WINAPI RtlDeleteCriticalSection( RTL_CRITICAL_SECTION *crit )
RtlFreeHeap( GetProcessHeap(), 0, crit->DebugInfo );
crit->DebugInfo = NULL;
}
@ -61,7 +61,7 @@ index ea327172b86..d7976a742c6 100644
}
else NtClose( crit->LockSemaphore );
crit->LockSemaphore = 0;
@@ -837,12 +842,18 @@ NTSTATUS WINAPI RtlpUnWaitCriticalSection( RTL_CRITICAL_SECTION *crit )
@@ -915,12 +920,18 @@ NTSTATUS WINAPI RtlpUnWaitCriticalSection( RTL_CRITICAL_SECTION *crit )
NTSTATUS ret;
/* debug info is cleared by MakeCriticalSectionGlobal */
@ -83,11 +83,11 @@ index ea327172b86..d7976a742c6 100644
return ret;
}
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 5ab3121dd2c..ac4efc74e5e 100644
index bb386648a70..b85b6633136 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -1511,9 +1511,6 @@ static struct unix_funcs unix_funcs =
NtCurrentTeb,
@@ -1513,9 +1513,6 @@ static struct unix_funcs unix_funcs =
#endif
DbgUiIssueRemoteBreakin,
RtlGetSystemTimePrecise,
- fast_RtlpWaitForCriticalSection,
@ -97,10 +97,10 @@ index 5ab3121dd2c..ac4efc74e5e 100644
fast_RtlAcquireSRWLockExclusive,
fast_RtlTryAcquireSRWLockShared,
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index 2bdd3a196bc..0f45fdecdca 100644
index 00e9eebe46e..3bf43f80ce9 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -2251,115 +2251,6 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
@@ -2252,115 +2252,6 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
}
@ -217,7 +217,7 @@ index 2bdd3a196bc..0f45fdecdca 100644
/* Futex-based SRW lock implementation:
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index 9e94c0ec13c..0f833b5a51b 100644
index abc2f6d2bd4..a4f3fc33f5f 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -93,9 +93,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
@ -231,19 +231,19 @@ index 9e94c0ec13c..0f833b5a51b 100644
extern NTSTATUS CDECL fast_RtlAcquireSRWLockExclusive( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index a9c05cbd09b..a8dad0d0fcf 100644
index 95ed792baee..4487c825924 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -27,7 +27,7 @@
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 107
+#define NTDLL_UNIXLIB_VERSION 108
-#define NTDLL_UNIXLIB_VERSION 108
+#define NTDLL_UNIXLIB_VERSION 109
struct unix_funcs
{
@@ -39,9 +39,6 @@ struct unix_funcs
@@ -41,9 +41,6 @@ struct unix_funcs
LONGLONG (WINAPI *RtlGetSystemTimePrecise)(void);
/* fast locks */

View File

@ -1,7 +1,7 @@
From 10eabed1355cf47d4eae042e775c8005a67b88d7 Mon Sep 17 00:00:00 2001
From 4d1cd1db8bafc0045a5d93154c89bc8edeccccda Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Mon, 31 Aug 2020 23:55:29 -0500
Subject: [PATCH 12/13] ntdll: Get rid of the direct futex path for condition
Subject: [PATCH] ntdll: Get rid of the direct futex path for condition
variables.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
@ -14,7 +14,7 @@ Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
5 files changed, 9 insertions(+), 96 deletions(-)
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
index d7976a742c6..133ae6d4ead 100644
index 28bb184b665..0e86ecead3d 100644
--- a/dlls/ntdll/sync.c
+++ b/dlls/ntdll/sync.c
@@ -450,11 +450,8 @@ void WINAPI RtlInitializeConditionVariable( RTL_CONDITION_VARIABLE *variable )
@ -80,10 +80,10 @@ index d7976a742c6..133ae6d4ead 100644
if (flags & RTL_CONDITION_VARIABLE_LOCKMODE_SHARED)
RtlAcquireSRWLockShared( lock );
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index ac4efc74e5e..1633aeb97eb 100644
index b85b6633136..ad242b91800 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -1517,8 +1517,6 @@ static struct unix_funcs unix_funcs =
@@ -1519,8 +1519,6 @@ static struct unix_funcs unix_funcs =
fast_RtlAcquireSRWLockShared,
fast_RtlReleaseSRWLockExclusive,
fast_RtlReleaseSRWLockShared,
@ -93,7 +93,7 @@ index ac4efc74e5e..1633aeb97eb 100644
ntdll_ceil,
ntdll_cos,
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index 0f45fdecdca..3645c9f9549 100644
index 3bf43f80ce9..07e7939fc59 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -166,23 +166,6 @@ static int *get_futex(void **ptr)
@ -120,7 +120,7 @@ index 0f45fdecdca..3645c9f9549 100644
#endif
@@ -2503,50 +2486,6 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
@@ -2504,50 +2487,6 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
return STATUS_SUCCESS;
}
@ -171,7 +171,7 @@ index 0f45fdecdca..3645c9f9549 100644
#else
NTSTATUS CDECL fast_RtlTryAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
@@ -2579,14 +2518,4 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
@@ -2580,14 +2519,4 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
return STATUS_NOT_IMPLEMENTED;
}
@ -187,7 +187,7 @@ index 0f45fdecdca..3645c9f9549 100644
-
#endif
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index 0f833b5a51b..4462c3ad218 100644
index a4f3fc33f5f..d82b8c90e84 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -99,10 +99,7 @@ extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLS
@ -202,19 +202,19 @@ index 0f833b5a51b..4462c3ad218 100644
extern NTSTATUS CDECL get_initial_environment( WCHAR **wargv[], WCHAR *env, SIZE_T *size ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL get_startup_info( startup_info_t *info, SIZE_T *total_size, SIZE_T *info_size ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index a8dad0d0fcf..6116f408572 100644
index 4487c825924..0d056ef2b80 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -27,7 +27,7 @@
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 108
+#define NTDLL_UNIXLIB_VERSION 109
-#define NTDLL_UNIXLIB_VERSION 109
+#define NTDLL_UNIXLIB_VERSION 110
struct unix_funcs
{
@@ -45,9 +45,6 @@ struct unix_funcs
@@ -47,9 +47,6 @@ struct unix_funcs
NTSTATUS (CDECL *fast_RtlAcquireSRWLockShared)( RTL_SRWLOCK *lock );
NTSTATUS (CDECL *fast_RtlReleaseSRWLockExclusive)( RTL_SRWLOCK *lock );
NTSTATUS (CDECL *fast_RtlReleaseSRWLockShared)( RTL_SRWLOCK *lock );

View File

@ -1,4 +1,4 @@
From 76e611ca640aeab6ff440d6bfad61e8b8e899093 Mon Sep 17 00:00:00 2001
From 55ef726442489ed42eba1981fe038b95f910d511 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sun, 22 Nov 2020 20:51:10 -0600
Subject: [PATCH] ntdll: Reimplement SRW locks on top of Win32 futexes.
@ -9,10 +9,8 @@ Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
dlls/ntdll/unix/loader.c | 6 -
dlls/ntdll/unix/sync.c | 309 --------------------------------
dlls/ntdll/unix/unix_private.h | 6 -
dlls/ntdll/unixlib.h | 8 -
include/winbase.h | 1 -
include/winnt.h | 24 +++
7 files changed, 166 insertions(+), 504 deletions(-)
dlls/ntdll/unixlib.h | 10 +-
5 files changed, 143 insertions(+), 504 deletions(-)
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
index 0e86ecead3d..34b076d6b71 100644
@ -395,11 +393,11 @@ index 0e86ecead3d..34b076d6b71 100644
/***********************************************************************
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 8539e70dd82..4a83df1ec2f 100644
index ad242b91800..11b94972c3d 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -1512,12 +1512,6 @@ static struct unix_funcs unix_funcs =
NtCurrentTeb,
@@ -1513,12 +1513,6 @@ static struct unix_funcs unix_funcs =
#endif
DbgUiIssueRemoteBreakin,
RtlGetSystemTimePrecise,
- fast_RtlTryAcquireSRWLockExclusive,
@ -412,10 +410,10 @@ index 8539e70dd82..4a83df1ec2f 100644
ntdll_ceil,
ntdll_cos,
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index 6b72ba3023b..455f4ffc365 100644
index 07e7939fc59..97781a3f0ae 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -115,8 +115,6 @@ static inline ULONGLONG monotonic_counter(void)
@@ -114,8 +114,6 @@ static inline ULONGLONG monotonic_counter(void)
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
@ -424,7 +422,7 @@ index 6b72ba3023b..455f4ffc365 100644
static int futex_private = 128;
@@ -130,16 +128,6 @@ static inline int futex_wake( const int *addr, int val )
@@ -129,16 +127,6 @@ static inline int futex_wake( const int *addr, int val )
return syscall( __NR_futex, addr, FUTEX_WAKE | futex_private, val, NULL, 0, 0 );
}
@ -441,7 +439,7 @@ index 6b72ba3023b..455f4ffc365 100644
static inline int use_futexes(void)
{
static int supported = -1;
@@ -157,16 +145,6 @@ static inline int use_futexes(void)
@@ -156,16 +144,6 @@ static inline int use_futexes(void)
return supported;
}
@ -458,7 +456,7 @@ index 6b72ba3023b..455f4ffc365 100644
#endif
@@ -2287,290 +2265,3 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
@@ -2233,290 +2211,3 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
return NtWaitForSingleObject( ntdll_get_thread_data()->tid_alert_event, FALSE, timeout );
#endif
}
@ -750,10 +748,10 @@ index 6b72ba3023b..455f4ffc365 100644
-
-#endif
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index e78c0c8839c..ad5bb216949 100644
index d82b8c90e84..1cf917ab89d 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -95,12 +95,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
@@ -93,12 +93,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
extern NTSTATUS (WINAPI *pKiUserExceptionDispatcher)(EXCEPTION_RECORD*,CONTEXT*) DECLSPEC_HIDDEN;
extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) DECLSPEC_HIDDEN;
extern void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) DECLSPEC_HIDDEN;
@ -767,10 +765,19 @@ index e78c0c8839c..ad5bb216949 100644
extern NTSTATUS CDECL get_initial_environment( WCHAR **wargv[], WCHAR *env, SIZE_T *size ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index 6116f408572..5ffb09ce397 100644
index 0d056ef2b80..4c2693b3f6c 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -38,14 +38,6 @@ struct unix_funcs
@@ -27,7 +27,7 @@
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 110
+#define NTDLL_UNIXLIB_VERSION 111
struct unix_funcs
{
@@ -40,14 +40,6 @@ struct unix_funcs
NTSTATUS (WINAPI *DbgUiIssueRemoteBreakin)( HANDLE process );
LONGLONG (WINAPI *RtlGetSystemTimePrecise)(void);
@ -785,91 +792,6 @@ index 6116f408572..5ffb09ce397 100644
/* math functions */
double (CDECL *atan)( double d );
double (CDECL *ceil)( double d );
diff --git a/include/winbase.h b/include/winbase.h
index 0262e50d980..968d636f86e 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -2918,7 +2918,6 @@ WINBASEAPI UINT WINAPI _lwrite(HFILE,LPCSTR,UINT);
extern char * CDECL wine_get_unix_file_name( LPCWSTR dos );
extern WCHAR * CDECL wine_get_dos_file_name( LPCSTR str );
-
#ifdef __WINESRC__
static FORCEINLINE HANDLE WINAPI GetCurrentProcess(void)
diff --git a/include/winnt.h b/include/winnt.h
index 98233348cd6..a478aa5128a 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -6910,8 +6910,10 @@ static inline BOOLEAN BitScanReverse(DWORD *index, DWORD mask)
#pragma intrinsic(_InterlockedExchange)
#pragma intrinsic(_InterlockedExchangeAdd)
#pragma intrinsic(_InterlockedIncrement)
+#pragma intrinsic(_InterlockedIncrement16)
#pragma intrinsic(_InterlockedDecrement)
#pragma intrinsic(_InterlockedOr)
+#pragma intrinsic(_InterlockedDecrement16)
long _InterlockedCompareExchange(long volatile*,long,long);
long long _InterlockedCompareExchange64(long long volatile*,long long,long long);
@@ -6919,16 +6921,23 @@ long long _InterlockedCompareExchange64(long long volatile*,long long,long long)
unsigned char _InterlockedCompareExchange128(volatile __int64 *, __int64, __int64, __int64 *);
#endif
long _InterlockedDecrement(long volatile*);
+short _InterlockedDecrement16(short volatile*);
long _InterlockedExchange(long volatile*,long);
long _InterlockedExchangeAdd(long volatile*,long);
long _InterlockedIncrement(long volatile*);
long _InterlockedOr(long volatile *,long);
+short _InterlockedIncrement16(short volatile *);
static FORCEINLINE LONG WINAPI InterlockedCompareExchange( LONG volatile *dest, LONG xchg, LONG compare )
{
return _InterlockedCompareExchange( (long volatile *)dest, xchg, compare );
}
+static FORCEINLINE short WINAPI InterlockedIncrement16( short volatile *dest )
+{
+ return _InterlockedIncrement16( (short volatile *)dest );
+}
+
static FORCEINLINE LONGLONG WINAPI InterlockedCompareExchange64( LONGLONG volatile *dest, LONGLONG xchg, LONGLONG compare )
{
return _InterlockedCompareExchange64( (long long volatile *)dest, compare, xchg );
@@ -6966,6 +6975,11 @@ static FORCEINLINE LONG WINAPI InterlockedOr( LONG volatile *dest, LONG val )
return _InterlockedOr( (long volatile *)dest, val );
}
+static FORCEINLINE short WINAPI InterlockedDecrement16( short volatile *dest )
+{
+ return _InterlockedDecrement16( (short volatile *)dest );
+}
+
#ifndef __i386__
#pragma intrinsic(_InterlockedCompareExchangePointer)
@@ -7092,11 +7106,21 @@ static FORCEINLINE LONG WINAPI InterlockedIncrement( LONG volatile *dest )
return __sync_add_and_fetch( dest, 1 );
}
+static FORCEINLINE short WINAPI InterlockedIncrement16( short volatile *dest )
+{
+ return __sync_add_and_fetch( dest, 1 );
+}
+
static FORCEINLINE LONG WINAPI InterlockedDecrement( LONG volatile *dest )
{
return __sync_add_and_fetch( dest, -1 );
}
+static FORCEINLINE short WINAPI InterlockedDecrement16( short volatile *dest )
+{
+ return __sync_add_and_fetch( dest, -1 );
+}
+
static FORCEINLINE void * WINAPI InterlockedExchangePointer( void *volatile *dest, void *val )
{
void *ret;
--
2.29.2

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "a952453888fb5df3c70edf357820bc924b4f3e7f"
echo "158a9e738421cd16f2e8296f11baa724c64c8ca7"
}
# Show version information
@ -3337,7 +3337,7 @@ fi
# | * dlls/ntdll/Makefile.in, dlls/ntdll/critsection.c, dlls/ntdll/ntdll.spec, dlls/ntdll/ntdll_misc.h, dlls/ntdll/sync.c,
# | dlls/ntdll/tests/Makefile.in, dlls/ntdll/tests/om.c, dlls/ntdll/tests/sync.c, dlls/ntdll/thread.c,
# | dlls/ntdll/unix/loader.c, dlls/ntdll/unix/sync.c, dlls/ntdll/unix/thread.c, dlls/ntdll/unix/unix_private.h,
# | dlls/ntdll/unix/virtual.c, dlls/ntdll/unixlib.h, include/winbase.h, include/winnt.h, include/winternl.h
# | dlls/ntdll/unix/virtual.c, dlls/ntdll/unixlib.h, include/winternl.h
# |
if test "$enable_ntdll_NtAlertThreadByThreadId" -eq 1; then
patch_apply ntdll-NtAlertThreadByThreadId/0001-ntdll-tests-Move-some-tests-to-a-new-sync.c-file.patch

View File

@ -1 +1 @@
a952453888fb5df3c70edf357820bc924b4f3e7f
158a9e738421cd16f2e8296f11baa724c64c8ca7