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
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
August 2021
----- 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
1 participants
1051 discussions
Start a n
N
ew thread
Piotr Caban : msvcrt: Move _Trace_ppl_function to concurrency.c.
by Alexandre Julliard
18 Aug '21
18 Aug '21
Module: wine Branch: master Commit: ce5c989171f458842bee6e168a65dc36d2ec61d5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ce5c989171f458842bee6e16…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Aug 18 16:09:51 2021 +0200 msvcrt: Move _Trace_ppl_function to concurrency.c. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcr100/msvcr100.spec | 4 ++-- dlls/msvcr110/msvcr110.spec | 4 ++-- dlls/msvcr120/msvcr120.spec | 4 ++-- dlls/msvcrt/concurrency.c | 19 +++++++++++++++++++ dlls/msvcrt/cpp.c | 23 ----------------------- 5 files changed, 25 insertions(+), 29 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 6af92d7ea6f..26a1f1fdea7 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -386,8 +386,8 @@ @ stub -arch=win64 ?_Stop@_Timer@details@Concurrency@@IEAAXXZ @ stub -arch=win32 ?_Tidy@exception@std@@AAEXXZ @ stub -arch=win64 ?_Tidy@exception@std@@AEAAXXZ -@ cdecl -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) Concurrency__Trace_ppl_function -@ cdecl -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) Concurrency__Trace_ppl_function +@ cdecl -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) _Trace_ppl_function +@ cdecl -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) _Trace_ppl_function @ thiscall -arch=win32 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAE_NXZ(ptr) _ReentrantBlockingLock__TryAcquire @ cdecl -arch=win64 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QEAA_NXZ(ptr) _ReentrantBlockingLock__TryAcquire @ thiscall -arch=win32 ?_TryAcquire@_ReentrantBlockingLock@details@Concurrency@@QAE_NXZ(ptr) _ReentrantBlockingLock__TryAcquire diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 45d8e2b3507..e77a855a263 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -658,8 +658,8 @@ @ stub -arch=i386 ?_Tidy@exception@std@@AAEXXZ @ stub -arch=win64 ?_Tidy@exception@std@@AEAAXXZ @ varargs ?_Trace_agents@Concurrency@@YAXW4Agents_EventType@1@_JZZ(long int64) _Trace_agents -@ cdecl -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) Concurrency__Trace_ppl_function -@ cdecl -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) Concurrency__Trace_ppl_function +@ cdecl -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) _Trace_ppl_function +@ cdecl -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) _Trace_ppl_function @ cdecl -arch=arm ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAA_NXZ(ptr) _ReentrantBlockingLock__TryAcquire @ thiscall -arch=i386 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAE_NXZ(ptr) _ReentrantBlockingLock__TryAcquire @ cdecl -arch=win64 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QEAA_NXZ(ptr) _ReentrantBlockingLock__TryAcquire diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 3ed0aafdc3d..c540c4019bc 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -640,8 +640,8 @@ @ stub -arch=i386 ?_Tidy@exception@std@@AAEXXZ @ stub -arch=win64 ?_Tidy@exception@std@@AEAAXXZ @ varargs ?_Trace_agents@Concurrency@@YAXW4Agents_EventType@1@_JZZ(long int64) _Trace_agents -@ cdecl -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) Concurrency__Trace_ppl_function -@ cdecl -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) Concurrency__Trace_ppl_function +@ cdecl -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) _Trace_ppl_function +@ cdecl -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) _Trace_ppl_function @ cdecl -arch=arm ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAA_NXZ(ptr) _ReentrantBlockingLock__TryAcquire @ thiscall -arch=i386 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAE_NXZ(ptr) _ReentrantBlockingLock__TryAcquire @ cdecl -arch=win64 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QEAA_NXZ(ptr) _ReentrantBlockingLock__TryAcquire diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index 5aee472559e..a4df63d19a8 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -296,6 +296,18 @@ typedef struct { CRITICAL_SECTION cs; } _ReentrantBlockingLock; +enum ConcRT_EventType +{ + CONCRT_EVENT_GENERIC, + CONCRT_EVENT_START, + CONCRT_EVENT_END, + CONCRT_EVENT_BLOCK, + CONCRT_EVENT_UNBLOCK, + CONCRT_EVENT_YIELD, + CONCRT_EVENT_ATTACH, + CONCRT_EVENT_DETACH +}; + static int context_tls_index = TLS_OUT_OF_INDEXES; static CRITICAL_SECTION default_scheduler_cs; @@ -2382,6 +2394,13 @@ void WINAPIV _Trace_agents(/*enum Concurrency::Agents_EventType*/int type, __int } #endif +/* ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z */ +/* ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z */ +void __cdecl _Trace_ppl_function(const GUID *guid, unsigned char level, enum ConcRT_EventType type) +{ + FIXME("(%s %u %i) stub\n", debugstr_guid(guid), level, type); +} + #ifdef __ASM_USE_THISCALL_WRAPPER #define DEFINE_VTBL_WRAPPER(off) \ diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index 1f36bca5712..638081f5b85 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -2075,26 +2075,3 @@ size_t CDECL __std_type_info_hash(const type_info140 *ti) } #endif /* _MSVCR_VER >= 140 */ - -#if _MSVCR_VER >= 100 - -enum ConcRT_EventType -{ - CONCRT_EVENT_GENERIC, - CONCRT_EVENT_START, - CONCRT_EVENT_END, - CONCRT_EVENT_BLOCK, - CONCRT_EVENT_UNBLOCK, - CONCRT_EVENT_YIELD, - CONCRT_EVENT_ATTACH, - CONCRT_EVENT_DETACH -}; - -/* ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z */ -/* ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z */ -void __cdecl Concurrency__Trace_ppl_function(const GUID *guid, unsigned char level, enum ConcRT_EventType type) -{ - FIXME("(%s %u %i) stub\n", debugstr_guid(guid), level, type); -} - -#endif /* _MSVCR_VER >= 100 */
1
0
0
0
Piotr Caban : msvcrt: Move _Trace_agents function to concurrency.c.
by Alexandre Julliard
18 Aug '21
18 Aug '21
Module: wine Branch: master Commit: 69e2467aa78350f0e5a1e349f23e23a0550808c7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=69e2467aa78350f0e5a1e349…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Aug 18 16:09:27 2021 +0200 msvcrt: Move _Trace_agents function to concurrency.c. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/concurrency.c | 8 ++++++++ dlls/msvcrt/misc.c | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index 142d578633e..5aee472559e 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -2374,6 +2374,14 @@ void __cdecl Concurrency_wait(unsigned int time) Sleep(time); } +#if _MSVCR_VER>=110 +/* ?_Trace_agents@Concurrency@@YAXW4Agents_EventType@1@_JZZ */ +void WINAPIV _Trace_agents(/*enum Concurrency::Agents_EventType*/int type, __int64 id, ...) +{ + FIXME("(%d %s)\n", type, wine_dbgstr_longlong(id)); +} +#endif + #ifdef __ASM_USE_THISCALL_WRAPPER #define DEFINE_VTBL_WRAPPER(off) \ diff --git a/dlls/msvcrt/misc.c b/dlls/msvcrt/misc.c index 5ea1ddfc6c7..bee269ed5f8 100644 --- a/dlls/msvcrt/misc.c +++ b/dlls/msvcrt/misc.c @@ -562,12 +562,6 @@ LONG CDECL __crtUnhandledException(EXCEPTION_POINTERS *ep) SetUnhandledExceptionFilter(NULL); return UnhandledExceptionFilter(ep); } - -/* ?_Trace_agents@Concurrency@@YAXW4Agents_EventType@1@_JZZ */ -void WINAPIV _Trace_agents(/*enum Concurrency::Agents_EventType*/int type, __int64 id, ...) -{ - FIXME("(%d %s)\n", type, wine_dbgstr_longlong(id)); -} #endif #if _MSVCR_VER>=120
1
0
0
0
Piotr Caban : msvcrt: Move lock Concurrency functions to concurrency.c.
by Alexandre Julliard
18 Aug '21
18 Aug '21
Module: wine Branch: master Commit: 3192bb97647433c96351b5ba20563ff949bd2b09 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3192bb97647433c96351b5ba…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Aug 18 16:09:13 2021 +0200 msvcrt: Move lock Concurrency functions to concurrency.c. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/concurrency.c | 1307 ++++++++++++++++++++++++++++++++++++++++++++ dlls/msvcrt/lock.c | 1310 --------------------------------------------- 2 files changed, 1307 insertions(+), 1310 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=3192bb97647433c96351…
1
0
0
0
Piotr Caban : msvcrt: Rename scheduler.c file to concurrency.c.
by Alexandre Julliard
18 Aug '21
18 Aug '21
Module: wine Branch: master Commit: eff57ac9c6280751f5f51a66fcac05d6f842fecb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eff57ac9c6280751f5f51a66…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Aug 18 16:09:09 2021 +0200 msvcrt: Rename scheduler.c file to concurrency.c. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcr100/Makefile.in | 2 +- dlls/msvcr110/Makefile.in | 2 +- dlls/msvcr120/Makefile.in | 2 +- dlls/msvcrt/Makefile.in | 2 +- dlls/msvcrt/{scheduler.c => concurrency.c} | 6 +++--- dlls/msvcrt/main.c | 4 ++-- dlls/msvcrt/msvcrt.h | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dlls/msvcr100/Makefile.in b/dlls/msvcr100/Makefile.in index 7a760a57e3b..7996a60718a 100644 --- a/dlls/msvcr100/Makefile.in +++ b/dlls/msvcr100/Makefile.in @@ -7,6 +7,7 @@ PARENTSRC = ../msvcrt EXTRADLLFLAGS = -mno-cygwin C_SRCS = \ + concurrency.c \ console.c \ cpp.c \ ctype.c \ @@ -33,7 +34,6 @@ C_SRCS = \ onexit.c \ process.c \ scanf.c \ - scheduler.c \ sincos.c \ string.c \ thread.c \ diff --git a/dlls/msvcr110/Makefile.in b/dlls/msvcr110/Makefile.in index 0d0d73b3262..5ea8706a78c 100644 --- a/dlls/msvcr110/Makefile.in +++ b/dlls/msvcr110/Makefile.in @@ -7,6 +7,7 @@ PARENTSRC = ../msvcrt EXTRADLLFLAGS = -mno-cygwin C_SRCS = \ + concurrency.c \ console.c \ cpp.c \ ctype.c \ @@ -33,7 +34,6 @@ C_SRCS = \ onexit.c \ process.c \ scanf.c \ - scheduler.c \ sincos.c \ string.c \ thread.c \ diff --git a/dlls/msvcr120/Makefile.in b/dlls/msvcr120/Makefile.in index aff77ba24ac..3a045483f6c 100644 --- a/dlls/msvcr120/Makefile.in +++ b/dlls/msvcr120/Makefile.in @@ -7,6 +7,7 @@ PARENTSRC = ../msvcrt EXTRADLLFLAGS = -mno-cygwin C_SRCS = \ + concurrency.c \ console.c \ cpp.c \ ctype.c \ @@ -33,7 +34,6 @@ C_SRCS = \ onexit.c \ process.c \ scanf.c \ - scheduler.c \ sincos.c \ string.c \ thread.c \ diff --git a/dlls/msvcrt/Makefile.in b/dlls/msvcrt/Makefile.in index 74d88088444..a2f62613296 100644 --- a/dlls/msvcrt/Makefile.in +++ b/dlls/msvcrt/Makefile.in @@ -6,6 +6,7 @@ DELAYIMPORTS = advapi32 user32 EXTRADLLFLAGS = -mno-cygwin C_SRCS = \ + concurrency.c \ console.c \ cpp.c \ crt_gccmain.c \ @@ -37,7 +38,6 @@ C_SRCS = \ onexit.c \ process.c \ scanf.c \ - scheduler.c \ sincos.c \ string.c \ thread.c \ diff --git a/dlls/msvcrt/scheduler.c b/dlls/msvcrt/concurrency.c similarity index 99% rename from dlls/msvcrt/scheduler.c rename to dlls/msvcrt/concurrency.c index b8bff6119bf..ba3dc6be4ad 100644 --- a/dlls/msvcrt/scheduler.c +++ b/dlls/msvcrt/concurrency.c @@ -1,5 +1,5 @@ /* - * msvcrt.dll C++ objects + * Concurrency namespace implementation * * Copyright 2017 Piotr Caban * @@ -1136,7 +1136,7 @@ __ASM_BLOCK_BEGIN(scheduler_vtables) ); __ASM_BLOCK_END -void msvcrt_init_scheduler(void *base) +void msvcrt_init_concurrency(void *base) { #ifdef __x86_64__ init_Context_rtti(base); @@ -1148,7 +1148,7 @@ void msvcrt_init_scheduler(void *base) #endif } -void msvcrt_free_scheduler(void) +void msvcrt_free_concurrency(void) { if (context_tls_index != TLS_OUT_OF_INDEXES) TlsFree(context_tls_index); diff --git a/dlls/msvcrt/main.c b/dlls/msvcrt/main.c index 61e8479bf90..23dfb24ac5d 100644 --- a/dlls/msvcrt/main.c +++ b/dlls/msvcrt/main.c @@ -116,7 +116,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) msvcrt_init_args(); msvcrt_init_signals(); #if _MSVCR_VER >= 100 && _MSVCR_VER <= 120 - msvcrt_init_scheduler(hinstDLL); + msvcrt_init_concurrency(hinstDLL); #endif #if _MSVCR_VER == 0 /* don't allow unloading msvcrt, we can't setup file handles twice */ @@ -143,7 +143,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) _free_locale(MSVCRT_locale); #if _MSVCR_VER >= 100 && _MSVCR_VER <= 120 msvcrt_free_scheduler_thread(); - msvcrt_free_scheduler(); + msvcrt_free_concurrency(); #endif msvcrt_destroy_heap(); TRACE("finished process free\n"); diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index ad366a74d86..51e9b9726db 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -245,8 +245,8 @@ extern void msvcrt_destroy_heap(void) DECLSPEC_HIDDEN; extern void msvcrt_init_clock(void) DECLSPEC_HIDDEN; #if _MSVCR_VER >= 100 -extern void msvcrt_init_scheduler(void*) DECLSPEC_HIDDEN; -extern void msvcrt_free_scheduler(void) DECLSPEC_HIDDEN; +extern void msvcrt_init_concurrency(void*) DECLSPEC_HIDDEN; +extern void msvcrt_free_concurrency(void) DECLSPEC_HIDDEN; extern void msvcrt_free_scheduler_thread(void) DECLSPEC_HIDDEN; #endif
1
0
0
0
Piotr Caban : msvcrt: Add macro that defines type_info vtable.
by Alexandre Julliard
18 Aug '21
18 Aug '21
Module: wine Branch: master Commit: 6c4cddc4f6324cfd6d37e269aaec111a8a665e22 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6c4cddc4f6324cfd6d37e269…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Aug 18 16:09:05 2021 +0200 msvcrt: Add macro that defines type_info vtable. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/cpp.c | 27 ++------------------------- dlls/msvcrt/cxx.h | 31 ++++++++++++++++++++++++++++++- dlls/msvcrt/lock.c | 1 - dlls/msvcrt/scheduler.c | 2 -- 4 files changed, 32 insertions(+), 29 deletions(-) diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index ac363c41923..1f36bca5712 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -27,12 +27,13 @@ #include "wine/exception.h" #include "wine/debug.h" #include "msvcrt.h" -#include "cppexcept.h" #include "mtdll.h" #include "cxx.h" WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); +CREATE_TYPE_INFO_VTABLE + struct __type_info_node { void *memPtr; @@ -626,27 +627,6 @@ const char * __thiscall type_info_raw_name(type_info * _this) return _this->mangled; } -/* Unexported */ -DEFINE_THISCALL_WRAPPER(type_info_vector_dtor,8) -void * __thiscall type_info_vector_dtor(type_info * _this, unsigned int flags) -{ - TRACE("(%p %x)\n", _this, flags); - if (flags & 2) - { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)_this - 1; - - for (i = *ptr - 1; i >= 0; i--) type_info_dtor(_this + i); - operator_delete(ptr); - } - else - { - type_info_dtor(_this); - if (flags & 1) operator_delete(_this); - } - return _this; -} - #if _MSVCR_VER >= 80 typedef exception bad_alloc; @@ -936,8 +916,6 @@ improper_scheduler_detach * __thiscall improper_scheduler_detach_copy_ctor( __ASM_BLOCK_BEGIN(vtables) -__ASM_VTABLE(type_info, - VTABLE_ADD_FUNC(type_info_vector_dtor)); __ASM_VTABLE(exception, VTABLE_ADD_FUNC(exception_vector_dtor) VTABLE_ADD_FUNC(what_exception)); @@ -984,7 +962,6 @@ __ASM_VTABLE(improper_scheduler_detach, __ASM_BLOCK_END -DEFINE_RTTI_DATA0( type_info, 0, ".?AVtype_info@@" ) #if _MSVCR_VER >= 80 DEFINE_RTTI_DATA0( exception, 0, ".?AVexception@std@@" ) DEFINE_RTTI_DATA0( exception_old, 0, ".?AVexception@@" ) diff --git a/dlls/msvcrt/cxx.h b/dlls/msvcrt/cxx.h index 77778730e25..1a5442725ef 100644 --- a/dlls/msvcrt/cxx.h +++ b/dlls/msvcrt/cxx.h @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "wine/asm.h" +#include "cppexcept.h" #ifdef _WIN64 @@ -279,3 +279,32 @@ extern void *vtbl_wrapper_48; #endif exception* __thiscall exception_ctor(exception*, const char**); + +extern const vtable_ptr type_info_vtable; + +#define CREATE_TYPE_INFO_VTABLE \ +DEFINE_THISCALL_WRAPPER(type_info_vector_dtor,8) \ +void * __thiscall type_info_vector_dtor(type_info * _this, unsigned int flags) \ +{ \ + if (flags & 2) \ + { \ + /* we have an array, with the number of elements stored before the first object */ \ + INT_PTR i, *ptr = (INT_PTR *)_this - 1; \ +\ + for (i = *ptr - 1; i >= 0; i--) free(_this->name); \ + free(ptr); \ + } \ + else \ + { \ + free(_this->name); \ + if (flags & 1) free(_this); \ + } \ + return _this; \ +} \ +\ +DEFINE_RTTI_DATA0( type_info, 0, ".?AVtype_info@@" ) \ +\ +__ASM_BLOCK_BEGIN(type_info_vtables) \ + __ASM_VTABLE(type_info, \ + VTABLE_ADD_FUNC(type_info_vector_dtor)); \ +__ASM_BLOCK_END diff --git a/dlls/msvcrt/lock.c b/dlls/msvcrt/lock.c index 78767689c06..9c96217ca95 100644 --- a/dlls/msvcrt/lock.c +++ b/dlls/msvcrt/lock.c @@ -24,7 +24,6 @@ #include "winbase.h" #include "winternl.h" #include "msvcrt.h" -#include "cppexcept.h" #include "mtdll.h" #include "cxx.h" diff --git a/dlls/msvcrt/scheduler.c b/dlls/msvcrt/scheduler.c index ef40a3236cd..b8bff6119bf 100644 --- a/dlls/msvcrt/scheduler.c +++ b/dlls/msvcrt/scheduler.c @@ -25,7 +25,6 @@ #include "winternl.h" #include "wine/debug.h" #include "msvcrt.h" -#include "cppexcept.h" #include "cxx.h" #if _MSVCR_VER >= 100 @@ -1097,7 +1096,6 @@ DEFINE_VTBL_WRAPPER(48); #endif -extern const vtable_ptr type_info_vtable; DEFINE_RTTI_DATA0(Context, 0, ".?AVContext@Concurrency@@") DEFINE_RTTI_DATA1(ContextBase, 0, &Context_rtti_base_descriptor, ".?AVContextBase@details@Concurrency@@") DEFINE_RTTI_DATA2(ExternalContextBase, 0, &ContextBase_rtti_base_descriptor,
1
0
0
0
Piotr Caban : msvcp90: Remove type_info_dtor helper from CREATE_TYPE_INFO_VTABLE macro.
by Alexandre Julliard
18 Aug '21
18 Aug '21
Module: wine Branch: master Commit: a2d8a0ce4e4d9858d8f46e77b0f76c2931c1cd52 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a2d8a0ce4e4d9858d8f46e77…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Aug 18 16:09:02 2021 +0200 msvcp90: Remove type_info_dtor helper from CREATE_TYPE_INFO_VTABLE macro. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp90/cxx.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dlls/msvcp90/cxx.h b/dlls/msvcp90/cxx.h index 9c6c70e375c..012354ac9c8 100644 --- a/dlls/msvcp90/cxx.h +++ b/dlls/msvcp90/cxx.h @@ -464,12 +464,7 @@ typedef struct #endif -#define CREATE_TYPE_INFO_VTABLE\ - static void type_info_dtor(type_info * _this) \ -{ \ - free(_this->name); \ -} \ -\ +#define CREATE_TYPE_INFO_VTABLE \ DEFINE_THISCALL_WRAPPER(type_info_vector_dtor,8) \ void * __thiscall type_info_vector_dtor(type_info * _this, unsigned int flags) \ { \ @@ -478,12 +473,12 @@ void * __thiscall type_info_vector_dtor(type_info * _this, unsigned int flags) \ /* we have an array, with the number of elements stored before the first object */ \ INT_PTR i, *ptr = (INT_PTR *)_this - 1; \ \ - for (i = *ptr - 1; i >= 0; i--) type_info_dtor(_this + i); \ + for (i = *ptr - 1; i >= 0; i--) free(_this->name); \ free(ptr); \ } \ else \ { \ - type_info_dtor(_this); \ + free(_this->name); \ if (flags & 1) free(_this); \ } \ return _this; \
1
0
0
0
Piotr Caban : msvcrt: Allow specifying destructor in DEFINE_CXX_DATA macro.
by Alexandre Julliard
18 Aug '21
18 Aug '21
Module: wine Branch: master Commit: bc05707364d722c7b8c105709962cb78c0469cd4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bc05707364d722c7b8c10570…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Aug 18 16:09:00 2021 +0200 msvcrt: Allow specifying destructor in DEFINE_CXX_DATA macro. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/cpp.c | 80 ++++++++----------------------------------------- dlls/msvcrt/cppexcept.h | 53 +++++++++++++++++++++----------- 2 files changed, 48 insertions(+), 85 deletions(-) diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index ffb91175a8f..ac363c41923 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -731,14 +731,6 @@ HRESULT __thiscall scheduler_resource_allocation_error_get_error_code( return this->hr; } -DEFINE_THISCALL_WRAPPER(scheduler_resource_allocation_error_dtor,4) -void __thiscall scheduler_resource_allocation_error_dtor( - scheduler_resource_allocation_error * this) -{ - TRACE("(%p)\n", this); - exception_dtor(&this->e); -} - typedef exception improper_lock; extern const vtable_ptr improper_lock_vtable; @@ -770,13 +762,6 @@ improper_lock * __thiscall improper_lock_copy_ctor(improper_lock * _this, const return _this; } -DEFINE_THISCALL_WRAPPER(improper_lock_dtor,4) -void __thiscall improper_lock_dtor(improper_lock * _this) -{ - TRACE("(%p)\n", _this); - exception_dtor(_this); -} - typedef exception invalid_scheduler_policy_key; extern const vtable_ptr invalid_scheduler_policy_key_vtable; @@ -811,14 +796,6 @@ invalid_scheduler_policy_key * __thiscall invalid_scheduler_policy_key_copy_ctor return _this; } -DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_key_dtor,4) -void __thiscall invalid_scheduler_policy_key_dtor( - invalid_scheduler_policy_key * _this) -{ - TRACE("(%p)\n", _this); - exception_dtor(_this); -} - typedef exception invalid_scheduler_policy_value; extern const vtable_ptr invalid_scheduler_policy_value_vtable; @@ -853,14 +830,6 @@ invalid_scheduler_policy_value * __thiscall invalid_scheduler_policy_value_copy_ return _this; } -DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_value_dtor,4) -void __thiscall invalid_scheduler_policy_value_dtor( - invalid_scheduler_policy_value * _this) -{ - TRACE("(%p)\n", _this); - exception_dtor(_this); -} - typedef exception invalid_scheduler_policy_thread_specification; extern const vtable_ptr invalid_scheduler_policy_thread_specification_vtable; @@ -895,14 +864,6 @@ invalid_scheduler_policy_thread_specification * __thiscall invalid_scheduler_pol return _this; } -DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_thread_specification_dtor,4) -void __thiscall invalid_scheduler_policy_thread_specification_dtor( - invalid_scheduler_policy_thread_specification * _this) -{ - TRACE("(%p)\n", _this); - exception_dtor(_this); -} - typedef exception improper_scheduler_attach; extern const vtable_ptr improper_scheduler_attach_vtable; @@ -937,14 +898,6 @@ improper_scheduler_attach * __thiscall improper_scheduler_attach_copy_ctor( return _this; } -DEFINE_THISCALL_WRAPPER(improper_scheduler_attach_dtor,4) -void __thiscall improper_scheduler_attach_dtor( - improper_scheduler_attach * _this) -{ - TRACE("(%p)\n", _this); - exception_dtor(_this); -} - typedef exception improper_scheduler_detach; extern const vtable_ptr improper_scheduler_detach_vtable; @@ -979,14 +932,6 @@ improper_scheduler_detach * __thiscall improper_scheduler_detach_copy_ctor( return _this; } -DEFINE_THISCALL_WRAPPER(improper_scheduler_detach_dtor,4) -void __thiscall improper_scheduler_detach_dtor( - improper_scheduler_detach * _this) -{ - TRACE("(%p)\n", _this); - exception_dtor(_this); -} - #endif /* _MSVCR_VER >= 100 */ __ASM_BLOCK_BEGIN(vtables) @@ -1069,21 +1014,22 @@ DEFINE_RTTI_DATA1(improper_scheduler_detach, 0, &exception_rtti_base_descriptor, ".?AVimproper_scheduler_detach@Concurrency@@" ) #endif -DEFINE_EXCEPTION_TYPE_INFO( exception, 0, NULL, NULL ) -DEFINE_EXCEPTION_TYPE_INFO( bad_typeid, 1, &exception_cxx_type_info, NULL ) -DEFINE_EXCEPTION_TYPE_INFO( bad_cast, 1, &exception_cxx_type_info, NULL ) -DEFINE_EXCEPTION_TYPE_INFO( __non_rtti_object, 2, &bad_typeid_cxx_type_info, &exception_cxx_type_info ) +DEFINE_CXX_DATA0( exception, exception_dtor ) +DEFINE_CXX_DATA1( bad_typeid, &exception_cxx_type_info, bad_typeid_dtor ) +DEFINE_CXX_DATA1( bad_cast, &exception_cxx_type_info, bad_cast_dtor ) +DEFINE_CXX_DATA2( __non_rtti_object, &bad_typeid_cxx_type_info, + &exception_cxx_type_info, __non_rtti_object_dtor ) #if _MSVCR_VER >= 80 -DEFINE_EXCEPTION_TYPE_INFO( bad_alloc, 1, &exception_cxx_type_info, NULL ) +DEFINE_CXX_DATA1( bad_alloc, &exception_cxx_type_info, bad_alloc_dtor ) #endif #if _MSVCR_VER >= 100 -DEFINE_EXCEPTION_TYPE_INFO(scheduler_resource_allocation_error, 1, &exception_cxx_type_info, NULL) -DEFINE_EXCEPTION_TYPE_INFO(improper_lock, 1, &exception_cxx_type_info, NULL) -DEFINE_EXCEPTION_TYPE_INFO(invalid_scheduler_policy_key, 1, &exception_cxx_type_info, NULL) -DEFINE_EXCEPTION_TYPE_INFO(invalid_scheduler_policy_value, 1, &exception_cxx_type_info, NULL) -DEFINE_EXCEPTION_TYPE_INFO(invalid_scheduler_policy_thread_specification, 1, &exception_cxx_type_info, NULL) -DEFINE_EXCEPTION_TYPE_INFO(improper_scheduler_attach, 1, &exception_cxx_type_info, NULL) -DEFINE_EXCEPTION_TYPE_INFO(improper_scheduler_detach, 1, &exception_cxx_type_info, NULL) +DEFINE_CXX_DATA1(scheduler_resource_allocation_error, &exception_cxx_type_info, exception_dtor) +DEFINE_CXX_DATA1(improper_lock, &exception_cxx_type_info, exception_dtor) +DEFINE_CXX_DATA1(invalid_scheduler_policy_key, &exception_cxx_type_info, exception_dtor) +DEFINE_CXX_DATA1(invalid_scheduler_policy_value, &exception_cxx_type_info, exception_dtor) +DEFINE_CXX_DATA1(invalid_scheduler_policy_thread_specification, &exception_cxx_type_info, exception_dtor) +DEFINE_CXX_DATA1(improper_scheduler_attach, &exception_cxx_type_info, exception_dtor) +DEFINE_CXX_DATA1(improper_scheduler_detach, &exception_cxx_type_info, exception_dtor) #endif void msvcrt_init_exception(void *base) diff --git a/dlls/msvcrt/cppexcept.h b/dlls/msvcrt/cppexcept.h index 5170bf23fa2..2792491ca7f 100644 --- a/dlls/msvcrt/cppexcept.h +++ b/dlls/msvcrt/cppexcept.h @@ -156,36 +156,37 @@ static inline void *get_this_pointer( const this_ptr_offsets *off, void *object } #ifndef __x86_64__ -#define DEFINE_EXCEPTION_TYPE_INFO(type, base_no, cl1, cl2) \ -\ +#define DEFINE_CXX_TYPE_INFO(type) \ static const cxx_type_info type ## _cxx_type_info = { \ 0, \ & type ##_type_info, \ { 0, -1, 0 }, \ sizeof(type), \ (cxx_copy_ctor)THISCALL(type ##_copy_ctor) \ -}; \ +}; + +#define DEFINE_CXX_DATA(type, base_no, cl1, cl2, dtor) \ +DEFINE_CXX_TYPE_INFO(type) \ \ -static const cxx_type_info_table type ## _type_info_table = { \ +static const cxx_type_info_table type ## _cxx_type_table = { \ base_no+1, \ { \ & type ## _cxx_type_info, \ cl1, \ - cl2 \ + cl2, \ } \ }; \ \ static const cxx_exception_type type ## _exception_type = { \ 0, \ - (cxx_copy_ctor)THISCALL(type ## _dtor), \ + (cxx_copy_ctor)THISCALL(dtor), \ NULL, \ - & type ## _type_info_table \ + & type ## _cxx_type_table \ }; #else -#define DEFINE_EXCEPTION_TYPE_INFO(type, base_no, cl1, cl2) \ -\ +#define DEFINE_CXX_TYPE_INFO(type) \ static cxx_type_info type ## _cxx_type_info = { \ 0, \ 0xdeadbeef, \ @@ -194,12 +195,22 @@ static cxx_type_info type ## _cxx_type_info = { \ 0xdeadbeef \ }; \ \ -static cxx_type_info_table type ## _type_info_table = { \ +static void init_ ## type ## _cxx_type_info(char *base) \ +{ \ + type ## _cxx_type_info.type_info = (char *)&type ## _type_info - base; \ + type ## _cxx_type_info.copy_ctor = (char *)type ## _copy_ctor - base; \ +} + +#define DEFINE_CXX_DATA(type, base_no, cl1, cl2, dtor) \ +\ +DEFINE_CXX_TYPE_INFO(type) \ +\ +static cxx_type_info_table type ## _cxx_type_table = { \ base_no+1, \ { \ 0xdeadbeef, \ 0xdeadbeef, \ - 0xdeadbeef \ + 0xdeadbeef, \ } \ }; \ \ @@ -212,14 +223,20 @@ static cxx_exception_type type ##_exception_type = { \ \ static void init_ ## type ## _cxx(char *base) \ { \ - type ## _cxx_type_info.type_info = (char *)&type ## _type_info - base; \ - type ## _cxx_type_info.copy_ctor = (char *)type ## _copy_ctor - base; \ - type ## _type_info_table.info[0] = (char *)&type ## _cxx_type_info - base; \ - type ## _type_info_table.info[1] = (char *)cl1 - base; \ - type ## _type_info_table.info[2] = (char *)cl2 - base; \ - type ## _exception_type.destructor = (char *)type ## _dtor - base; \ - type ## _exception_type.type_info_table = (char *)&type ## _type_info_table - base; \ + init_ ## type ## _cxx_type_info(base); \ + type ## _cxx_type_table.info[0] = (char *)&type ## _cxx_type_info - base; \ + type ## _cxx_type_table.info[1] = (char *)cl1 - base; \ + type ## _cxx_type_table.info[2] = (char *)cl2 - base; \ + type ## _exception_type.destructor = (char *)dtor - base; \ + type ## _exception_type.type_info_table = (char *)&type ## _cxx_type_table - base; \ } #endif +#define DEFINE_CXX_DATA0(name, dtor) \ + DEFINE_CXX_DATA(name, 0, NULL, NULL, dtor) +#define DEFINE_CXX_DATA1(name, cl1, dtor) \ + DEFINE_CXX_DATA(name, 1, cl1, NULL, dtor) +#define DEFINE_CXX_DATA2(name, cl1, cl2, dtor) \ + DEFINE_CXX_DATA(name, 2, cl1, cl2, dtor) + #endif /* __MSVCRT_CPPEXCEPT_H */
1
0
0
0
Piotr Caban : msvcrt: Use new() for allocations returning BadAlloc exception.
by Alexandre Julliard
18 Aug '21
18 Aug '21
Module: wine Branch: master Commit: b24ee3b534b3d186470e9ef0dd72b27452308dcd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b24ee3b534b3d186470e9ef0…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Aug 18 16:08:56 2021 +0200 msvcrt: Use new() for allocations returning BadAlloc exception. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/lock.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/dlls/msvcrt/lock.c b/dlls/msvcrt/lock.c index 74156aa7db3..78767689c06 100644 --- a/dlls/msvcrt/lock.c +++ b/dlls/msvcrt/lock.c @@ -23,7 +23,6 @@ #include "windef.h" #include "winbase.h" #include "winternl.h" -#include "wine/heap.h" #include "msvcrt.h" #include "cppexcept.h" #include "mtdll.h" @@ -921,11 +920,9 @@ int __cdecl event_wait_for_multiple(event **events, size_t count, bool wait_all, if(count == 0) return 0; - wait = heap_alloc(FIELD_OFFSET(thread_wait, entries[count])); - if(!wait) - throw_exception(EXCEPTION_BAD_ALLOC, 0, "bad allocation"); + wait = operator_new(FIELD_OFFSET(thread_wait, entries[count])); ret = evt_wait(wait, events, count, wait_all, timeout); - heap_free(wait); + operator_delete(wait); return ret; } @@ -1005,10 +1002,7 @@ bool __thiscall _Condition_variable_wait_for(_Condition_variable *this, TRACE("(%p %p %d)\n", this, cs, timeout); - if(!(q = HeapAlloc(GetProcessHeap(), 0, sizeof(cv_queue)))) { - throw_exception(EXCEPTION_BAD_ALLOC, 0, "bad allocation"); - } - + q = operator_new(sizeof(cv_queue)); critical_section_lock(&this->lock); q->next = this->queue; q->expired = FALSE; @@ -1030,7 +1024,7 @@ bool __thiscall _Condition_variable_wait_for(_Condition_variable *this, NtWaitForKeyedEvent(keyed_event, q, 0, 0); } - HeapFree(GetProcessHeap(), 0, q); + operator_delete(q); critical_section_lock(cs); return TRUE; }
1
0
0
0
Nikolay Sivov : dwrite/tests: Use winetest context for some tests.
by Alexandre Julliard
18 Aug '21
18 Aug '21
Module: wine Branch: master Commit: eba92fd3a776dbcb4e6aa34036a19bd69c331e6f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eba92fd3a776dbcb4e6aa340…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Aug 18 16:52:32 2021 +0300 dwrite/tests: Use winetest context for some tests. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/tests/analyzer.c | 77 ++++---- dlls/dwrite/tests/font.c | 443 ++++++++++++++++++++++++------------------- 2 files changed, 285 insertions(+), 235 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=eba92fd3a776dbcb4e6a…
1
0
0
0
Luke Deller : msvcrt/tests: Add test for fopen/_open access hints.
by Alexandre Julliard
18 Aug '21
18 Aug '21
Module: wine Branch: master Commit: 6553a66ba17ca643380eeebbd05d7f2fab936d18 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6553a66ba17ca643380eeebb…
Author: Luke Deller <luke(a)deller.id.au> Date: Wed Aug 18 15:25:53 2021 +0200 msvcrt/tests: Add test for fopen/_open access hints. Signed-off-by: Luke Deller <luke(a)deller.id.au> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/tests/file.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c index fb242d81282..1d74c6135b8 100644 --- a/dlls/msvcrt/tests/file.c +++ b/dlls/msvcrt/tests/file.c @@ -35,6 +35,7 @@ #include <process.h> #include <errno.h> #include <locale.h> +#include <winternl.h> #define MSVCRT_FD_BLOCK_SIZE 32 typedef struct { @@ -2731,6 +2732,81 @@ static void test_lseek(void) DeleteFileA("_creat.tst"); } +static BOOL has_sequential_hint(int fd) +{ + HANDLE handle; + FILE_MODE_INFORMATION mode_info; + IO_STATUS_BLOCK io; + NTSTATUS status; + + handle = (HANDLE)_get_osfhandle(fd); + status = NtQueryInformationFile(handle, &io, &mode_info, sizeof(mode_info), + FileModeInformation); + ok(!status, "NtQueryInformationFile failed\n"); + return (mode_info.Mode & FILE_SEQUENTIAL_ONLY) != 0; +} + +static void test_fopen_hints(void) +{ + static const struct { + const char *mode; + BOOL seq; + } tests[] = { + { "rb", FALSE }, + { "rbS", TRUE }, + { "rbR", FALSE }, + { "rbSR", TRUE }, + { "rbRS", FALSE } + }; + + char temppath[MAX_PATH], tempfile[MAX_PATH]; + FILE *fp; + int i; + + GetTempPathA(MAX_PATH, temppath); + GetTempFileNameA(temppath, "", 0, tempfile); + + for (i = 0; i < ARRAY_SIZE(tests); ++i) + { + fp = fopen(tempfile, tests[i].mode); + ok(fp != NULL, "unable to fopen test file with mode \"%s\"\n", tests[i].mode); + ok(has_sequential_hint(_fileno(fp)) == tests[i].seq, + "unexpected sequential hint for fopen mode \"%s\"\n", tests[i].mode); + fclose(fp); + } + unlink(tempfile); +} + +static void test_open_hints(void) +{ + static const struct { + int mode; + BOOL seq; + } tests[] = { + { _O_RDONLY | _O_BINARY, FALSE }, + { _O_RDONLY | _O_BINARY | _O_SEQUENTIAL, TRUE }, + { _O_RDONLY | _O_BINARY | _O_RANDOM, FALSE }, + { _O_RDONLY | _O_BINARY | _O_RANDOM | _O_SEQUENTIAL, TRUE } + }; + + char temppath[MAX_PATH], tempfile[MAX_PATH]; + int fd; + int i; + + GetTempPathA(MAX_PATH, temppath); + GetTempFileNameA(temppath, "", 0, tempfile); + + for (i = 0; i < ARRAY_SIZE(tests); ++i) + { + fd = open(tempfile, tests[i].mode); + ok(fd != -1, "unable to _open test file with flags %x\n", tests[i].mode); + ok(has_sequential_hint(fd) == tests[i].seq, + "unexpected sequential hint for _open flags %x\n", tests[i].mode); + close(fd); + } + unlink(tempfile); +} + START_TEST(file) { int arg_c; @@ -2803,6 +2879,8 @@ START_TEST(file) test_close(); test__creat(); test_lseek(); + test_fopen_hints(); + test_open_hints(); /* Wait for the (_P_NOWAIT) spawned processes to finish to make sure the report * file contains lines in the correct order
1
0
0
0
← Newer
1
...
47
48
49
50
51
52
53
...
106
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
Results per page:
10
25
50
100
200