You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
33 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
3b5ea332d6 | ||
|
81e3e6dafa | ||
|
41cb9f5179 | ||
|
41e15516bd | ||
|
6347bdd1fc | ||
|
677b445b0d | ||
|
a2f82c5c85 | ||
|
cfe1b94e0f | ||
|
2be4bfb8fe | ||
|
cae1b3eba0 | ||
|
32b29ad4d8 | ||
|
a6054cf2e9 | ||
|
f6dacd2f9a | ||
|
43c064ef3c | ||
|
5c5a8f3b2c | ||
|
bd135b1477 | ||
|
9692b2e5eb | ||
|
bcf5899a3c | ||
|
73480ec459 | ||
|
fd3372e71c | ||
|
3dec70bf32 | ||
|
b201ee708b | ||
|
74534094a0 | ||
|
1830eaa655 | ||
|
f168899ce1 | ||
|
f8ce6cbb21 | ||
|
64877514fb | ||
|
310072bb63 | ||
|
2f619b2a53 | ||
|
76f8eb15f1 | ||
|
6364ada0ad | ||
|
caa2471e20 | ||
|
2414b1da6a |
@@ -1,81 +0,0 @@
|
||||
From 7e73f449d158f0d6a6b6b421d073dbaf1741e1c7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 7 Aug 2017 02:22:11 +0200
|
||||
Subject: server: Correctly treat zero access mask in duplicate_token
|
||||
wineserver call.
|
||||
|
||||
---
|
||||
dlls/advapi32/tests/security.c | 14 +++++++-------
|
||||
server/token.c | 3 ++-
|
||||
2 files changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index 4a03db27e69..f1a64e29dea 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -7438,7 +7438,7 @@ static void test_token_security_descriptor(void)
|
||||
ret = DuplicateTokenEx(token4, 0, NULL, SecurityImpersonation, TokenImpersonation, &token5);
|
||||
ok(ret, "DuplicateTokenEx failed with error %u\n", GetLastError());
|
||||
ret = SetThreadToken(NULL, token5);
|
||||
- todo_wine ok(ret, "SetThreadToken failed with error %u\n", GetLastError());
|
||||
+ ok(ret, "SetThreadToken failed with error %u\n", GetLastError());
|
||||
CloseHandle(token4);
|
||||
|
||||
/* Restrict current process token while impersonating a medium integrity token */
|
||||
@@ -7503,16 +7503,16 @@ static void test_token_security_descriptor(void)
|
||||
|
||||
size = 0;
|
||||
ret = GetKernelObjectSecurity(token6, LABEL_SECURITY_INFORMATION, NULL, 0, &size);
|
||||
- todo_wine ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
|
||||
+ ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
|
||||
"Unexpected GetKernelObjectSecurity return value %u, error %u\n", ret, GetLastError());
|
||||
|
||||
sd3 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
|
||||
ret = GetKernelObjectSecurity(token6, LABEL_SECURITY_INFORMATION, sd3, size, &size);
|
||||
- todo_wine ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError());
|
||||
+ ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError());
|
||||
|
||||
sacl = NULL;
|
||||
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
|
||||
- todo_wine ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
|
||||
+ ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
|
||||
todo_wine ok(present, "No SACL in the security descriptor\n");
|
||||
todo_wine ok(sacl != NULL, "NULL SACL in the security descriptor\n");
|
||||
|
||||
@@ -7606,16 +7606,16 @@ static void test_token_security_descriptor(void)
|
||||
|
||||
size = 0;
|
||||
ret = GetKernelObjectSecurity(token4, LABEL_SECURITY_INFORMATION, NULL, 0, &size);
|
||||
- todo_wine ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
|
||||
+ ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
|
||||
"Unexpected GetKernelObjectSecurity return value %u, error %u\n", ret, GetLastError());
|
||||
|
||||
sd3 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
|
||||
ret = GetKernelObjectSecurity(token4, LABEL_SECURITY_INFORMATION, sd3, size, &size);
|
||||
- todo_wine ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError());
|
||||
+ ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError());
|
||||
|
||||
sacl = NULL;
|
||||
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
|
||||
- todo_wine ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
|
||||
+ ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
|
||||
todo_wine ok(present, "No SACL in the security descriptor\n");
|
||||
todo_wine ok(sacl != NULL, "NULL SACL in the security descriptor\n");
|
||||
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 6a1085bae12..292e1df80fd 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -1376,7 +1376,8 @@ DECL_HANDLER(duplicate_token)
|
||||
struct token *token = token_duplicate( src_token, req->primary, req->impersonation_level, sd, NULL, 0, NULL, 0 );
|
||||
if (token)
|
||||
{
|
||||
- reply->new_handle = alloc_handle_no_access_check( current->process, token, req->access, objattr->attributes );
|
||||
+ unsigned int access = req->access ? req->access : get_handle_access( current->process, req->handle );
|
||||
+ reply->new_handle = alloc_handle_no_access_check( current->process, token, access, objattr->attributes );
|
||||
release_object( token );
|
||||
}
|
||||
release_object( src_token );
|
||||
--
|
||||
2.13.1
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 39c92b48498d080c4d90e9b8d16c580dd72b1941 Mon Sep 17 00:00:00 2001
|
||||
From 645cdde83d5430c5096fcb4ec4191aab7e8063ce Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 5 Jul 2019 13:20:23 +0800
|
||||
Subject: [PATCH] cryptext: Implement CryptExtOpenCER.
|
||||
@@ -17,31 +17,31 @@ Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
create mode 100644 dlls/cryptext/tests/cryptext.c
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index f1de2c4052..ed79a35e0e 100755
|
||||
index 8567a9ca4ef..9b4ff8a2d7a 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -20063,6 +20063,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
|
||||
@@ -20276,6 +20276,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptdlg enable_cryptdlg
|
||||
wine_fn_config_makefile dlls/cryptdll enable_cryptdll
|
||||
wine_fn_config_makefile dlls/cryptext enable_cryptext
|
||||
+wine_fn_config_makefile dlls/cryptext/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptnet enable_cryptnet
|
||||
wine_fn_config_makefile dlls/cryptnet/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptui enable_cryptui
|
||||
wine_fn_config_makefile dlls/cryptsp enable_cryptsp
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a7c45ace73..e801c35c46 100644
|
||||
index 0549a9ee78a..b58b05d4dd7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3049,6 +3049,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
|
||||
@@ -3070,6 +3070,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdlg)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdll)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptext)
|
||||
+WINE_CONFIG_MAKEFILE(dlls/cryptext/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptnet)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptnet/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptui)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptsp)
|
||||
diff --git a/dlls/cryptext/Makefile.in b/dlls/cryptext/Makefile.in
|
||||
index 9c9f84cee8..0e817ffda6 100644
|
||||
index 9c9f84cee87..0e817ffda6c 100644
|
||||
--- a/dlls/cryptext/Makefile.in
|
||||
+++ b/dlls/cryptext/Makefile.in
|
||||
@@ -1,4 +1,5 @@
|
||||
@@ -52,7 +52,7 @@ index 9c9f84cee8..0e817ffda6 100644
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
diff --git a/dlls/cryptext/cryptext.spec b/dlls/cryptext/cryptext.spec
|
||||
index 0dba38e393..911ab2f4ba 100644
|
||||
index 0dba38e3934..911ab2f4ba4 100644
|
||||
--- a/dlls/cryptext/cryptext.spec
|
||||
+++ b/dlls/cryptext/cryptext.spec
|
||||
@@ -12,8 +12,8 @@
|
||||
@@ -67,7 +67,7 @@ index 0dba38e393..911ab2f4ba 100644
|
||||
@ stub CryptExtOpenCRLW
|
||||
@ stub CryptExtOpenCTL
|
||||
diff --git a/dlls/cryptext/cryptext_main.c b/dlls/cryptext/cryptext_main.c
|
||||
index f7c7bd1f55..2a381782d6 100644
|
||||
index f7c7bd1f554..2a381782d68 100644
|
||||
--- a/dlls/cryptext/cryptext_main.c
|
||||
+++ b/dlls/cryptext/cryptext_main.c
|
||||
@@ -22,10 +22,29 @@
|
||||
@@ -151,7 +151,7 @@ index f7c7bd1f55..2a381782d6 100644
|
||||
+}
|
||||
diff --git a/dlls/cryptext/tests/Makefile.in b/dlls/cryptext/tests/Makefile.in
|
||||
new file mode 100644
|
||||
index 0000000000..522fc60a4a
|
||||
index 00000000000..522fc60a4af
|
||||
--- /dev/null
|
||||
+++ b/dlls/cryptext/tests/Makefile.in
|
||||
@@ -0,0 +1,4 @@
|
||||
@@ -161,7 +161,7 @@ index 0000000000..522fc60a4a
|
||||
+ cryptext.c
|
||||
diff --git a/dlls/cryptext/tests/cryptext.c b/dlls/cryptext/tests/cryptext.c
|
||||
new file mode 100644
|
||||
index 0000000000..cc62a772b5
|
||||
index 00000000000..cc62a772b59
|
||||
--- /dev/null
|
||||
+++ b/dlls/cryptext/tests/cryptext.c
|
||||
@@ -0,0 +1,61 @@
|
||||
@@ -227,5 +227,5 @@ index 0000000000..cc62a772b5
|
||||
+ test_CryptExtOpenCER();
|
||||
+}
|
||||
--
|
||||
2.17.1
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,56 +0,0 @@
|
||||
From bbc93f065045b7854f4446d9199c2c22c6251d3d Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sun, 30 Jul 2017 23:50:18 +0200
|
||||
Subject: [PATCH] d3dx9: Return D3DFMT_A8R8G8B8 in
|
||||
D3DXGetImageInfoFromFileInMemory for 32 bpp BMP with alpha.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/surface.c | 18 ++++++++++++++++++
|
||||
dlls/d3dx9_36/tests/surface.c | 2 +-
|
||||
2 files changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index a2eca9cbdb..b670657125 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -980,6 +980,24 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize,
|
||||
}
|
||||
}
|
||||
|
||||
+ /* For 32 bpp BMP, windowscodecs.dll never returns a format with alpha while
|
||||
+ * d3dx9_xx.dll returns one if at least 1 pixel has a non zero alpha component */
|
||||
+ if (SUCCEEDED(hr) && (info->Format == D3DFMT_X8R8G8B8) && (info->ImageFileFormat == D3DXIFF_BMP)) {
|
||||
+ DWORD size = sizeof(DWORD) * info->Width * info->Height;
|
||||
+ BYTE *buffer = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ hr = IWICBitmapFrameDecode_CopyPixels(frame, NULL, sizeof(DWORD) * info->Width, size, buffer);
|
||||
+ if (SUCCEEDED(hr)) {
|
||||
+ DWORD i;
|
||||
+ for (i = 0; i < info->Width * info->Height; i++) {
|
||||
+ if (buffer[i*4+3]) {
|
||||
+ info->Format = D3DFMT_A8R8G8B8;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ HeapFree(GetProcessHeap(), 0, buffer);
|
||||
+ }
|
||||
+
|
||||
if (frame)
|
||||
IWICBitmapFrameDecode_Release(frame);
|
||||
|
||||
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
|
||||
index 04ce57fa4f..db0c9c7291 100644
|
||||
--- a/dlls/d3dx9_36/tests/surface.c
|
||||
+++ b/dlls/d3dx9_36/tests/surface.c
|
||||
@@ -616,7 +616,7 @@ static void test_D3DXGetImageInfo(void)
|
||||
ok(info.Format == D3DFMT_X8R8G8B8, "Got unexpected format %u.\n", info.Format);
|
||||
hr = D3DXGetImageInfoFromFileInMemory(bmp_32bpp_argb, sizeof(bmp_32bpp_argb), &info);
|
||||
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
- todo_wine ok(info.Format == D3DFMT_A8R8G8B8, "Got unexpected format %u.\n", info.Format);
|
||||
+ ok(info.Format == D3DFMT_A8R8G8B8, "Got unexpected format %u.\n", info.Format);
|
||||
|
||||
/* Grayscale PNG */
|
||||
hr = D3DXGetImageInfoFromFileInMemory(png_grayscale, sizeof(png_grayscale), &info);
|
||||
--
|
||||
2.21.0
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [48563] Runaway: A Twist of Fate renders its cursor incorrectly
|
@@ -0,0 +1,48 @@
|
||||
From f8f6f53f2bb3d138717ac7a82c78010bce874d4a Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 25 Jan 2021 19:14:32 +1100
|
||||
Subject: [PATCH] dsound: Fake success for EAX Set Buffer/ListenerProperties
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50551
|
||||
---
|
||||
dlls/dsound/buffer.c | 3 ++-
|
||||
dlls/dsound/eax.c | 8 ++++----
|
||||
2 files changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
|
||||
index 6393656c9fa..24ff1a6198c 100644
|
||||
--- a/dlls/dsound/buffer.c
|
||||
+++ b/dlls/dsound/buffer.c
|
||||
@@ -1299,7 +1299,8 @@ static HRESULT WINAPI IKsPropertySetImpl_Set(IKsPropertySet *iface, REFGUID guid
|
||||
|
||||
TRACE("(%p,%s,%d,%p,%d,%p,%d)\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData);
|
||||
|
||||
- if (IsEqualGUID(&DSPROPSETID_EAX_ReverbProperties, guidPropSet) || IsEqualGUID(&DSPROPSETID_EAXBUFFER_ReverbProperties, guidPropSet))
|
||||
+ if (IsEqualGUID(&DSPROPSETID_EAX_ReverbProperties, guidPropSet) || IsEqualGUID(&DSPROPSETID_EAXBUFFER_ReverbProperties, guidPropSet) ||
|
||||
+ IsEqualGUID(&DSPROPSETID_EAX20_ListenerProperties, guidPropSet) || IsEqualGUID(&DSPROPSETID_EAX20_BufferProperties, guidPropSet))
|
||||
return EAX_Set(This, guidPropSet, dwPropID, pInstanceData, cbInstanceData, pPropData, cbPropData);
|
||||
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c
|
||||
index 6a6d22bc031..b3f48cdb5bd 100644
|
||||
--- a/dlls/dsound/eax.c
|
||||
+++ b/dlls/dsound/eax.c
|
||||
@@ -1082,11 +1082,11 @@ HRESULT WINAPI EAX_Set(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
|
||||
|
||||
return S_OK;
|
||||
} else if (IsEqualGUID(&DSPROPSETID_EAX20_ListenerProperties, guidPropSet)) {
|
||||
- FIXME("Unsupported DSPROPSETID_EAX20_ListenerProperties: %d\n", dwPropID);
|
||||
- return E_PROP_ID_UNSUPPORTED;
|
||||
+ FIXME("Unsupported DSPROPSETID_EAX20_ListenerProperties: %d - Faking Success\n", dwPropID);
|
||||
+ return S_OK;
|
||||
} else if (IsEqualGUID(&DSPROPSETID_EAX20_BufferProperties, guidPropSet)) {
|
||||
- FIXME("Unsupported DSPROPSETID_EAX20_BufferProperties: %d\n", dwPropID);
|
||||
- return E_PROP_ID_UNSUPPORTED;
|
||||
+ FIXME("Unsupported DSPROPSETID_EAX20_BufferProperties: %d - Faking Success\n", dwPropID);
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
FIXME("(%p,%s,%d,%p,%d,%p,%d)\n",
|
||||
--
|
||||
2.29.2
|
||||
|
@@ -1,122 +0,0 @@
|
||||
From 065142976ed5c7814830579e36612d3c515d90c3 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 5 Jan 2021 11:36:25 +1100
|
||||
Subject: [PATCH] dsound: IDirectSoundBuffer8 GetStatus return
|
||||
DSBSTATUS_LOCSOFTWARE for deferred buffers
|
||||
|
||||
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=21014
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/dsound/buffer.c | 2 +
|
||||
dlls/dsound/tests/dsound8.c | 74 +++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 76 insertions(+)
|
||||
|
||||
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
|
||||
index 96391ebba03..6393656c9fa 100644
|
||||
--- a/dlls/dsound/buffer.c
|
||||
+++ b/dlls/dsound/buffer.c
|
||||
@@ -421,6 +421,8 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetStatus(IDirectSoundBuffer8 *ifac
|
||||
if (This->playflags & DSBPLAY_LOOPING)
|
||||
*status |= DSBSTATUS_LOOPING;
|
||||
}
|
||||
+ if (This->dsbd.dwFlags & DSBCAPS_LOCDEFER)
|
||||
+ *status |= DSBSTATUS_LOCSOFTWARE;
|
||||
ReleaseSRWLockShared(&This->lock);
|
||||
|
||||
TRACE("status=%x\n", *status);
|
||||
diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c
|
||||
index 81c5710dbaf..85272dd9b55 100644
|
||||
--- a/dlls/dsound/tests/dsound8.c
|
||||
+++ b/dlls/dsound/tests/dsound8.c
|
||||
@@ -1809,6 +1809,79 @@ static void test_effects(void)
|
||||
ok(!ref, "Got outstanding refcount %u.\n", ref);
|
||||
}
|
||||
|
||||
+static void test_AcquireResources(void)
|
||||
+{
|
||||
+ IDirectSound8 *dsound;
|
||||
+ IDirectSoundBuffer *primary, *secondary;
|
||||
+ DSBUFFERDESC bufdesc;
|
||||
+ WAVEFORMATEX fmt;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ hr = DirectSoundCreate8(NULL, &dsound, NULL);
|
||||
+ ok(hr == DS_OK || hr == DSERR_NODRIVER, "Got hr %#x.\n", hr);
|
||||
+ if (FAILED(hr))
|
||||
+ return;
|
||||
+
|
||||
+ hr = IDirectSound8_SetCooperativeLevel(dsound, get_hwnd(), DSSCL_PRIORITY);
|
||||
+ ok(hr == DS_OK, "Got hr %#x.\n", hr);
|
||||
+
|
||||
+ bufdesc.dwSize = sizeof(bufdesc);
|
||||
+ bufdesc.dwFlags = DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_PRIMARYBUFFER;
|
||||
+ bufdesc.dwBufferBytes = 0;
|
||||
+ bufdesc.dwReserved = 0;
|
||||
+ bufdesc.lpwfxFormat = NULL;
|
||||
+ bufdesc.guid3DAlgorithm = GUID_NULL;
|
||||
+
|
||||
+ hr = IDirectSound8_CreateSoundBuffer(dsound, &bufdesc, &primary, NULL);
|
||||
+ ok(hr == S_OK, "CreateSoundBuffer failed: %08x\n", hr);
|
||||
+ if(hr != S_OK) {
|
||||
+ IDirectSound_Release(dsound);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ fmt.wFormatTag = WAVE_FORMAT_PCM;
|
||||
+ fmt.nChannels = 2;
|
||||
+ fmt.nSamplesPerSec = 48000;
|
||||
+ fmt.wBitsPerSample = 16;
|
||||
+ fmt.nBlockAlign = fmt.nChannels * fmt.wBitsPerSample / 8;
|
||||
+ fmt.nAvgBytesPerSec = fmt.nBlockAlign * fmt.nSamplesPerSec;
|
||||
+ fmt.cbSize = 0;
|
||||
+
|
||||
+ bufdesc.lpwfxFormat = &fmt;
|
||||
+ bufdesc.dwBufferBytes = fmt.nSamplesPerSec * fmt.nBlockAlign / 10;
|
||||
+ bufdesc.dwFlags = DSBCAPS_LOCDEFER | DSBCAPS_CTRLVOLUME;
|
||||
+
|
||||
+ /* see if we can create one more */
|
||||
+ hr = IDirectSound8_CreateSoundBuffer(dsound, &bufdesc, &secondary, NULL);
|
||||
+ ok(hr == S_OK, "CreateSoundBuffer gave wrong error: %08x\n", hr);
|
||||
+ if(hr == S_OK) {
|
||||
+ DWORD status;
|
||||
+ IDirectSoundBuffer8 *buffer8;
|
||||
+
|
||||
+ hr = IDirectSoundBuffer_QueryInterface(secondary, &IID_IDirectSoundBuffer8, (void **)&buffer8);
|
||||
+ ok(hr == S_OK, "got: %08x\n", hr);
|
||||
+
|
||||
+ status = 0xFFFF;
|
||||
+ hr = IDirectSoundBuffer8_GetStatus(buffer8, &status);
|
||||
+ ok(hr == S_OK, "got: %08x\n", hr);
|
||||
+ todo_wine ok(status == 0, "got: %08x\n", status);
|
||||
+
|
||||
+ hr = IDirectSoundBuffer8_AcquireResources(buffer8, 0, 0, NULL);
|
||||
+ ok(hr == S_OK, "got: %08x\n", hr);
|
||||
+
|
||||
+ status = 0xFFFF;
|
||||
+ hr = IDirectSoundBuffer8_GetStatus(buffer8, &status);
|
||||
+ ok(hr == S_OK, "got: %08x\n", hr);
|
||||
+ ok(status == DSBSTATUS_LOCSOFTWARE, "got: %08x\n", status);
|
||||
+
|
||||
+ IDirectSoundBuffer8_Release(buffer8);
|
||||
+ IDirectSoundBuffer_Release(secondary);
|
||||
+ }
|
||||
+
|
||||
+ IDirectSoundBuffer_Release(primary);
|
||||
+ IDirectSound_Release(dsound);
|
||||
+}
|
||||
+
|
||||
START_TEST(dsound8)
|
||||
{
|
||||
DWORD cookie;
|
||||
@@ -1822,6 +1895,7 @@ START_TEST(dsound8)
|
||||
test_hw_buffers();
|
||||
test_first_device();
|
||||
test_primary_flags();
|
||||
+ test_AcquireResources();
|
||||
|
||||
hr = CoRegisterClassObject(&testdmo_clsid, (IUnknown *)&testdmo_cf,
|
||||
CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie);
|
||||
--
|
||||
2.29.2
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [21014] dsound: IDirectSoundBuffer8 GetStatus return DSBSTATUS_LOCSOFTWARE for deferred buffers
|
@@ -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
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From e5418972013afdb97f857e49d0beb06833b3b474 Mon Sep 17 00:00:00 2001
|
||||
From 45b0af272838c1b28dee3dd50c588af888604f59 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 7 Jun 2018 20:09:59 -0500
|
||||
Subject: [PATCH] server: Create server objects for eventfd-based
|
||||
@@ -28,7 +28,7 @@ index b58ce1e3002..5f225fd0591 100644
|
||||
file.c \
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
new file mode 100644
|
||||
index 00000000000..b8b257281bf
|
||||
index 00000000000..a571855c70a
|
||||
--- /dev/null
|
||||
+++ b/server/esync.c
|
||||
@@ -0,0 +1,320 @@
|
||||
@@ -152,8 +152,8 @@ index 00000000000..b8b257281bf
|
||||
+static const struct object_ops esync_ops =
|
||||
+{
|
||||
+ sizeof(struct esync), /* size */
|
||||
+ &no_type, /* type */
|
||||
+ esync_dump, /* dump */
|
||||
+ no_get_type, /* get_type */
|
||||
+ no_add_queue, /* add_queue */
|
||||
+ NULL, /* remove_queue */
|
||||
+ NULL, /* signaled */
|
||||
@@ -403,10 +403,10 @@ index dae08339874..f68888d0fa8 100644
|
||||
set_current_time();
|
||||
init_scheduler();
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index eba14534b9d..63fe88f9dda 100644
|
||||
index abccc0a1275..f41afda0251 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3657,3 +3657,27 @@ struct handle_info
|
||||
@@ -3695,3 +3695,27 @@ struct handle_info
|
||||
@REQ(resume_process)
|
||||
obj_handle_t handle; /* process handle */
|
||||
@END
|
||||
@@ -435,5 +435,5 @@ index eba14534b9d..63fe88f9dda 100644
|
||||
+ unsigned int shm_idx;
|
||||
+@END
|
||||
--
|
||||
2.29.2
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From fd3e782fbebdfbac412ab3ee9ba01c2a562b61ee Mon Sep 17 00:00:00 2001
|
||||
From b528c37ea124f6c84bf2383a75ae50dc6f12b571 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 12:09:22 -0500
|
||||
Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores.
|
||||
@@ -16,7 +16,7 @@ Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores.
|
||||
create mode 100644 dlls/ntdll/unix/esync.h
|
||||
|
||||
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
|
||||
index f39ffb42c6f..f742d084906 100644
|
||||
index 258274ac529..1c3fb065ecf 100644
|
||||
--- a/dlls/ntdll/Makefile.in
|
||||
+++ b/dlls/ntdll/Makefile.in
|
||||
@@ -46,6 +46,7 @@ C_SRCS = \
|
||||
@@ -348,10 +348,10 @@ index 00000000000..a50a755149a
|
||||
+
|
||||
+extern int receive_fd( obj_handle_t *handle ) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
|
||||
index c2b6ea603e3..ab2d9e347c3 100644
|
||||
index bcd1635e75c..52e61feb43a 100644
|
||||
--- a/dlls/ntdll/unix/loader.c
|
||||
+++ b/dlls/ntdll/unix/loader.c
|
||||
@@ -86,6 +86,7 @@
|
||||
@@ -89,6 +89,7 @@
|
||||
#include "winioctl.h"
|
||||
#include "winternl.h"
|
||||
#include "unix_private.h"
|
||||
@@ -359,16 +359,16 @@ index c2b6ea603e3..ab2d9e347c3 100644
|
||||
#include "wine/list.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
@@ -1564,6 +1565,7 @@ static void start_main_thread(void)
|
||||
@@ -1626,6 +1627,7 @@ static void start_main_thread(void)
|
||||
signal_init_thread( teb );
|
||||
dbg_init();
|
||||
server_init_process();
|
||||
startup_info_size = server_init_thread( teb->Peb, &suspend );
|
||||
startup_info_size = server_init_process();
|
||||
+ esync_init();
|
||||
virtual_map_user_shared_data();
|
||||
init_cpu_info();
|
||||
init_files();
|
||||
diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c
|
||||
index 7236f0acb83..971341bf6e0 100644
|
||||
index 7b469959f66..3063a13efb5 100644
|
||||
--- a/dlls/ntdll/unix/server.c
|
||||
+++ b/dlls/ntdll/unix/server.c
|
||||
@@ -112,7 +112,7 @@ timeout_t server_start_time = 0; /* time of server startup */
|
||||
@@ -380,7 +380,7 @@ index 7236f0acb83..971341bf6e0 100644
|
||||
|
||||
/* atomically exchange a 64-bit value */
|
||||
static inline LONG64 interlocked_xchg64( LONG64 *dest, LONG64 val )
|
||||
@@ -813,7 +813,7 @@ void CDECL wine_server_send_fd( int fd )
|
||||
@@ -832,7 +832,7 @@ void CDECL wine_server_send_fd( int fd )
|
||||
*
|
||||
* Receive a file descriptor passed from the server.
|
||||
*/
|
||||
@@ -390,7 +390,7 @@ index 7236f0acb83..971341bf6e0 100644
|
||||
struct iovec vec;
|
||||
struct msghdr msghdr;
|
||||
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
|
||||
index bba7af7e34f..663a170fc61 100644
|
||||
index 383e9c93273..19e1494a9b8 100644
|
||||
--- a/dlls/ntdll/unix/sync.c
|
||||
+++ b/dlls/ntdll/unix/sync.c
|
||||
@@ -72,6 +72,7 @@
|
||||
@@ -424,5 +424,5 @@ index b8b257281bf..226e70cd1ad 100644
|
||||
int do_esync(void)
|
||||
{
|
||||
--
|
||||
2.28.0
|
||||
2.29.2
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From af7dc115ada8acf19aebedfc091e048b919c2478 Mon Sep 17 00:00:00 2001
|
||||
From 3a159edee2db7634475ee665e3ab0cf56c5425f6 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 8 Jun 2018 18:51:40 -0500
|
||||
Subject: [PATCH] server: Add an object operation to grab the esync file
|
||||
@@ -110,10 +110,10 @@ index 0bad4d7a260..176cf1b817e 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/console.c b/server/console.c
|
||||
index 295db7767b2..a67f1918a3a 100644
|
||||
index d1f948b23a6..cc534e8c9c1 100644
|
||||
--- a/server/console.c
|
||||
+++ b/server/console.c
|
||||
@@ -82,6 +82,7 @@ static const struct object_ops console_ops =
|
||||
@@ -81,6 +81,7 @@ static const struct object_ops console_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
console_signaled, /* signaled */
|
||||
@@ -121,7 +121,7 @@ index 295db7767b2..a67f1918a3a 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
console_get_fd, /* get_fd */
|
||||
@@ -157,6 +158,7 @@ static const struct object_ops console_server_ops =
|
||||
@@ -156,6 +157,7 @@ static const struct object_ops console_server_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
console_server_signaled, /* signaled */
|
||||
@@ -129,7 +129,7 @@ index 295db7767b2..a67f1918a3a 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
console_server_get_fd, /* get_fd */
|
||||
@@ -225,6 +227,7 @@ static const struct object_ops screen_buffer_ops =
|
||||
@@ -224,6 +226,7 @@ static const struct object_ops screen_buffer_ops =
|
||||
screen_buffer_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -137,7 +137,7 @@ index 295db7767b2..a67f1918a3a 100644
|
||||
NULL, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
screen_buffer_get_fd, /* get_fd */
|
||||
@@ -274,6 +277,7 @@ static const struct object_ops console_device_ops =
|
||||
@@ -273,6 +276,7 @@ static const struct object_ops console_device_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -145,7 +145,7 @@ index 295db7767b2..a67f1918a3a 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -311,6 +315,7 @@ static const struct object_ops console_input_ops =
|
||||
@@ -310,6 +314,7 @@ static const struct object_ops console_input_ops =
|
||||
console_input_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -153,7 +153,7 @@ index 295db7767b2..a67f1918a3a 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
console_input_get_fd, /* get_fd */
|
||||
@@ -367,6 +372,7 @@ static const struct object_ops console_output_ops =
|
||||
@@ -366,6 +371,7 @@ static const struct object_ops console_output_ops =
|
||||
console_output_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -161,7 +161,7 @@ index 295db7767b2..a67f1918a3a 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
console_output_get_fd, /* get_fd */
|
||||
@@ -424,6 +430,7 @@ static const struct object_ops console_connection_ops =
|
||||
@@ -423,6 +429,7 @@ static const struct object_ops console_connection_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -170,7 +170,7 @@ index 295db7767b2..a67f1918a3a 100644
|
||||
no_signal, /* signal */
|
||||
console_connection_get_fd, /* get_fd */
|
||||
diff --git a/server/debugger.c b/server/debugger.c
|
||||
index e4a6c1e43a8..c37f97aa0b6 100644
|
||||
index 9531a4b6909..7eb7847a9da 100644
|
||||
--- a/server/debugger.c
|
||||
+++ b/server/debugger.c
|
||||
@@ -73,6 +73,7 @@ static const struct object_ops debug_event_ops =
|
||||
@@ -181,10 +181,10 @@ index e4a6c1e43a8..c37f97aa0b6 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -101,6 +102,7 @@ static const struct object_ops debug_ctx_ops =
|
||||
@@ -103,6 +104,7 @@ static const struct object_ops debug_obj_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
debug_ctx_signaled, /* signaled */
|
||||
debug_obj_signaled, /* signaled */
|
||||
+ NULL, /* get_esync_fd */
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
@@ -226,7 +226,7 @@ index 652da83e1e2..cc9aa2358a4 100644
|
||||
no_signal, /* signal */
|
||||
device_file_get_fd, /* get_fd */
|
||||
diff --git a/server/directory.c b/server/directory.c
|
||||
index 81d02d6f64e..1ffa35f0cc8 100644
|
||||
index ca9f978ff7f..2d25667106e 100644
|
||||
--- a/server/directory.c
|
||||
+++ b/server/directory.c
|
||||
@@ -57,6 +57,7 @@ static const struct object_ops object_type_ops =
|
||||
@@ -278,7 +278,7 @@ index cba9472aa3d..06655fc7dd6 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index c3c53489212..d3b1e515b52 100644
|
||||
index 673055718f8..5b76e3a876e 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -216,6 +216,7 @@ static const struct object_ops fd_ops =
|
||||
@@ -314,10 +314,10 @@ index c3c53489212..d3b1e515b52 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/file.c b/server/file.c
|
||||
index 2cc4a9d978c..5c28b1c176d 100644
|
||||
index d7e1af5841a..308d19cec31 100644
|
||||
--- a/server/file.c
|
||||
+++ b/server/file.c
|
||||
@@ -86,6 +86,7 @@ static const struct object_ops file_ops =
|
||||
@@ -85,6 +85,7 @@ static const struct object_ops file_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
default_fd_signaled, /* signaled */
|
||||
@@ -386,7 +386,7 @@ index 5d26c606080..2e09bab22fa 100644
|
||||
no_signal, /* signal */
|
||||
mailslot_device_file_get_fd, /* get_fd */
|
||||
diff --git a/server/mapping.c b/server/mapping.c
|
||||
index 6c2e7a1fd2b..d06ceaa1a66 100644
|
||||
index 9c51aa3bec7..70395b804b0 100644
|
||||
--- a/server/mapping.c
|
||||
+++ b/server/mapping.c
|
||||
@@ -68,6 +68,7 @@ static const struct object_ops ranges_ops =
|
||||
@@ -483,7 +483,7 @@ index 73058fd3f99..02878ef0e0e 100644
|
||||
void (*satisfied)(struct object *,struct wait_queue_entry *);
|
||||
/* signal an object */
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index 5b3e29e5dfd..a7db8332702 100644
|
||||
index 3dabe0e6cfa..a8b11686315 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -78,6 +78,7 @@ static const struct object_ops process_ops =
|
||||
@@ -531,10 +531,10 @@ index a552fed57bb..263bb46ea00 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/registry.c b/server/registry.c
|
||||
index c937e051597..8110bbb340c 100644
|
||||
index 64aec1d83c9..49a3c679207 100644
|
||||
--- a/server/registry.c
|
||||
+++ b/server/registry.c
|
||||
@@ -160,6 +160,7 @@ static const struct object_ops key_ops =
|
||||
@@ -161,6 +161,7 @@ static const struct object_ops key_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -591,7 +591,7 @@ index 7c2bf2cc154..b6d6dcfc4b6 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/sock.c b/server/sock.c
|
||||
index 1ff56f7bbe5..57dd5a7c6d7 100644
|
||||
index 8c146a0a8f8..57d994ee332 100644
|
||||
--- a/server/sock.c
|
||||
+++ b/server/sock.c
|
||||
@@ -188,6 +188,7 @@ static const struct object_ops sock_ops =
|
||||
@@ -602,7 +602,7 @@ index 1ff56f7bbe5..57dd5a7c6d7 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
sock_get_fd, /* get_fd */
|
||||
@@ -1527,6 +1528,7 @@ static const struct object_ops ifchange_ops =
|
||||
@@ -1533,6 +1534,7 @@ static const struct object_ops ifchange_ops =
|
||||
add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -610,7 +610,7 @@ index 1ff56f7bbe5..57dd5a7c6d7 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
ifchange_get_fd, /* get_fd */
|
||||
@@ -1748,6 +1750,7 @@ static const struct object_ops socket_device_ops =
|
||||
@@ -1754,6 +1756,7 @@ static const struct object_ops socket_device_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -631,7 +631,7 @@ index 0b85350e1a5..c7212618cac 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index 0a0d957384b..c10f1710542 100644
|
||||
index f493b7b2aa8..29a692361f8 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -110,6 +110,7 @@ static const struct object_ops thread_apc_ops =
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 05c4a58d8cc0fbafc760d3a0d4d6c14975e33fe2 Mon Sep 17 00:00:00 2001
|
||||
From e3bc0f8b38f7f68fe132db47a0fc239af4843181 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 15:11:12 -0500
|
||||
Subject: [PATCH] server: Create eventfd file descriptors for process objects.
|
||||
@@ -11,7 +11,7 @@ Subject: [PATCH] server: Create eventfd file descriptors for process objects.
|
||||
4 files changed, 35 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
index cfbbcf55c48..61513333bfd 100644
|
||||
index d61dfdcd956..e18b76bff5b 100644
|
||||
--- a/server/esync.c
|
||||
+++ b/server/esync.c
|
||||
@@ -297,6 +297,24 @@ struct esync *create_esync( struct object *root, const struct unicode_str *name,
|
||||
@@ -49,7 +49,7 @@ index 7ca4ca89394..6a0a367124d 100644
|
||||
void esync_init(void);
|
||||
+int esync_create_fd( int initval, int flags );
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index 30699fbaeae..febfc0237c6 100644
|
||||
index e95c33132e6..7cf8953f47e 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -49,6 +49,7 @@
|
||||
@@ -58,9 +58,9 @@ index 30699fbaeae..febfc0237c6 100644
|
||||
#include "security.h"
|
||||
+#include "esync.h"
|
||||
|
||||
/* process structure */
|
||||
/* process object */
|
||||
|
||||
@@ -68,6 +69,7 @@ static struct security_descriptor *process_get_sd( struct object *obj );
|
||||
@@ -81,6 +82,7 @@ static struct security_descriptor *process_get_sd( struct object *obj );
|
||||
static void process_poll_event( struct fd *fd, int event );
|
||||
static struct list *process_get_kernel_obj_list( struct object *obj );
|
||||
static void process_destroy( struct object *obj );
|
||||
@@ -68,7 +68,7 @@ index 30699fbaeae..febfc0237c6 100644
|
||||
static void terminate_process( struct process *process, struct thread *skip, int exit_code );
|
||||
|
||||
static const struct object_ops process_ops =
|
||||
@@ -78,7 +80,7 @@ static const struct object_ops process_ops =
|
||||
@@ -91,7 +93,7 @@ static const struct object_ops process_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
process_signaled, /* signaled */
|
||||
@@ -77,7 +77,7 @@ index 30699fbaeae..febfc0237c6 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -545,6 +547,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
|
||||
@@ -553,6 +555,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
|
||||
process->trace_data = 0;
|
||||
process->rawinput_mouse = NULL;
|
||||
process->rawinput_kbd = NULL;
|
||||
@@ -85,7 +85,7 @@ index 30699fbaeae..febfc0237c6 100644
|
||||
list_init( &process->kernel_object );
|
||||
list_init( &process->thread_list );
|
||||
list_init( &process->locks );
|
||||
@@ -601,6 +604,9 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
|
||||
@@ -609,6 +612,9 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
|
||||
if (!token_assign_label( process->token, security_high_label_sid ))
|
||||
goto error;
|
||||
|
||||
@@ -95,7 +95,7 @@ index 30699fbaeae..febfc0237c6 100644
|
||||
set_fd_events( process->msg_fd, POLLIN ); /* start listening to events */
|
||||
return process;
|
||||
|
||||
@@ -649,6 +655,7 @@ static void process_destroy( struct object *obj )
|
||||
@@ -655,6 +661,7 @@ static void process_destroy( struct object *obj )
|
||||
if (process->id) free_ptid( process->id );
|
||||
if (process->token) release_object( process->token );
|
||||
free( process->dir_cache );
|
||||
@@ -103,7 +103,7 @@ index 30699fbaeae..febfc0237c6 100644
|
||||
}
|
||||
|
||||
/* dump a process on stdout for debugging purposes */
|
||||
@@ -673,6 +680,13 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
|
||||
@@ -672,6 +679,13 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
|
||||
return !process->running_threads;
|
||||
}
|
||||
|
||||
@@ -116,12 +116,12 @@ index 30699fbaeae..febfc0237c6 100644
|
||||
+
|
||||
static unsigned int process_map_access( struct object *obj, unsigned int access )
|
||||
{
|
||||
if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ;
|
||||
access = default_map_access( obj, access );
|
||||
diff --git a/server/process.h b/server/process.h
|
||||
index 56092e5b1ac..eec69ddbcaf 100644
|
||||
index caab869c8a0..afa90581b97 100644
|
||||
--- a/server/process.h
|
||||
+++ b/server/process.h
|
||||
@@ -98,6 +98,7 @@ struct process
|
||||
@@ -95,6 +95,7 @@ struct process
|
||||
const struct rawinput_device *rawinput_mouse; /* rawinput mouse device, if any */
|
||||
const struct rawinput_device *rawinput_kbd; /* rawinput keyboard device, if any */
|
||||
struct list kernel_object; /* list of kernel object pointers */
|
||||
@@ -130,5 +130,5 @@ index 56092e5b1ac..eec69ddbcaf 100644
|
||||
|
||||
#define CPU_FLAG(cpu) (1 << (cpu))
|
||||
--
|
||||
2.28.0
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 3ff6192702c06e77ef2e6790215ec3a40216052f Mon Sep 17 00:00:00 2001
|
||||
From 0ffe77334eaf10be9a241dae48cf772228abde3b Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 8 Jun 2018 21:01:24 -0500
|
||||
Subject: [PATCH] server: Create eventfd file descriptors for event objects.
|
||||
@@ -13,7 +13,7 @@ This lets system processes shut down.
|
||||
3 files changed, 36 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
index 5f6e60ab24c..cb9bfba4463 100644
|
||||
index 2b9307267f9..975e5d2ddd6 100644
|
||||
--- a/server/esync.c
|
||||
+++ b/server/esync.c
|
||||
@@ -331,6 +331,14 @@ void esync_wake_up( struct object *obj )
|
||||
@@ -41,7 +41,7 @@ index 1e12560ddd6..fcbfd0989bb 100644
|
||||
void esync_wake_up( struct object *obj );
|
||||
+void esync_clear( int fd );
|
||||
diff --git a/server/event.c b/server/event.c
|
||||
index 06655fc7dd6..a416d214912 100644
|
||||
index 490fd9875bd..0938a73f648 100644
|
||||
--- a/server/event.c
|
||||
+++ b/server/event.c
|
||||
@@ -35,6 +35,7 @@
|
||||
@@ -50,9 +50,9 @@ index 06655fc7dd6..a416d214912 100644
|
||||
#include "security.h"
|
||||
+#include "esync.h"
|
||||
|
||||
struct event
|
||||
{
|
||||
@@ -42,15 +43,18 @@ struct event
|
||||
static const WCHAR event_name[] = {'E','v','e','n','t'};
|
||||
|
||||
@@ -56,13 +57,16 @@ struct event
|
||||
struct list kernel_object; /* list of kernel object pointers */
|
||||
int manual_reset; /* is it a manual reset event? */
|
||||
int signaled; /* event has been signaled */
|
||||
@@ -60,18 +60,16 @@ index 06655fc7dd6..a416d214912 100644
|
||||
};
|
||||
|
||||
static void event_dump( struct object *obj, int verbose );
|
||||
static struct object_type *event_get_type( struct object *obj );
|
||||
static int event_signaled( struct object *obj, struct wait_queue_entry *entry );
|
||||
static void event_satisfied( struct object *obj, struct wait_queue_entry *entry );
|
||||
+static int event_get_esync_fd( struct object *obj, enum esync_type *type );
|
||||
static unsigned int event_map_access( struct object *obj, unsigned int access );
|
||||
static int event_signal( struct object *obj, unsigned int access);
|
||||
static struct list *event_get_kernel_obj_list( struct object *obj );
|
||||
+static void event_destroy( struct object *obj );
|
||||
|
||||
static const struct object_ops event_ops =
|
||||
{
|
||||
@@ -60,7 +64,7 @@ static const struct object_ops event_ops =
|
||||
@@ -72,7 +76,7 @@ static const struct object_ops event_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
event_signaled, /* signaled */
|
||||
@@ -80,7 +78,7 @@ index 06655fc7dd6..a416d214912 100644
|
||||
event_satisfied, /* satisfied */
|
||||
event_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -74,7 +78,7 @@ static const struct object_ops event_ops =
|
||||
@@ -86,7 +90,7 @@ static const struct object_ops event_ops =
|
||||
no_open_file, /* open_file */
|
||||
event_get_kernel_obj_list, /* get_kernel_obj_list */
|
||||
no_close_handle, /* close_handle */
|
||||
@@ -89,7 +87,7 @@ index 06655fc7dd6..a416d214912 100644
|
||||
};
|
||||
|
||||
|
||||
@@ -128,6 +132,9 @@ struct event *create_event( struct object *root, const struct unicode_str *name,
|
||||
@@ -152,6 +156,9 @@ struct event *create_event( struct object *root, const struct unicode_str *name,
|
||||
list_init( &event->kernel_object );
|
||||
event->manual_reset = manual_reset;
|
||||
event->signaled = initial_state;
|
||||
@@ -99,7 +97,7 @@ index 06655fc7dd6..a416d214912 100644
|
||||
}
|
||||
}
|
||||
return event;
|
||||
@@ -156,6 +163,9 @@ void set_event( struct event *event )
|
||||
@@ -180,6 +187,9 @@ void set_event( struct event *event )
|
||||
void reset_event( struct event *event )
|
||||
{
|
||||
event->signaled = 0;
|
||||
@@ -109,7 +107,7 @@ index 06655fc7dd6..a416d214912 100644
|
||||
}
|
||||
|
||||
static void event_dump( struct object *obj, int verbose )
|
||||
@@ -180,6 +190,13 @@ static int event_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
@@ -197,6 +207,13 @@ static int event_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
return event->signaled;
|
||||
}
|
||||
|
||||
@@ -123,7 +121,7 @@ index 06655fc7dd6..a416d214912 100644
|
||||
static void event_satisfied( struct object *obj, struct wait_queue_entry *entry )
|
||||
{
|
||||
struct event *event = (struct event *)obj;
|
||||
@@ -217,6 +234,14 @@ static struct list *event_get_kernel_obj_list( struct object *obj )
|
||||
@@ -225,6 +242,14 @@ static struct list *event_get_kernel_obj_list( struct object *obj )
|
||||
return &event->kernel_object;
|
||||
}
|
||||
|
||||
@@ -139,5 +137,5 @@ index 06655fc7dd6..a416d214912 100644
|
||||
unsigned int attr, const struct security_descriptor *sd )
|
||||
{
|
||||
--
|
||||
2.28.0
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 21ef43501fbef2d5ded6890932294b1160ccc810 Mon Sep 17 00:00:00 2001
|
||||
From 949b61856a56c339cbe6f8ec88a34902e200ae8e Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 8 Jun 2018 21:43:37 -0500
|
||||
Subject: [PATCH] server: Allow (re)setting esync events on the server side.
|
||||
@@ -17,7 +17,7 @@ so this is how we do it.
|
||||
3 files changed, 42 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
index cb9bfba4463..ddee22432e5 100644
|
||||
index 975e5d2ddd6..ac59779a454 100644
|
||||
--- a/server/esync.c
|
||||
+++ b/server/esync.c
|
||||
@@ -116,7 +116,7 @@ struct esync
|
||||
@@ -28,7 +28,7 @@ index cb9bfba4463..ddee22432e5 100644
|
||||
+const struct object_ops esync_ops =
|
||||
{
|
||||
sizeof(struct esync), /* size */
|
||||
esync_dump, /* dump */
|
||||
&no_type, /* type */
|
||||
@@ -339,6 +339,26 @@ void esync_clear( int fd )
|
||||
read( fd, &value, sizeof(value) );
|
||||
}
|
||||
@@ -71,10 +71,10 @@ index fcbfd0989bb..aeb58c5469c 100644
|
||||
+void esync_set_event( struct esync *esync );
|
||||
+void esync_reset_event( struct esync *esync );
|
||||
diff --git a/server/event.c b/server/event.c
|
||||
index a416d214912..b6f989d4d6a 100644
|
||||
index 78d90dac5d6..bc2948c30aa 100644
|
||||
--- a/server/event.c
|
||||
+++ b/server/event.c
|
||||
@@ -142,6 +142,10 @@ struct event *create_event( struct object *root, const struct unicode_str *name,
|
||||
@@ -154,6 +154,10 @@ struct event *create_event( struct object *root, const struct unicode_str *name,
|
||||
|
||||
struct event *get_event_obj( struct process *process, obj_handle_t handle, unsigned int access )
|
||||
{
|
||||
@@ -85,7 +85,7 @@ index a416d214912..b6f989d4d6a 100644
|
||||
return (struct event *)get_handle_obj( process, handle, access, &event_ops );
|
||||
}
|
||||
|
||||
@@ -155,6 +159,12 @@ void pulse_event( struct event *event )
|
||||
@@ -167,6 +171,12 @@ void pulse_event( struct event *event )
|
||||
|
||||
void set_event( struct event *event )
|
||||
{
|
||||
@@ -98,7 +98,7 @@ index a416d214912..b6f989d4d6a 100644
|
||||
event->signaled = 1;
|
||||
/* wake up all waiters if manual reset, a single one otherwise */
|
||||
wake_up( &event->obj, !event->manual_reset );
|
||||
@@ -162,6 +172,11 @@ void set_event( struct event *event )
|
||||
@@ -174,6 +184,11 @@ void set_event( struct event *event )
|
||||
|
||||
void reset_event( struct event *event )
|
||||
{
|
||||
@@ -111,5 +111,5 @@ index a416d214912..b6f989d4d6a 100644
|
||||
|
||||
if (do_esync())
|
||||
--
|
||||
2.28.0
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 3d3cd983add6183a0e38c427d15895c331a2b666 Mon Sep 17 00:00:00 2001
|
||||
From 5bfa95c3058d8c869e7555514b05dc877a842e42 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 8 Jun 2018 22:04:29 -0500
|
||||
Subject: [PATCH] server: Create eventfd file descriptors for thread objects.
|
||||
@@ -9,18 +9,18 @@ Subject: [PATCH] server: Create eventfd file descriptors for thread objects.
|
||||
2 files changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index 785203b7fa6..b52a1f5048c 100644
|
||||
index 8432d0aa8ed..d4b88be3897 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -172,6 +172,7 @@ static const struct object_ops context_ops =
|
||||
@@ -186,6 +186,7 @@ struct type_descr thread_type =
|
||||
|
||||
static void dump_thread( struct object *obj, int verbose );
|
||||
static struct object_type *thread_get_type( struct object *obj );
|
||||
static int thread_signaled( struct object *obj, struct wait_queue_entry *entry );
|
||||
+static int thread_get_esync_fd( struct object *obj, enum esync_type *type );
|
||||
static unsigned int thread_map_access( struct object *obj, unsigned int access );
|
||||
static void thread_poll_event( struct fd *fd, int event );
|
||||
static struct list *thread_get_kernel_obj_list( struct object *obj );
|
||||
@@ -185,7 +186,7 @@ static const struct object_ops thread_ops =
|
||||
@@ -199,7 +200,7 @@ static const struct object_ops thread_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
thread_signaled, /* signaled */
|
||||
@@ -29,15 +29,15 @@ index 785203b7fa6..b52a1f5048c 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -225,6 +226,7 @@ static inline void init_thread_structure( struct thread *thread )
|
||||
@@ -239,6 +240,7 @@ static inline void init_thread_structure( struct thread *thread )
|
||||
thread->context = NULL;
|
||||
thread->teb = 0;
|
||||
thread->entry_point = 0;
|
||||
+ thread->esync_fd = -1;
|
||||
thread->debug_ctx = NULL;
|
||||
thread->system_regs = 0;
|
||||
thread->queue = NULL;
|
||||
@@ -361,6 +363,9 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
|
||||
thread->wait = NULL;
|
||||
@@ -374,6 +376,9 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ index 785203b7fa6..b52a1f5048c 100644
|
||||
set_fd_events( thread->request_fd, POLLIN ); /* start listening to events */
|
||||
add_process_thread( thread->process, thread );
|
||||
return thread;
|
||||
@@ -441,6 +446,9 @@ static void destroy_thread( struct object *obj )
|
||||
@@ -453,6 +458,9 @@ static void destroy_thread( struct object *obj )
|
||||
if (thread->exit_poll) remove_timeout_user( thread->exit_poll );
|
||||
if (thread->id) free_ptid( thread->id );
|
||||
if (thread->token) release_object( thread->token );
|
||||
@@ -57,7 +57,7 @@ index 785203b7fa6..b52a1f5048c 100644
|
||||
}
|
||||
|
||||
/* dump a thread on stdout for debugging purposes */
|
||||
@@ -466,6 +474,13 @@ static int thread_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
@@ -471,6 +479,13 @@ static int thread_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
return mythread->state == TERMINATED && !mythread->exit_poll;
|
||||
}
|
||||
|
||||
@@ -70,9 +70,9 @@ index 785203b7fa6..b52a1f5048c 100644
|
||||
+
|
||||
static unsigned int thread_map_access( struct object *obj, unsigned int access )
|
||||
{
|
||||
if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ | THREAD_QUERY_INFORMATION | THREAD_GET_CONTEXT;
|
||||
access = default_map_access( obj, access );
|
||||
diff --git a/server/thread.h b/server/thread.h
|
||||
index 78ca4c201b2..faffe13d795 100644
|
||||
index 077ab0929ba..99904557d44 100644
|
||||
--- a/server/thread.h
|
||||
+++ b/server/thread.h
|
||||
@@ -54,6 +54,7 @@ struct thread
|
||||
@@ -80,9 +80,9 @@ index 78ca4c201b2..faffe13d795 100644
|
||||
thread_id_t id; /* thread id */
|
||||
struct list mutex_list; /* list of currently owned mutexes */
|
||||
+ int esync_fd; /* esync file descriptor (signalled on exit) */
|
||||
struct debug_ctx *debug_ctx; /* debugger context if this thread is a debugger */
|
||||
unsigned int system_regs; /* which system regs have been set */
|
||||
struct msg_queue *queue; /* message queue */
|
||||
struct thread_wait *wait; /* current wait condition if sleeping */
|
||||
--
|
||||
2.28.0
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 9e3d043ea15a1814f2003b7c6ebe6968b51b7740 Mon Sep 17 00:00:00 2001
|
||||
From 1ad0cfe6a328fd4ffdbce2c61e1cc7c822391734 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 15 Jun 2018 11:01:44 -0500
|
||||
Subject: [PATCH] server: Create eventfd descriptors for timers.
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] server: Create eventfd descriptors for timers.
|
||||
1 file changed, 18 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/timer.c b/server/timer.c
|
||||
index 319b9d142db..11fcdf3bae7 100644
|
||||
index 23d03aa3582..43b40a13032 100644
|
||||
--- a/server/timer.c
|
||||
+++ b/server/timer.c
|
||||
@@ -36,6 +36,7 @@
|
||||
@@ -17,9 +17,9 @@ index 319b9d142db..11fcdf3bae7 100644
|
||||
#include "request.h"
|
||||
+#include "esync.h"
|
||||
|
||||
struct timer
|
||||
{
|
||||
@@ -48,11 +49,13 @@ struct timer
|
||||
static const WCHAR timer_name[] = {'T','i','m','e','r'};
|
||||
|
||||
@@ -62,10 +63,12 @@ struct timer
|
||||
struct thread *thread; /* thread that set the APC function */
|
||||
client_ptr_t callback; /* callback APC function */
|
||||
client_ptr_t arg; /* callback argument */
|
||||
@@ -27,13 +27,12 @@ index 319b9d142db..11fcdf3bae7 100644
|
||||
};
|
||||
|
||||
static void timer_dump( struct object *obj, int verbose );
|
||||
static struct object_type *timer_get_type( struct object *obj );
|
||||
static int timer_signaled( struct object *obj, struct wait_queue_entry *entry );
|
||||
+static int timer_get_esync_fd( struct object *obj, enum esync_type *type );
|
||||
static void timer_satisfied( struct object *obj, struct wait_queue_entry *entry );
|
||||
static unsigned int timer_map_access( struct object *obj, unsigned int access );
|
||||
static void timer_destroy( struct object *obj );
|
||||
@@ -65,7 +68,7 @@ static const struct object_ops timer_ops =
|
||||
|
||||
@@ -77,7 +80,7 @@ static const struct object_ops timer_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
timer_signaled, /* signaled */
|
||||
@@ -42,7 +41,7 @@ index 319b9d142db..11fcdf3bae7 100644
|
||||
timer_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -100,6 +103,10 @@ static struct timer *create_timer( struct object *root, const struct unicode_str
|
||||
@@ -112,6 +115,10 @@ static struct timer *create_timer( struct object *root, const struct unicode_str
|
||||
timer->period = 0;
|
||||
timer->timeout = NULL;
|
||||
timer->thread = NULL;
|
||||
@@ -53,7 +52,7 @@ index 319b9d142db..11fcdf3bae7 100644
|
||||
}
|
||||
}
|
||||
return timer;
|
||||
@@ -173,6 +180,9 @@ static int set_timer( struct timer *timer, timeout_t expire, unsigned int period
|
||||
@@ -185,6 +192,9 @@ static int set_timer( struct timer *timer, timeout_t expire, unsigned int period
|
||||
{
|
||||
period = 0; /* period doesn't make any sense for a manual timer */
|
||||
timer->signaled = 0;
|
||||
@@ -63,7 +62,7 @@ index 319b9d142db..11fcdf3bae7 100644
|
||||
}
|
||||
timer->when = (expire <= 0) ? expire - monotonic_time : max( expire, current_time );
|
||||
timer->period = period;
|
||||
@@ -207,6 +217,13 @@ static int timer_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
@@ -212,6 +222,13 @@ static int timer_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
return timer->signaled;
|
||||
}
|
||||
|
||||
@@ -78,5 +77,5 @@ index 319b9d142db..11fcdf3bae7 100644
|
||||
{
|
||||
struct timer *timer = (struct timer *)obj;
|
||||
--
|
||||
2.28.0
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From b04ab24c90337271146425edc2059328e42743b6 Mon Sep 17 00:00:00 2001
|
||||
From abe8fc2432fa484ab121005ad21a92c0c27668b7 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 17:17:31 -0500
|
||||
Subject: [PATCH] ntdll, server: Implement alertable waits.
|
||||
@@ -164,7 +164,7 @@ index d1a282c65e9..2a7c3865617 100644
|
||||
|
||||
/* We need to let the server know when we are doing a message wait, and when we
|
||||
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
|
||||
index 23731f0fdc6..b2020b6311a 100644
|
||||
index 1d6ba95d2a1..9c8e334aba6 100644
|
||||
--- a/dlls/ntdll/unix/unix_private.h
|
||||
+++ b/dlls/ntdll/unix/unix_private.h
|
||||
@@ -50,6 +50,7 @@ struct ntdll_thread_data
|
||||
@@ -176,10 +176,10 @@ index 23731f0fdc6..b2020b6311a 100644
|
||||
int reply_fd; /* fd for receiving server replies */
|
||||
int wait_fd[2]; /* fd for sleeping server requests */
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index 785583a340a..93646bc51f4 100644
|
||||
index c1e79a210f4..5631414bf4c 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -2552,6 +2552,7 @@ static void init_teb( TEB *teb, PEB *peb )
|
||||
@@ -2565,6 +2565,7 @@ static void init_teb( TEB *teb, PEB *peb )
|
||||
InitializeListHead( &teb->ActivationContextStack.FrameListCache );
|
||||
teb->StaticUnicodeString.Buffer = teb->StaticUnicodeBuffer;
|
||||
teb->StaticUnicodeString.MaximumLength = sizeof(teb->StaticUnicodeBuffer);
|
||||
@@ -244,10 +244,10 @@ index aeb58c5469c..cea025d9308 100644
|
||||
void esync_clear( int fd );
|
||||
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 30296aedde8..d2772aacec2 100644
|
||||
index f2ad5a88b28..56237afdcad 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3707,3 +3707,7 @@ enum esync_type
|
||||
@@ -3717,3 +3717,7 @@ enum esync_type
|
||||
@REQ(esync_msgwait)
|
||||
int in_msgwait; /* are we in a message wait? */
|
||||
@END
|
||||
@@ -256,7 +256,7 @@ index 30296aedde8..d2772aacec2 100644
|
||||
+@REQ(get_esync_apc_fd)
|
||||
+@END
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index b52a1f5048c..6fb8684f5e0 100644
|
||||
index 48c3eae7413..83f80740a46 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -227,6 +227,7 @@ static inline void init_thread_structure( struct thread *thread )
|
||||
@@ -264,10 +264,10 @@ index b52a1f5048c..6fb8684f5e0 100644
|
||||
thread->entry_point = 0;
|
||||
thread->esync_fd = -1;
|
||||
+ thread->esync_apc_fd = -1;
|
||||
thread->debug_ctx = NULL;
|
||||
thread->system_regs = 0;
|
||||
thread->queue = NULL;
|
||||
@@ -364,7 +365,10 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
|
||||
thread->wait = NULL;
|
||||
@@ -363,7 +364,10 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
|
||||
}
|
||||
|
||||
if (do_esync())
|
||||
@@ -278,7 +278,7 @@ index b52a1f5048c..6fb8684f5e0 100644
|
||||
|
||||
set_fd_events( thread->request_fd, POLLIN ); /* start listening to events */
|
||||
add_process_thread( thread->process, thread );
|
||||
@@ -1152,8 +1156,13 @@ static int queue_apc( struct process *process, struct thread *thread, struct thr
|
||||
@@ -1150,8 +1154,13 @@ static int queue_apc( struct process *process, struct thread *thread, struct thr
|
||||
grab_object( apc );
|
||||
list_add_tail( queue, &apc->entry );
|
||||
if (!list_prev( queue, &apc->entry )) /* first one */
|
||||
@@ -292,7 +292,7 @@ index b52a1f5048c..6fb8684f5e0 100644
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1199,6 +1208,10 @@ static struct thread_apc *thread_dequeue_apc( struct thread *thread, int system
|
||||
@@ -1197,6 +1206,10 @@ static struct thread_apc *thread_dequeue_apc( struct thread *thread, int system
|
||||
apc = LIST_ENTRY( ptr, struct thread_apc, entry );
|
||||
list_remove( ptr );
|
||||
}
|
||||
@@ -304,7 +304,7 @@ index b52a1f5048c..6fb8684f5e0 100644
|
||||
}
|
||||
|
||||
diff --git a/server/thread.h b/server/thread.h
|
||||
index faffe13d795..0f6108b684a 100644
|
||||
index 99904557d44..f41c3ddd61e 100644
|
||||
--- a/server/thread.h
|
||||
+++ b/server/thread.h
|
||||
@@ -55,6 +55,7 @@ struct thread
|
||||
@@ -312,9 +312,9 @@ index faffe13d795..0f6108b684a 100644
|
||||
struct list mutex_list; /* list of currently owned mutexes */
|
||||
int esync_fd; /* esync file descriptor (signalled on exit) */
|
||||
+ int esync_apc_fd; /* esync apc fd (signalled when APCs are present) */
|
||||
struct debug_ctx *debug_ctx; /* debugger context if this thread is a debugger */
|
||||
unsigned int system_regs; /* which system regs have been set */
|
||||
struct msg_queue *queue; /* message queue */
|
||||
struct thread_wait *wait; /* current wait condition if sleeping */
|
||||
--
|
||||
2.29.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 620371ae80be978b427c6d13e8f7b059bd4bb900 Mon Sep 17 00:00:00 2001
|
||||
From 1a2cd66380cef9a1f8a7a03f98d5f7af7c889bea Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sat, 7 Jul 2018 12:57:47 +0200
|
||||
Subject: [PATCH] server: Create eventfd descriptors for pseudo-fd objects and
|
||||
@@ -11,7 +11,7 @@ Subject: [PATCH] server: Create eventfd descriptors for pseudo-fd objects and
|
||||
3 files changed, 25 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index d3b1e515b52..a7d81ec055b 100644
|
||||
index 38f3ab79226..252236fbb91 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -102,6 +102,7 @@
|
||||
@@ -22,7 +22,7 @@ index d3b1e515b52..a7d81ec055b 100644
|
||||
|
||||
#include "winternl.h"
|
||||
#include "winioctl.h"
|
||||
@@ -203,6 +204,7 @@ struct fd
|
||||
@@ -205,6 +206,7 @@ struct fd
|
||||
struct completion *completion; /* completion object attached to this fd */
|
||||
apc_param_t comp_key; /* completion key to set in completion events */
|
||||
unsigned int comp_flags; /* completion flags */
|
||||
@@ -30,7 +30,7 @@ index d3b1e515b52..a7d81ec055b 100644
|
||||
};
|
||||
|
||||
static void fd_dump( struct object *obj, int verbose );
|
||||
@@ -1593,6 +1595,9 @@ static void fd_destroy( struct object *obj )
|
||||
@@ -1596,6 +1598,9 @@ static void fd_destroy( struct object *obj )
|
||||
free( fd->unlink_name );
|
||||
free( fd->unix_name );
|
||||
}
|
||||
@@ -40,7 +40,7 @@ index d3b1e515b52..a7d81ec055b 100644
|
||||
}
|
||||
|
||||
/* check if the desired access is possible without violating */
|
||||
@@ -1708,6 +1713,7 @@ static struct fd *alloc_fd_object(void)
|
||||
@@ -1713,6 +1718,7 @@ static struct fd *alloc_fd_object(void)
|
||||
fd->poll_index = -1;
|
||||
fd->completion = NULL;
|
||||
fd->comp_flags = 0;
|
||||
@@ -48,7 +48,7 @@ index d3b1e515b52..a7d81ec055b 100644
|
||||
init_async_queue( &fd->read_q );
|
||||
init_async_queue( &fd->write_q );
|
||||
init_async_queue( &fd->wait_q );
|
||||
@@ -1746,11 +1752,15 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
|
||||
@@ -1753,11 +1759,15 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
|
||||
fd->completion = NULL;
|
||||
fd->comp_flags = 0;
|
||||
fd->no_fd_status = STATUS_BAD_DEVICE_TYPE;
|
||||
@@ -64,7 +64,7 @@ index d3b1e515b52..a7d81ec055b 100644
|
||||
return fd;
|
||||
}
|
||||
|
||||
@@ -2149,6 +2159,9 @@ void set_fd_signaled( struct fd *fd, int signaled )
|
||||
@@ -2202,6 +2212,9 @@ void set_fd_signaled( struct fd *fd, int signaled )
|
||||
if (fd->comp_flags & FILE_SKIP_SET_EVENT_ON_HANDLE) return;
|
||||
fd->signaled = signaled;
|
||||
if (signaled) wake_up( fd->user, 0 );
|
||||
@@ -74,7 +74,7 @@ index d3b1e515b52..a7d81ec055b 100644
|
||||
}
|
||||
|
||||
/* handler for close_handle that refuses to close fd-associated handles in other processes */
|
||||
@@ -2180,6 +2193,15 @@ int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
@@ -2233,6 +2246,15 @@ int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -87,26 +87,26 @@ index d3b1e515b52..a7d81ec055b 100644
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/* default map_access() routine for objects that behave like an fd */
|
||||
unsigned int default_fd_map_access( struct object *obj, unsigned int access )
|
||||
int default_fd_get_poll_events( struct fd *fd )
|
||||
{
|
||||
int events = 0;
|
||||
diff --git a/server/file.h b/server/file.h
|
||||
index 477720f8b18..de260e29ddb 100644
|
||||
index 3b70799a3ec..f332c685add 100644
|
||||
--- a/server/file.h
|
||||
+++ b/server/file.h
|
||||
@@ -102,6 +102,7 @@ extern void set_fd_signaled( struct fd *fd, int signaled );
|
||||
extern char *dup_fd_name( struct fd *root, const char *name );
|
||||
@@ -104,6 +104,7 @@ extern char *dup_fd_name( struct fd *root, const char *name );
|
||||
extern void get_nt_name( struct fd *fd, struct unicode_str *name );
|
||||
|
||||
extern int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry );
|
||||
+extern int default_fd_get_esync_fd( struct object *obj, enum esync_type *type );
|
||||
extern unsigned int default_fd_map_access( struct object *obj, unsigned int access );
|
||||
extern int default_fd_get_poll_events( struct fd *fd );
|
||||
extern void default_poll_event( struct fd *fd, int event );
|
||||
extern void fd_queue_async( struct fd *fd, struct async *async, int type );
|
||||
diff --git a/server/named_pipe.c b/server/named_pipe.c
|
||||
index 9ab99d915b9..b438682d214 100644
|
||||
index 14596d46f6c..9b8fa97c67e 100644
|
||||
--- a/server/named_pipe.c
|
||||
+++ b/server/named_pipe.c
|
||||
@@ -163,7 +163,7 @@ static const struct object_ops pipe_server_ops =
|
||||
@@ -168,7 +168,7 @@ static const struct object_ops pipe_server_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
default_fd_signaled, /* signaled */
|
||||
@@ -115,7 +115,7 @@ index 9ab99d915b9..b438682d214 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
pipe_end_get_fd, /* get_fd */
|
||||
@@ -207,7 +207,7 @@ static const struct object_ops pipe_client_ops =
|
||||
@@ -212,7 +212,7 @@ static const struct object_ops pipe_client_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
default_fd_signaled, /* signaled */
|
||||
@@ -125,5 +125,5 @@ index 9ab99d915b9..b438682d214 100644
|
||||
no_signal, /* signal */
|
||||
pipe_end_get_fd, /* get_fd */
|
||||
--
|
||||
2.28.0
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 5126b7e8cd315c7e85d84b897fd2d271d62d91c1 Mon Sep 17 00:00:00 2001
|
||||
From 075bdc732f12d42184ee6a906f58051739972322 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 18:01:32 -0500
|
||||
Subject: [PATCH] ntdll, server: Abandon esync mutexes on thread exit.
|
||||
@@ -175,12 +175,12 @@ index cea025d9308..125da8e9d12 100644
|
||||
void esync_reset_event( struct esync *esync );
|
||||
+void esync_abandon_mutexes( struct thread *thread );
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index 6fb8684f5e0..f320f2b26e9 100644
|
||||
index 83f80740a46..bffe229586f 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -1328,6 +1328,8 @@ void kill_thread( struct thread *thread, int violent_death )
|
||||
@@ -1325,6 +1325,8 @@ void kill_thread( struct thread *thread, int violent_death )
|
||||
}
|
||||
kill_console_processes( thread, 0 );
|
||||
debug_exit_thread( thread );
|
||||
abandon_mutexes( thread );
|
||||
+ if (do_esync())
|
||||
+ esync_abandon_mutexes( thread );
|
||||
@@ -188,5 +188,5 @@ index 6fb8684f5e0..f320f2b26e9 100644
|
||||
{
|
||||
send_thread_signal( thread, SIGQUIT );
|
||||
--
|
||||
2.28.0
|
||||
2.29.2
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user