winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2015
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
775 discussions
Start a n
N
ew thread
Sebastian Lackner : winebuild: Conditionally use different code for restoring the context structure.
by Alexandre Julliard
03 Mar '15
03 Mar '15
Module: wine Branch: master Commit: 4c8b3f63be19e188fd379e9294df4a7eabb9198b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4c8b3f63be19e188fd379e929…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Mon Mar 2 00:29:42 2015 +0100 winebuild: Conditionally use different code for restoring the context structure. Fixes a regression introduced by 44fbc018eda12bdee5c2c1e2e40dbdc6a81b27fd. --- tools/winebuild/relay.c | 57 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c index 63c2ca4..cb4b0ca 100644 --- a/tools/winebuild/relay.c +++ b/tools/winebuild/relay.c @@ -852,36 +852,35 @@ static void build_call_from_regs_x86(void) /* Restore the context structure */ - output( "2:\n" ); + output( "2:\tpushl 0x94(%%ecx)\n" ); /* SegEs */ + output( "\tpopl %%es\n" ); + output( "\tpushl 0x90(%%ecx)\n" ); /* SegFs */ + output( "\tpopl %%fs\n" ); + output( "\tpushl 0x8c(%%ecx)\n" ); /* SegGs */ + output( "\tpopl %%gs\n" ); + + output( "\tmovw %%ss,%%ax\n" ); + output( "\tcmpw 0xc8(%%ecx),%%ax\n" ); /* SegSs */ + output( "\tjne 3f\n" ); /* As soon as we have switched stacks the context structure could * be invalid (when signal handlers are executed for example). Copy * values on the target stack before changing ESP. */ - output( "\tpushl 0xc8(%%ecx)\n" ); /* SegSs */ - output( "\tpopl %%es\n" ); output( "\tmovl 0xc4(%%ecx),%%eax\n" ); /* Esp */ output( "\tleal -4*4(%%eax),%%eax\n" ); output( "\tmovl 0xc0(%%ecx),%%edx\n" ); /* EFlags */ - output( "\t.byte 0x26\n\tmovl %%edx,3*4(%%eax)\n" ); + output( "\t.byte 0x36\n\tmovl %%edx,3*4(%%eax)\n" ); output( "\tmovl 0xbc(%%ecx),%%edx\n" ); /* SegCs */ - output( "\t.byte 0x26\n\tmovl %%edx,2*4(%%eax)\n" ); + output( "\t.byte 0x36\n\tmovl %%edx,2*4(%%eax)\n" ); output( "\tmovl 0xb8(%%ecx),%%edx\n" ); /* Eip */ - output( "\t.byte 0x26\n\tmovl %%edx,1*4(%%eax)\n" ); + output( "\t.byte 0x36\n\tmovl %%edx,1*4(%%eax)\n" ); output( "\tmovl 0xb0(%%ecx),%%edx\n" ); /* Eax */ - output( "\t.byte 0x26\n\tmovl %%edx,0*4(%%eax)\n" ); + output( "\t.byte 0x36\n\tmovl %%edx,0*4(%%eax)\n" ); - output( "\tpushl %%es\n" ); output( "\tpushl 0x98(%%ecx)\n" ); /* SegDs */ - output(" \tpushl 0x94(%%ecx)\n" ); /* SegEs */ - output( "\tpopl %%es\n" ); - output( "\tpushl 0x90(%%ecx)\n"); /* SegFs */ - output( "\tpopl %%fs\n" ); - output( "\tpushl 0x8c(%%ecx)\n"); /* SegGs */ - output( "\tpopl %%gs\n" ); - output( "\tmovl 0x9c(%%ecx),%%edi\n" ); /* Edi */ output( "\tmovl 0xa0(%%ecx),%%esi\n" ); /* Esi */ output( "\tmovl 0xa4(%%ecx),%%ebx\n" ); /* Ebx */ @@ -890,11 +889,37 @@ static void build_call_from_regs_x86(void) output( "\tmovl 0xac(%%ecx),%%ecx\n" ); /* Ecx */ output( "\tpopl %%ds\n" ); - output( "\tpopl %%ss\n" ); output( "\tmovl %%eax,%%esp\n" ); output( "\tpopl %%eax\n" ); output( "\tiret\n" ); + + output("3:\n"); + + /* Restore the context when the stack segment changes. We can't use + * the same code as above because we do not know if the stack segment + * is 16 or 32 bit, and 'movl' will throw an exception when we try to + * access memory above the limit. */ + + output( "\tmovl 0x9c(%%ecx),%%edi\n" ); /* Edi */ + output( "\tmovl 0xa0(%%ecx),%%esi\n" ); /* Esi */ + output( "\tmovl 0xa4(%%ecx),%%ebx\n" ); /* Ebx */ + output( "\tmovl 0xa8(%%ecx),%%edx\n" ); /* Edx */ + output( "\tmovl 0xb0(%%ecx),%%eax\n" ); /* Eax */ + output( "\tmovl 0xb4(%%ecx),%%ebp\n" ); /* Ebp */ + + output( "\tpushl 0xc8(%%ecx)\n" ); /* SegSs */ + output( "\tpopl %%ss\n" ); + output( "\tmovl 0xc4(%%ecx),%%esp\n" ); /* Esp */ + + output( "\tpushl 0xc0(%%ecx)\n" ); /* EFlags */ + output( "\tpushl 0xbc(%%ecx)\n" ); /* SegCs */ + output( "\tpushl 0xb8(%%ecx)\n" ); /* Eip */ + output( "\tpushl 0x98(%%ecx)\n" ); /* SegDs */ + output( "\tmovl 0xac(%%ecx),%%ecx\n" ); /* Ecx */ + + output( "\tpopl %%ds\n" ); + output( "\tiret\n" ); output_cfi( ".cfi_endproc" ); output_function_size( "__wine_call_from_regs" );
1
0
0
0
Nikolay Sivov : include: Fix null pointer dereference while tracing.
by Alexandre Julliard
03 Mar '15
03 Mar '15
Module: wine Branch: master Commit: bcd8b6f4ee540f8bd414939984061f4c187c7449 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bcd8b6f4ee540f8bd41493998…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 3 08:13:29 2015 +0300 include: Fix null pointer dereference while tracing. --- include/wine/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wine/debug.h b/include/wine/debug.h index 9028cb5..95d74d3 100644 --- a/include/wine/debug.h +++ b/include/wine/debug.h @@ -278,7 +278,7 @@ static inline const char *wine_dbgstr_variant( const VARIANT *v ) if (V_VT(v) == (VT_VARIANT|VT_BYREF)) return wine_dbg_sprintf( "%p {VT_VARIANT|VT_BYREF: %s}", v, wine_dbgstr_variant(V_VARIANTREF(v)) ); if (V_VT(v) == (VT_BSTR|VT_BYREF)) - return wine_dbg_sprintf( "%p {VT_BSTR|VT_BYREF: %s}", v, wine_dbgstr_w(*V_BSTRREF(v)) ); + return wine_dbg_sprintf( "%p {VT_BSTR|VT_BYREF: %s}", v, V_BSTRREF(v) ? wine_dbgstr_w(*V_BSTRREF(v)) : "(none)" ); return wine_dbg_sprintf( "%p {%s %p}", v, wine_dbgstr_vt(V_VT(v)), V_BYREF(v) ); }
1
0
0
0
Sebastian Lackner : ole32: Fix an invalid usage of InterlockedCompareExchange.
by Alexandre Julliard
03 Mar '15
03 Mar '15
Module: wine Branch: master Commit: c23db594aacf69675ebd57936449c412c34f6050 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c23db594aacf69675ebd57936…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Tue Mar 3 05:39:46 2015 +0100 ole32: Fix an invalid usage of InterlockedCompareExchange. --- dlls/ole32/marshal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c index b308600..c5c2023 100644 --- a/dlls/ole32/marshal.c +++ b/dlls/ole32/marshal.c @@ -805,11 +805,12 @@ static HRESULT proxy_manager_construct( static inline void proxy_manager_set_context(struct proxy_manager *This, MSHCTX dest_context, void *dest_context_data) { - MSHCTX old_dest_context = This->dest_context; + MSHCTX old_dest_context; MSHCTX new_dest_context; do { + old_dest_context = This->dest_context; new_dest_context = old_dest_context; /* "stronger" values overwrite "weaker" values. stronger values are * ones that disable more optimisations */ @@ -853,7 +854,7 @@ static inline void proxy_manager_set_context(struct proxy_manager *This, MSHCTX if (old_dest_context == new_dest_context) break; - old_dest_context = InterlockedCompareExchange((PLONG)&This->dest_context, new_dest_context, old_dest_context); + new_dest_context = InterlockedCompareExchange((PLONG)&This->dest_context, new_dest_context, old_dest_context); } while (new_dest_context != old_dest_context); if (dest_context_data)
1
0
0
0
Sebastian Lackner : ddraw: Remove unused code for ChangeUniquenessValue.
by Alexandre Julliard
03 Mar '15
03 Mar '15
Module: wine Branch: master Commit: 68528519fc203879132a74205b11cc9a0cfdd784 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68528519fc203879132a74205…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Tue Mar 3 05:09:56 2015 +0100 ddraw: Remove unused code for ChangeUniquenessValue. --- dlls/ddraw/ddraw_private.h | 1 - dlls/ddraw/surface.c | 31 +------------------------------ 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index a2eee1a..4a883b9 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -183,7 +183,6 @@ struct ddraw_surface DDSURFACEDESC2 surface_desc; /* Misc things */ - DWORD uniqueness_value; UINT mipmap_level; /* Clipper objects */ diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 331d2bb..cbf11da 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -3886,35 +3886,10 @@ static HRESULT WINAPI ddraw_surface2_GetDDInterface(IDirectDrawSurface2 *iface, return ddraw_surface7_GetDDInterface(&surface->IDirectDrawSurface7_iface, ddraw); } -/* This seems also windows implementation specific - I don't think WineD3D needs this */ static HRESULT WINAPI ddraw_surface7_ChangeUniquenessValue(IDirectDrawSurface7 *iface) { - struct ddraw_surface *This = impl_from_IDirectDrawSurface7(iface); - volatile struct ddraw_surface* vThis = This; - TRACE("iface %p.\n", iface); - wined3d_mutex_lock(); - /* A uniqueness value of 0 is apparently special. - * This needs to be checked. - * TODO: Write tests for this code and check if the volatile, interlocked stuff is really needed - */ - while (1) { - DWORD old_uniqueness_value = vThis->uniqueness_value; - DWORD new_uniqueness_value = old_uniqueness_value+1; - - if (old_uniqueness_value == 0) break; - if (new_uniqueness_value == 0) new_uniqueness_value = 1; - - if (InterlockedCompareExchange((LONG*)&vThis->uniqueness_value, - old_uniqueness_value, - new_uniqueness_value) - == old_uniqueness_value) - break; - } - - wined3d_mutex_unlock(); - return DD_OK; } @@ -3929,13 +3904,9 @@ static HRESULT WINAPI ddraw_surface4_ChangeUniquenessValue(IDirectDrawSurface4 * static HRESULT WINAPI ddraw_surface7_GetUniquenessValue(IDirectDrawSurface7 *iface, DWORD *pValue) { - struct ddraw_surface *surface = impl_from_IDirectDrawSurface7(iface); - TRACE("iface %p, value %p.\n", iface, pValue); - wined3d_mutex_lock(); - *pValue = surface->uniqueness_value; - wined3d_mutex_unlock(); + *pValue = 0; return DD_OK; }
1
0
0
0
Sebastian Lackner : ntdll/tests: Add tests for TpSimpleTryPost function.
by Alexandre Julliard
03 Mar '15
03 Mar '15
Module: wine Branch: master Commit: b282a937e2369016fc0fbc84f55f8ab57143ea9f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b282a937e2369016fc0fbc84f…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Tue Feb 24 05:42:03 2015 +0100 ntdll/tests: Add tests for TpSimpleTryPost function. --- dlls/ntdll/tests/Makefile.in | 1 + dlls/ntdll/tests/threadpool.c | 127 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+) diff --git a/dlls/ntdll/tests/Makefile.in b/dlls/ntdll/tests/Makefile.in index 81b4466..fc352dd 100644 --- a/dlls/ntdll/tests/Makefile.in +++ b/dlls/ntdll/tests/Makefile.in @@ -21,4 +21,5 @@ C_SRCS = \ rtlbitmap.c \ rtlstr.c \ string.c \ + threadpool.c \ time.c diff --git a/dlls/ntdll/tests/threadpool.c b/dlls/ntdll/tests/threadpool.c new file mode 100644 index 0000000..2e31b34 --- /dev/null +++ b/dlls/ntdll/tests/threadpool.c @@ -0,0 +1,127 @@ +/* + * Unit test suite for thread pool functions + * + * Copyright 2015 Sebastian Lackner + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "ntdll_test.h" + +static HMODULE hntdll = 0; +static NTSTATUS (WINAPI *pTpAllocPool)(TP_POOL **,PVOID); +static VOID (WINAPI *pTpReleasePool)(TP_POOL *); +static NTSTATUS (WINAPI *pTpSimpleTryPost)(PTP_SIMPLE_CALLBACK,PVOID,TP_CALLBACK_ENVIRON *); + +#define NTDLL_GET_PROC(func) \ + do \ + { \ + p ## func = (void *)GetProcAddress(hntdll, #func); \ + if (!p ## func) trace("Failed to get address for %s\n", #func); \ + } \ + while (0) + +static BOOL init_threadpool(void) +{ + hntdll = GetModuleHandleA("ntdll"); + if (!hntdll) + { + win_skip("Could not load ntdll\n"); + return FALSE; + } + + NTDLL_GET_PROC(TpAllocPool); + NTDLL_GET_PROC(TpReleasePool); + NTDLL_GET_PROC(TpSimpleTryPost); + + if (!pTpAllocPool) + { + skip("Threadpool functions not supported, skipping tests\n"); + return FALSE; + } + + return TRUE; +} + +#undef NTDLL_GET_PROC + + +static void CALLBACK simple_cb(TP_CALLBACK_INSTANCE *instance, void *userdata) +{ + HANDLE semaphore = userdata; + trace("Running simple callback\n"); + ReleaseSemaphore(semaphore, 1, NULL); +} + +static void test_tp_simple(void) +{ + TP_CALLBACK_ENVIRON environment; + HANDLE semaphore; + NTSTATUS status; + TP_POOL *pool; + DWORD result; + + semaphore = CreateSemaphoreA(NULL, 0, 1, NULL); + ok(semaphore != NULL, "CreateSemaphoreA failed %u\n", GetLastError()); + + /* post the callback using the default threadpool */ + memset(&environment, 0, sizeof(environment)); + environment.Version = 1; + environment.Pool = NULL; + status = pTpSimpleTryPost(simple_cb, semaphore, &environment); + ok(!status, "TpSimpleTryPost failed with status %x\n", status); + result = WaitForSingleObject(semaphore, 1000); + ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result); + + /* allocate new threadpool */ + pool = NULL; + status = pTpAllocPool(&pool, NULL); + ok(!status, "TpAllocPool failed with status %x\n", status); + ok(pool != NULL, "expected pool != NULL\n"); + + /* post the callback using the new threadpool */ + memset(&environment, 0, sizeof(environment)); + environment.Version = 1; + environment.Pool = pool; + status = pTpSimpleTryPost(simple_cb, semaphore, &environment); + ok(!status, "TpSimpleTryPost failed with status %x\n", status); + result = WaitForSingleObject(semaphore, 1000); + ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result); + + /* test with invalid version number */ + memset(&environment, 0, sizeof(environment)); + environment.Version = 9999; + environment.Pool = pool; + status = pTpSimpleTryPost(simple_cb, semaphore, &environment); + ok(status == STATUS_INVALID_PARAMETER || broken(!status) /* Vista/2008 */, + "TpSimpleTryPost unexpectedly returned status %x\n", status); + if (!status) + { + result = WaitForSingleObject(semaphore, 1000); + ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result); + } + + /* cleanup */ + pTpReleasePool(pool); + CloseHandle(semaphore); +} + +START_TEST(threadpool) +{ + if (!init_threadpool()) + return; + + test_tp_simple(); +}
1
0
0
0
Sebastian Lackner : ntdll/tests: Add tests for NtQueryLicenseKey.
by Alexandre Julliard
03 Mar '15
03 Mar '15
Module: wine Branch: master Commit: d336f1fe685e0c5720a01adf79266cb41c4c0bf9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d336f1fe685e0c5720a01adf7…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Mon Dec 22 07:58:10 2014 +0100 ntdll/tests: Add tests for NtQueryLicenseKey. --- dlls/ntdll/tests/reg.c | 180 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d336f1fe685e0c5720a01…
1
0
0
0
Sebastian Lackner : include: Fix definition of SECTION_BASIC_INFORMATION and SECTION_IMAGE_INFORMATION.
by Alexandre Julliard
03 Mar '15
03 Mar '15
Module: wine Branch: master Commit: 72a41c50e2a049848a280090e525db14f623b56e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=72a41c50e2a049848a280090e…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Tue Mar 3 00:46:36 2015 +0100 include: Fix definition of SECTION_BASIC_INFORMATION and SECTION_IMAGE_INFORMATION. Based on a patch by Dmitry Timoshkov. --- include/winternl.h | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/include/winternl.h b/include/winternl.h index 1a694da..3992309 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1792,23 +1792,28 @@ typedef enum _SECTION_INFORMATION_CLASS } SECTION_INFORMATION_CLASS; typedef struct _SECTION_BASIC_INFORMATION { - ULONG BaseAddress; + PVOID BaseAddress; ULONG Attributes; LARGE_INTEGER Size; } SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION; typedef struct _SECTION_IMAGE_INFORMATION { - PVOID EntryPoint; - ULONG StackZeroBits; - ULONG StackReserved; - ULONG StackCommit; - ULONG ImageSubsystem; + PVOID TransferAddress; + ULONG ZeroBits; + SIZE_T MaximumStackSize; + SIZE_T CommittedStackSize; + ULONG SubSystemType; WORD SubsystemVersionLow; WORD SubsystemVersionHigh; - ULONG Unknown1; - ULONG ImageCharacteristics; - ULONG ImageMachineType; - ULONG Unknown2[3]; + ULONG GpValue; + USHORT ImageCharacteristics; + USHORT DllCharacteristics; + USHORT Machine; + BOOLEAN ImageContainsCode; + UCHAR ImageFlags; + ULONG LoaderFlags; + ULONG ImageFileSize; + ULONG CheckSum; } SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION; typedef struct _LPC_SECTION_WRITE {
1
0
0
0
Alexandre Julliard : ntdll: Avoid the intermediate user APC callback.
by Alexandre Julliard
03 Mar '15
03 Mar '15
Module: wine Branch: master Commit: 1146e251fcabfd3379029fdfc8c66a68ca0b70fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1146e251fcabfd3379029fdfc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 3 16:14:02 2015 +0900 ntdll: Avoid the intermediate user APC callback. --- dlls/ntdll/file.c | 48 ++++++++++++------------------------------------ 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 1cd6546..b07e5f9 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -388,14 +388,6 @@ static struct async_fileio *alloc_fileio( DWORD size, HANDLE handle, PIO_APC_ROU return io; } -/* callback for file I/O user APC */ -static void WINAPI fileio_apc( void *arg, IO_STATUS_BLOCK *io, ULONG reserved ) -{ - struct async_fileio *async = arg; - if (async->apc) async->apc( async->apc_arg, io, reserved ); - release_fileio( async ); -} - /*********************************************************************** * FILE_GetNtStatus(void) * @@ -501,13 +493,9 @@ static NTSTATUS FILE_AsyncReadService( void *user, IO_STATUS_BLOCK *iosb, { iosb->u.Status = status; iosb->Information = fileio->already; - if (fileio->io.apc) - { - *apc = fileio_apc; - *arg = &fileio->io; - } - else - release_fileio( &fileio->io ); + *apc = fileio->io.apc; + *arg = fileio->io.apc_arg; + release_fileio( &fileio->io ); } return status; } @@ -1003,13 +991,9 @@ static NTSTATUS FILE_AsyncWriteService( void *user, IO_STATUS_BLOCK *iosb, { iosb->u.Status = status; iosb->Information = fileio->already; - if (fileio->io.apc) - { - *apc = fileio_apc; - *arg = &fileio->io; - } - else - release_fileio( &fileio->io ); + *apc = fileio->io.apc; + *arg = fileio->io.apc_arg; + release_fileio( &fileio->io ); } return status; } @@ -1398,13 +1382,9 @@ static NTSTATUS ioctl_completion( void *user, IO_STATUS_BLOCK *io, if (status != STATUS_PENDING) { io->u.Status = status; - if (async->io.apc) - { - *apc = fileio_apc; - *arg = &async->io; - } - else - release_fileio( &async->io ); + *apc = async->io.apc; + *arg = async->io.apc_arg; + release_fileio( &async->io ); } return status; } @@ -1788,13 +1768,9 @@ static NTSTATUS read_changes_apc( void *user, IO_STATUS_BLOCK *iosb, iosb->u.Status = ret; iosb->Information = size; - if (fileio->io.apc) - { - *apc = fileio_apc; - *arg = &fileio->io; - } - else - release_fileio( &fileio->io ); + *apc = fileio->io.apc; + *arg = fileio->io.apc_arg; + release_fileio( &fileio->io ); return ret; }
1
0
0
0
Alexandre Julliard : ntdll: Allow specifying the user APC argument in the system APC callback.
by Alexandre Julliard
03 Mar '15
03 Mar '15
Module: wine Branch: master Commit: 0a241b0fcc550cc60d8a59dfec0bdcd99bd0f1b6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0a241b0fcc550cc60d8a59dfe…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 3 16:06:51 2015 +0900 ntdll: Allow specifying the user APC argument in the system APC callback. --- dlls/ntdll/file.c | 26 +++++++++++++++++++++----- dlls/ntdll/server.c | 8 ++++---- dlls/ws2_32/socket.c | 27 +++++++++++++++++++-------- server/protocol.def | 2 +- 4 files changed, 45 insertions(+), 18 deletions(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 43b6097..1cd6546 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -448,7 +448,8 @@ NTSTATUS FILE_GetNtStatus(void) /*********************************************************************** * FILE_AsyncReadService (INTERNAL) */ -static NTSTATUS FILE_AsyncReadService(void *user, PIO_STATUS_BLOCK iosb, NTSTATUS status, void **apc) +static NTSTATUS FILE_AsyncReadService( void *user, IO_STATUS_BLOCK *iosb, + NTSTATUS status, void **apc, void **arg ) { struct async_fileio_read *fileio = user; int fd, needs_close, result; @@ -501,7 +502,10 @@ static NTSTATUS FILE_AsyncReadService(void *user, PIO_STATUS_BLOCK iosb, NTSTATU iosb->u.Status = status; iosb->Information = fileio->already; if (fileio->io.apc) + { *apc = fileio_apc; + *arg = &fileio->io; + } else release_fileio( &fileio->io ); } @@ -956,7 +960,8 @@ NTSTATUS WINAPI NtReadFileScatter( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap /*********************************************************************** * FILE_AsyncWriteService (INTERNAL) */ -static NTSTATUS FILE_AsyncWriteService(void *user, IO_STATUS_BLOCK *iosb, NTSTATUS status, void **apc) +static NTSTATUS FILE_AsyncWriteService( void *user, IO_STATUS_BLOCK *iosb, + NTSTATUS status, void **apc, void **arg ) { struct async_fileio_write *fileio = user; int result, fd, needs_close; @@ -999,7 +1004,10 @@ static NTSTATUS FILE_AsyncWriteService(void *user, IO_STATUS_BLOCK *iosb, NTSTAT iosb->u.Status = status; iosb->Information = fileio->already; if (fileio->io.apc) + { *apc = fileio_apc; + *arg = &fileio->io; + } else release_fileio( &fileio->io ); } @@ -1370,9 +1378,10 @@ struct async_ioctl }; /* callback for ioctl async I/O completion */ -static NTSTATUS ioctl_completion( void *arg, IO_STATUS_BLOCK *io, NTSTATUS status, void **apc ) +static NTSTATUS ioctl_completion( void *user, IO_STATUS_BLOCK *io, + NTSTATUS status, void **apc, void **arg ) { - struct async_ioctl *async = arg; + struct async_ioctl *async = user; if (status == STATUS_ALERTED) { @@ -1390,7 +1399,10 @@ static NTSTATUS ioctl_completion( void *arg, IO_STATUS_BLOCK *io, NTSTATUS statu { io->u.Status = status; if (async->io.apc) + { *apc = fileio_apc; + *arg = &async->io; + } else release_fileio( &async->io ); } @@ -1709,7 +1721,8 @@ struct read_changes_fileio char data[1]; }; -static NTSTATUS read_changes_apc( void *user, PIO_STATUS_BLOCK iosb, NTSTATUS status, void **apc ) +static NTSTATUS read_changes_apc( void *user, IO_STATUS_BLOCK *iosb, + NTSTATUS status, void **apc, void **arg ) { struct read_changes_fileio *fileio = user; NTSTATUS ret; @@ -1776,7 +1789,10 @@ static NTSTATUS read_changes_apc( void *user, PIO_STATUS_BLOCK iosb, NTSTATUS st iosb->u.Status = ret; iosb->Information = size; if (fileio->io.apc) + { *apc = fileio_apc; + *arg = &fileio->io; + } else release_fileio( &fileio->io ); return ret; diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index e3f1694..2c99cbe 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -391,17 +391,17 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result ) } case APC_ASYNC_IO: { - void *apc = NULL; + void *apc = NULL, *arg = NULL; IO_STATUS_BLOCK *iosb = wine_server_get_ptr( call->async_io.sb ); - NTSTATUS (*func)(void *, IO_STATUS_BLOCK *, NTSTATUS, void **) = wine_server_get_ptr( call->async_io.func ); + NTSTATUS (*func)(void *, IO_STATUS_BLOCK *, NTSTATUS, void **, void **) = wine_server_get_ptr( call->async_io.func ); result->type = call->type; result->async_io.status = func( wine_server_get_ptr( call->async_io.user ), - iosb, call->async_io.status, &apc ); + iosb, call->async_io.status, &apc, &arg ); if (result->async_io.status != STATUS_PENDING) { result->async_io.total = iosb->Information; result->async_io.apc = wine_server_client_ptr( apc ); - result->async_io.arg = call->async_io.user; + result->async_io.arg = wine_server_client_ptr( arg ); } break; } diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index f1f00eb..5bfdecf 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2013,7 +2013,8 @@ static int WS2_recv( int fd, struct ws2_async *wsa ) * * Handler for overlapped recv() operations. */ -static NTSTATUS WS2_async_recv( void* user, IO_STATUS_BLOCK* iosb, NTSTATUS status, void **apc) +static NTSTATUS WS2_async_recv( void *user, IO_STATUS_BLOCK *iosb, + NTSTATUS status, void **apc, void **arg ) { struct ws2_async *wsa = user; int result = 0, fd; @@ -2051,7 +2052,10 @@ static NTSTATUS WS2_async_recv( void* user, IO_STATUS_BLOCK* iosb, NTSTATUS stat iosb->u.Status = status; iosb->Information = result; if (wsa->completion_func) + { *apc = ws2_async_apc; + *arg = wsa; + } else release_async_io( &wsa->io ); } @@ -2064,12 +2068,13 @@ static NTSTATUS WS2_async_recv( void* user, IO_STATUS_BLOCK* iosb, NTSTATUS stat * This function is used to finish the read part of an accept request. It is * needed to place the completion on the correct socket (listener). */ -static NTSTATUS WS2_async_accept_recv( void *arg, IO_STATUS_BLOCK *iosb, NTSTATUS status, void **apc ) +static NTSTATUS WS2_async_accept_recv( void *user, IO_STATUS_BLOCK *iosb, + NTSTATUS status, void **apc, void **arg ) { void *junk; - struct ws2_accept_async *wsa = arg; + struct ws2_accept_async *wsa = user; - status = WS2_async_recv( wsa->read, iosb, status, &junk ); + status = WS2_async_recv( wsa->read, iosb, status, &junk, &junk ); if (status == STATUS_PENDING) return status; @@ -2087,9 +2092,10 @@ static NTSTATUS WS2_async_accept_recv( void *arg, IO_STATUS_BLOCK *iosb, NTSTATU * * This is the function called to satisfy the AcceptEx callback */ -static NTSTATUS WS2_async_accept( void *arg, IO_STATUS_BLOCK *iosb, NTSTATUS status, void **apc ) +static NTSTATUS WS2_async_accept( void *user, IO_STATUS_BLOCK *iosb, + NTSTATUS status, void **apc, void **arg ) { - struct ws2_accept_async *wsa = arg; + struct ws2_accept_async *wsa = user; int len; char *addr; @@ -2241,7 +2247,8 @@ static int WS2_send( int fd, struct ws2_async *wsa ) * * Handler for overlapped send() operations. */ -static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS status, void **apc) +static NTSTATUS WS2_async_send( void *user, IO_STATUS_BLOCK *iosb, + NTSTATUS status, void **apc, void **arg ) { struct ws2_async *wsa = user; int result = 0, fd; @@ -2285,7 +2292,10 @@ static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS statu { iosb->u.Status = status; if (wsa->completion_func) + { *apc = ws2_async_apc; + *arg = wsa; + } else release_async_io( &wsa->io ); } @@ -2297,7 +2307,8 @@ static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS statu * * Handler for shutdown() operations on overlapped sockets. */ -static NTSTATUS WS2_async_shutdown( void* user, PIO_STATUS_BLOCK iosb, NTSTATUS status, void **apc ) +static NTSTATUS WS2_async_shutdown( void *user, IO_STATUS_BLOCK *iosb, + NTSTATUS status, void **apc, void **arg ) { struct ws2_async_shutdown *wsa = user; int fd, err = 1; diff --git a/server/protocol.def b/server/protocol.def index f2a5a9a..7ec380b 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -480,7 +480,7 @@ typedef union { enum apc_type type; /* APC_ASYNC_IO */ unsigned int status; /* I/O status */ - client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void **); */ + client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void**, void**); */ client_ptr_t user; /* user pointer */ client_ptr_t sb; /* status block */ } async_io;
1
0
0
0
Alexandre Julliard : server: Allow passing an argument for the user APC async I/O callbacks.
by Alexandre Julliard
03 Mar '15
03 Mar '15
Module: wine Branch: master Commit: 8843bc144ddade9edf90d22d092bed16d77644ff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8843bc144ddade9edf90d22d0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 3 15:52:23 2015 +0900 server: Allow passing an argument for the user APC async I/O callbacks. --- dlls/ntdll/server.c | 1 + include/wine/server_protocol.h | 3 ++- server/async.c | 5 +++-- server/file.h | 2 +- server/protocol.def | 1 + server/thread.c | 4 ++-- server/trace.c | 1 + 7 files changed, 11 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index aabda4f..e3f1694 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -401,6 +401,7 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result ) { result->async_io.total = iosb->Information; result->async_io.apc = wine_server_client_ptr( apc ); + result->async_io.arg = call->async_io.user; } break; } diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index e0c3474..9d645d7 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -554,6 +554,7 @@ typedef union enum apc_type type; unsigned int status; client_ptr_t apc; + client_ptr_t arg; unsigned int total; } async_io; struct @@ -5847,6 +5848,6 @@ union generic_reply struct set_suspend_context_reply set_suspend_context_reply; }; -#define SERVER_PROTOCOL_VERSION 458 +#define SERVER_PROTOCOL_VERSION 459 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/async.c b/server/async.c index 017419d..e403955 100644 --- a/server/async.c +++ b/server/async.c @@ -262,7 +262,8 @@ static void add_async_completion( struct async_queue *queue, apc_param_t cvalue, } /* store the result of the client-side async callback */ -void async_set_result( struct object *obj, unsigned int status, apc_param_t total, client_ptr_t apc ) +void async_set_result( struct object *obj, unsigned int status, apc_param_t total, + client_ptr_t apc, client_ptr_t apc_arg ) { struct async *async = (struct async *)obj; @@ -293,7 +294,7 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota memset( &data, 0, sizeof(data) ); data.type = APC_USER; data.user.func = apc; - data.user.args[0] = async->data.arg; + data.user.args[0] = apc_arg; data.user.args[1] = async->data.iosb; data.user.args[2] = 0; thread_queue_apc( async->thread, NULL, &data ); diff --git a/server/file.h b/server/file.h index ed6096f..85e4257 100644 --- a/server/file.h +++ b/server/file.h @@ -159,7 +159,7 @@ extern struct async *create_async( struct thread *thread, struct async_queue *qu const async_data_t *data ); extern void async_set_timeout( struct async *async, timeout_t timeout, unsigned int status ); extern void async_set_result( struct object *obj, unsigned int status, - apc_param_t total, client_ptr_t apc ); + apc_param_t total, client_ptr_t apc, client_ptr_t apc_arg ); extern int async_queued( struct async_queue *queue ); extern int async_waiting( struct async_queue *queue ); extern void async_terminate( struct async *async, unsigned int status ); diff --git a/server/protocol.def b/server/protocol.def index fc6bec5..f2a5a9a 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -570,6 +570,7 @@ typedef union enum apc_type type; /* APC_ASYNC_IO */ unsigned int status; /* new status of async operation */ client_ptr_t apc; /* user APC to call */ + client_ptr_t arg; /* user APC argument */ unsigned int total; /* bytes transferred */ } async_io; struct diff --git a/server/thread.c b/server/thread.c index ba3f1d5..906b79d 100644 --- a/server/thread.c +++ b/server/thread.c @@ -1451,8 +1451,8 @@ DECL_HANDLER(select) else if (apc->result.type == APC_ASYNC_IO) { if (apc->owner) - async_set_result( apc->owner, apc->result.async_io.status, - apc->result.async_io.total, apc->result.async_io.apc ); + async_set_result( apc->owner, apc->result.async_io.status, apc->result.async_io.total, + apc->result.async_io.apc, apc->result.async_io.arg ); } wake_up( &apc->obj, 0 ); close_handle( current->process, req->prev_apc ); diff --git a/server/trace.c b/server/trace.c index dd20c04..1bda4cd 100644 --- a/server/trace.c +++ b/server/trace.c @@ -227,6 +227,7 @@ static void dump_apc_result( const char *prefix, const apc_result_t *result ) fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u", get_status_name( result->async_io.status ), result->async_io.total ); dump_uint64( ",apc=", &result->async_io.apc ); + dump_uint64( ",arg=", &result->async_io.arg ); break; case APC_VIRTUAL_ALLOC: fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
1
0
0
0
← Newer
1
...
69
70
71
72
73
74
75
...
78
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Results per page:
10
25
50
100
200