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
April 2020
----- 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
1016 discussions
Start a n
N
ew thread
Biswapriyo Nath : include/dxgi.idl: Add cpu access flags.
by Alexandre Julliard
30 Apr '20
30 Apr '20
Module: wine Branch: master Commit: 7fa051eca7986d631342eea72f1476e28c059730 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7fa051eca7986d631342eea7…
Author: Biswapriyo Nath <nathbappai(a)gmail.com> Date: Thu Apr 30 11:43:14 2020 +0530 include/dxgi.idl: Add cpu access flags. Signed-off-by: Biswapriyo Nath <nathbappai(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/dxgi.idl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/dxgi.idl b/include/dxgi.idl index b724770ab7..c2960fd88c 100644 --- a/include/dxgi.idl +++ b/include/dxgi.idl @@ -33,6 +33,12 @@ typedef struct _LUID { } LUID, *PLUID; cpp_quote("#endif") +const UINT DXGI_CPU_ACCESS_NONE = 0; +const UINT DXGI_CPU_ACCESS_DYNAMIC = 1; +const UINT DXGI_CPU_ACCESS_READ_WRITE = 2; +const UINT DXGI_CPU_ACCESS_SCRATCH = 3; +const UINT DXGI_CPU_ACCESS_FIELD = 15; + typedef UINT DXGI_USAGE; const DXGI_USAGE DXGI_USAGE_SHADER_INPUT = 0x10L; const DXGI_USAGE DXGI_USAGE_RENDER_TARGET_OUTPUT = 0x20L; @@ -439,6 +445,7 @@ interface IDXGIDevice : IDXGIObject typedef enum DXGI_ADAPTER_FLAG { DXGI_ADAPTER_FLAG_NONE = 0, DXGI_ADAPTER_FLAG_REMOTE = 1, + DXGI_ADAPTER_FLAG_SOFTWARE = 2, DXGI_ADAPTER_FLAG_FORCE_DWORD = 0xFFFFFFFF } DXGI_ADAPTER_FLAG;
1
0
0
0
Vijay Kiran Kamuju : include: Add dvdif.idl.
by Alexandre Julliard
30 Apr '20
30 Apr '20
Module: wine Branch: master Commit: 7acbd367a593c6176a96162a64b321383fc1e81d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7acbd367a593c6176a96162a…
Author: Vijay Kiran Kamuju <infyquest(a)gmail.com> Date: Wed Apr 29 19:47:26 2020 -0500 include: Add dvdif.idl. Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/Makefile.in | 1 + include/dvdif.idl | 742 ++++++++++++++++++++++++++++++++++++++++++++++++++++ include/strmif.idl | 6 +- 3 files changed, 744 insertions(+), 5 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=7acbd367a593c6176a96…
1
0
0
0
Alexandre Julliard : include: Get rid of Mac support in RPC headers.
by Alexandre Julliard
30 Apr '20
30 Apr '20
Module: wine Branch: master Commit: 7bafeef595a50d1d90dfb42371144c4f285ac5c4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7bafeef595a50d1d90dfb423…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 30 11:19:12 2020 +0200 include: Get rid of Mac support in RPC headers. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/rpc.h | 6 +----- include/rpcndr.h | 65 +++++++++++--------------------------------------------- 2 files changed, 13 insertions(+), 58 deletions(-) diff --git a/include/rpc.h b/include/rpc.h index eb7d0417bd..9fa1c1ef16 100644 --- a/include/rpc.h +++ b/include/rpc.h @@ -25,11 +25,7 @@ #ifndef __WINE_RPC_H #define __WINE_RPC_H -#if defined(__powerpc__) || defined(_MAC) /* ? */ -# define __RPC_MAC__ - /* Also define __RPC_WIN32__ to ensure compatibility */ -# define __RPC_WIN32__ -#elif defined(_WIN64) +#ifdef _WIN64 # define __RPC_WIN64__ #else # define __RPC_WIN32__ diff --git a/include/rpcndr.h b/include/rpcndr.h index 86cbe5f6c6..27b9096827 100644 --- a/include/rpcndr.h +++ b/include/rpcndr.h @@ -49,59 +49,18 @@ extern "C" { #endif #endif -/* stupid #if can't handle casts... this __stupidity - is just a workaround for that limitation */ - -#define __NDR_CHAR_REP_MASK 0x000f -#define __NDR_INT_REP_MASK 0x00f0 -#define __NDR_FLOAT_REP_MASK 0xff00 - -#define __NDR_IEEE_FLOAT 0x0000 -#define __NDR_VAX_FLOAT 0x0100 -#define __NDR_IBM_FLOAT 0x0300 - -#define __NDR_ASCII_CHAR 0x0000 -#define __NDR_EBCDIC_CHAR 0x0001 - -#define __NDR_LITTLE_ENDIAN 0x0010 -#define __NDR_BIG_ENDIAN 0x0000 - -/* Mac's are special */ -#if defined(__RPC_MAC__) -# define __NDR_LOCAL_DATA_REPRESENTATION \ - (__NDR_IEEE_FLOAT | __NDR_ASCII_CHAR | __NDR_BIG_ENDIAN) -#else -# define __NDR_LOCAL_DATA_REPRESENTATION \ - (__NDR_IEEE_FLOAT | __NDR_ASCII_CHAR | __NDR_LITTLE_ENDIAN) -#endif - -#define __NDR_LOCAL_ENDIAN \ - (__NDR_LOCAL_DATA_REPRESENTATION & __NDR_INT_REP_MASK) - -/* for convenience, define NDR_LOCAL_IS_BIG_ENDIAN iff it is */ -#if __NDR_LOCAL_ENDIAN == __NDR_BIG_ENDIAN -# define NDR_LOCAL_IS_BIG_ENDIAN -#elif __NDR_LOCAL_ENDIAN == __NDR_LITTLE_ENDIAN -# undef NDR_LOCAL_IS_BIG_ENDIAN -#else -# error alien NDR_LOCAL_ENDIAN - Greg botched the defines again, please report -#endif - -/* finally, do the casts like Microsoft */ - -#define NDR_CHAR_REP_MASK ((ULONG) __NDR_CHAR_REP_MASK) -#define NDR_INT_REP_MASK ((ULONG) __NDR_INT_REP_MASK) -#define NDR_FLOAT_REP_MASK ((ULONG) __NDR_FLOAT_REP_MASK) -#define NDR_IEEE_FLOAT ((ULONG) __NDR_IEEE_FLOAT) -#define NDR_VAX_FLOAT ((ULONG) __NDR_VAX_FLOAT) -#define NDR_IBM_FLOAT ((ULONG) __NDR_IBM_FLOAT) -#define NDR_ASCII_CHAR ((ULONG) __NDR_ASCII_CHAR) -#define NDR_EBCDIC_CHAR ((ULONG) __NDR_EBCDIC_CHAR) -#define NDR_LITTLE_ENDIAN ((ULONG) __NDR_LITTLE_ENDIAN) -#define NDR_BIG_ENDIAN ((ULONG) __NDR_BIG_ENDIAN) -#define NDR_LOCAL_DATA_REPRESENTATION ((ULONG) __NDR_LOCAL_DATA_REPRESENTATION) -#define NDR_LOCAL_ENDIAN ((ULONG) __NDR_LOCAL_ENDIAN) - +#define NDR_CHAR_REP_MASK ((ULONG)0x000f) +#define NDR_INT_REP_MASK ((ULONG)0x00f0) +#define NDR_FLOAT_REP_MASK ((ULONG)0xff00) +#define NDR_IEEE_FLOAT ((ULONG)0x0000) +#define NDR_VAX_FLOAT ((ULONG)0x0100) +#define NDR_IBM_FLOAT ((ULONG)0x0300) +#define NDR_ASCII_CHAR ((ULONG)0x0000) +#define NDR_EBCDIC_CHAR ((ULONG)0x0001) +#define NDR_LITTLE_ENDIAN ((ULONG)0x0010) +#define NDR_BIG_ENDIAN ((ULONG)0x0000) +#define NDR_LOCAL_DATA_REPRESENTATION NDR_LITTLE_ENDIAN +#define NDR_LOCAL_ENDIAN NDR_LITTLE_ENDIAN #define TARGET_IS_NT50_OR_LATER 1 #define TARGET_IS_NT40_OR_LATER 1
1
0
0
0
Alexandre Julliard : include: Get rid of ALLOW_UNALIGNED_ACCESS.
by Alexandre Julliard
30 Apr '20
30 Apr '20
Module: wine Branch: master Commit: 0995117b503305b249f569dbd768f79b77b5fb03 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0995117b503305b249f569db…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 30 11:18:53 2020 +0200 include: Get rid of ALLOW_UNALIGNED_ACCESS. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/krnl386.exe16/local.c | 9 +-------- include/basetsd.h | 10 ---------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/dlls/krnl386.exe16/local.c b/dlls/krnl386.exe16/local.c index bb8fcdb44f..672f1c22a1 100644 --- a/dlls/krnl386.exe16/local.c +++ b/dlls/krnl386.exe16/local.c @@ -78,8 +78,6 @@ typedef struct /* * We make addr = 4n + 2 and set *((WORD *)addr - 1) = &addr like Windows does * in case something actually relies on this. - * Note that if the architecture does not allow unaligned accesses, we make - * addr = 4n + 4 to avoid returning unaligned pointers from LocalAlloc etc. * * An unused handle has lock = flags = 0xff. In windows addr is that of next * free handle, at the moment in wine we set it to 0. @@ -88,12 +86,7 @@ typedef struct * (LMEM_DISCARDED >> 8) */ -#ifdef ALLOW_UNALIGNED_ACCESS -# define MOVEABLE_PREFIX sizeof(HLOCAL16) -#else -# define MOVEABLE_PREFIX sizeof(int) -#endif - +#define MOVEABLE_PREFIX sizeof(HLOCAL16) #include "pshpack1.h" diff --git a/include/basetsd.h b/include/basetsd.h index c4b9e18f28..c9f5c90e86 100644 --- a/include/basetsd.h +++ b/include/basetsd.h @@ -271,34 +271,24 @@ typedef ULONG_PTR KAFFINITY, *PKAFFINITY; /* These are hardcoded to avoid dependencies on config.h in Winelib apps. */ #if defined(__i386__) # undef WORDS_BIGENDIAN -# define ALLOW_UNALIGNED_ACCESS #elif defined(__x86_64__) # undef WORDS_BIGENDIAN -# define ALLOW_UNALIGNED_ACCESS #elif defined(__powerpc__) # define WORDS_BIGENDIAN -# undef ALLOW_UNALIGNED_ACCESS #elif defined(__ALPHA__) # undef WORDS_BIGENDIAN -# undef ALLOW_UNALIGNED_ACCESS #elif defined(__ARMEB__) # define WORDS_BIGENDIAN -# undef ALLOW_UNALIGNED_ACCESS #elif defined(__ARMEL__) || defined(__arm__) # undef WORDS_BIGENDIAN -# undef ALLOW_UNALIGNED_ACCESS #elif defined(__AARCH64EB__) # define WORDS_BIGENDIAN -# undef ALLOW_UNALIGNED_ACCESS #elif defined(__AARCH64EL__) || defined(__aarch64__) # undef WORDS_BIGENDIAN -# undef ALLOW_UNALIGNED_ACCESS #elif defined(__MIPSEB__) # define WORDS_BIGENDIAN -# undef ALLOW_UNALIGNED_ACCESS #elif defined(__MIPSEL__) # undef WORDS_BIGENDIAN -# undef ALLOW_UNALIGNED_ACCESS #elif !defined(RC_INVOKED) && !defined(__WIDL__) && !defined(__midl) # error Unknown CPU architecture! #endif
1
0
0
0
Alexandre Julliard : include: Get rid of BITFIELDS_BIGENDIAN.
by Alexandre Julliard
30 Apr '20
30 Apr '20
Module: wine Branch: master Commit: a4c6ad6b1f84a4aa45d818839fd1de1f0729ef62 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a4c6ad6b1f84a4aa45d81883…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 30 11:17:54 2020 +0200 include: Get rid of BITFIELDS_BIGENDIAN. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/basetsd.h | 10 ---------- include/winnt.h | 16 ---------------- 2 files changed, 26 deletions(-) diff --git a/include/basetsd.h b/include/basetsd.h index 96ea3f01bc..c4b9e18f28 100644 --- a/include/basetsd.h +++ b/include/basetsd.h @@ -271,43 +271,33 @@ typedef ULONG_PTR KAFFINITY, *PKAFFINITY; /* These are hardcoded to avoid dependencies on config.h in Winelib apps. */ #if defined(__i386__) # undef WORDS_BIGENDIAN -# undef BITFIELDS_BIGENDIAN # define ALLOW_UNALIGNED_ACCESS #elif defined(__x86_64__) # undef WORDS_BIGENDIAN -# undef BITFIELDS_BIGENDIAN # define ALLOW_UNALIGNED_ACCESS #elif defined(__powerpc__) # define WORDS_BIGENDIAN -# define BITFIELDS_BIGENDIAN # undef ALLOW_UNALIGNED_ACCESS #elif defined(__ALPHA__) # undef WORDS_BIGENDIAN -# undef BITFIELDS_BIGENDIAN # undef ALLOW_UNALIGNED_ACCESS #elif defined(__ARMEB__) # define WORDS_BIGENDIAN -# define BITFIELDS_BIGENDIAN # undef ALLOW_UNALIGNED_ACCESS #elif defined(__ARMEL__) || defined(__arm__) # undef WORDS_BIGENDIAN -# undef BITFIELDS_BIGENDIAN # undef ALLOW_UNALIGNED_ACCESS #elif defined(__AARCH64EB__) # define WORDS_BIGENDIAN -# define BITFIELDS_BIGENDIAN # undef ALLOW_UNALIGNED_ACCESS #elif defined(__AARCH64EL__) || defined(__aarch64__) # undef WORDS_BIGENDIAN -# undef BITFIELDS_BIGENDIAN # undef ALLOW_UNALIGNED_ACCESS #elif defined(__MIPSEB__) # define WORDS_BIGENDIAN -# define BITFIELDS_BIGENDIAN # undef ALLOW_UNALIGNED_ACCESS #elif defined(__MIPSEL__) # undef WORDS_BIGENDIAN -# undef BITFIELDS_BIGENDIAN # undef ALLOW_UNALIGNED_ACCESS #elif !defined(RC_INVOKED) && !defined(__WIDL__) && !defined(__midl) # error Unknown CPU architecture! diff --git a/include/winnt.h b/include/winnt.h index c90e9052de..883794cde8 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -3817,33 +3817,17 @@ typedef struct _IMAGE_RESOURCE_DIRECTORY { typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY { union { struct { -#ifdef BITFIELDS_BIGENDIAN - unsigned NameIsString:1; - unsigned NameOffset:31; -#else unsigned NameOffset:31; unsigned NameIsString:1; -#endif } DUMMYSTRUCTNAME; DWORD Name; -#ifdef WORDS_BIGENDIAN - WORD __pad; - WORD Id; -#else WORD Id; - WORD __pad; -#endif } DUMMYUNIONNAME; union { DWORD OffsetToData; struct { -#ifdef BITFIELDS_BIGENDIAN - unsigned DataIsDirectory:1; - unsigned OffsetToDirectory:31; -#else unsigned OffsetToDirectory:31; unsigned DataIsDirectory:1; -#endif } DUMMYSTRUCTNAME2; } DUMMYUNIONNAME2; } IMAGE_RESOURCE_DIRECTORY_ENTRY,*PIMAGE_RESOURCE_DIRECTORY_ENTRY;
1
0
0
0
Alexandre Julliard : wrc: Remove some dead code.
by Alexandre Julliard
30 Apr '20
30 Apr '20
Module: wine Branch: master Commit: 6cc475dbe53f8c89796b29af2a5979c1c85a4438 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6cc475dbe53f8c89796b29af…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 30 10:09:04 2020 +0200 wrc: Remove some dead code. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/wrc/Makefile.in | 1 - tools/wrc/readres.c | 391 -------------------------------------------------- tools/wrc/readres.h | 28 ---- tools/wrc/wrc.c | 1 - 4 files changed, 421 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=6cc475dbe53f8c89796b…
1
0
0
0
Alexandre Julliard : ntdll: Remove support for custom virtual memory alignments.
by Alexandre Julliard
30 Apr '20
30 Apr '20
Module: wine Branch: master Commit: 2af035f53f2ebdcc56974aa938c1de83ada5b8ec URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2af035f53f2ebdcc56974aa9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 30 10:07:36 2020 +0200 ntdll: Remove support for custom virtual memory alignments. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/ntdll_misc.h | 4 +-- dlls/ntdll/server.c | 8 ++--- dlls/ntdll/virtual.c | 86 +++++++++++++++++++++---------------------------- 3 files changed, 41 insertions(+), 57 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=2af035f53f2ebdcc5697…
1
0
0
0
Alexandre Julliard : ntdll: Allocate TEBs out of a larger memory block.
by Alexandre Julliard
30 Apr '20
30 Apr '20
Module: wine Branch: master Commit: dee934c0ff54851f049ab27b11d84c5a5810662c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dee934c0ff54851f049ab27b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 30 10:05:56 2020 +0200 ntdll: Allocate TEBs out of a larger memory block. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/ntdll_misc.h | 2 +- dlls/ntdll/thread.c | 19 ++------- dlls/ntdll/virtual.c | 103 ++++++++++++++++++++++++++++++++++++++---------- 3 files changed, 86 insertions(+), 38 deletions(-) diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 3e877593b6..a22b77b481 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -93,7 +93,6 @@ extern void debug_init(void) DECLSPEC_HIDDEN; extern TEB *thread_init(void) DECLSPEC_HIDDEN; extern void actctx_init(void) DECLSPEC_HIDDEN; extern void virtual_init(void) DECLSPEC_HIDDEN; -extern void virtual_init_threading(void) DECLSPEC_HIDDEN; extern void fill_cpu_info(void) DECLSPEC_HIDDEN; extern void heap_set_debug_flags( HANDLE handle ) DECLSPEC_HIDDEN; extern void init_unix_codepage(void) DECLSPEC_HIDDEN; @@ -200,6 +199,7 @@ extern NTSTATUS virtual_map_section( HANDLE handle, PVOID *addr_ptr, unsigned sh ULONG protect, pe_image_info_t *image_info ) DECLSPEC_HIDDEN; extern void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info ) DECLSPEC_HIDDEN; extern NTSTATUS virtual_create_builtin_view( void *base ) DECLSPEC_HIDDEN; +extern TEB * virtual_alloc_first_teb(void) DECLSPEC_HIDDEN; extern NTSTATUS virtual_alloc_teb( TEB **teb ) DECLSPEC_HIDDEN; extern void virtual_free_teb( TEB *teb ) DECLSPEC_HIDDEN; extern NTSTATUS virtual_alloc_thread_stack( INITIAL_TEB *stack, SIZE_T reserve_size, diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 604fd20c84..d116c7bd57 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -246,13 +246,10 @@ TEB *thread_init(void) user_shared_data = addr; memcpy( user_shared_data->NtSystemRoot, default_windirW, sizeof(default_windirW) ); - /* allocate and initialize the PEB */ - - addr = NULL; - size = sizeof(*peb); - virtual_alloc_aligned( &addr, 0, &size, MEM_COMMIT | MEM_TOP_DOWN, PAGE_READWRITE, 1 ); - peb = addr; + /* allocate and initialize the PEB and initial TEB */ + teb = virtual_alloc_first_teb(); + peb = teb->Peb; peb->FastPebLock = &peb_lock; peb->TlsBitmap = &tls_bitmap; peb->TlsExpansionBitmap = &tls_expansion_bitmap; @@ -282,21 +279,12 @@ TEB *thread_init(void) */ peb->SessionId = 1; - /* allocate and initialize the initial TEB */ - - signal_init_threading(); - virtual_alloc_teb( &teb ); - teb->Peb = peb; - teb->Tib.StackBase = (void *)~0UL; - thread_data = (struct ntdll_thread_data *)&teb->GdiTebBatch; thread_data->request_fd = -1; thread_data->reply_fd = -1; thread_data->wait_fd[0] = -1; thread_data->wait_fd[1] = -1; - signal_init_thread( teb ); - virtual_init_threading(); debug_init(); init_paths(); set_process_name( __wine_main_argc, __wine_main_argv ); @@ -517,7 +505,6 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr, if ((status = virtual_alloc_teb( &teb ))) goto error; - teb->Peb = NtCurrentTeb()->Peb; teb->ClientId.UniqueProcess = ULongToHandle(GetCurrentProcessId()); teb->ClientId.UniqueThread = ULongToHandle(tid); diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 7be00a1ac2..5900616e0c 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -164,6 +164,11 @@ SIZE_T signal_stack_size = 0; SIZE_T signal_stack_mask = 0; static SIZE_T signal_stack_align; +/* TEB allocation blocks */ +static TEB *teb_block; +static TEB *next_free_teb; +static int teb_block_pos; + #define ROUND_ADDR(addr,mask) \ ((void *)((UINT_PTR)(addr) & ~(UINT_PTR)(mask))) @@ -2011,15 +2016,6 @@ void virtual_init(void) } -/*********************************************************************** - * virtual_init_threading - */ -void virtual_init_threading(void) -{ - use_locks = TRUE; -} - - /*********************************************************************** * virtual_get_system_info */ @@ -2093,29 +2089,90 @@ NTSTATUS virtual_create_builtin_view( void *module ) } +/*********************************************************************** + * virtual_alloc_first_teb + */ +TEB *virtual_alloc_first_teb(void) +{ + TEB *teb; + PEB *peb; + SIZE_T peb_size = page_size; + SIZE_T teb_size = signal_stack_mask + 1; + SIZE_T total = 32 * teb_size; + + NtAllocateVirtualMemory( NtCurrentProcess(), (void **)&teb_block, 0, &total, + MEM_RESERVE | MEM_TOP_DOWN, PAGE_READWRITE ); + teb_block_pos = 30; + teb = (TEB *)((char *)teb_block + 30 * teb_size); + peb = (PEB *)((char *)teb_block + 32 * teb_size - peb_size); + NtAllocateVirtualMemory( NtCurrentProcess(), (void **)&teb, 0, &teb_size, MEM_COMMIT, PAGE_READWRITE ); + NtAllocateVirtualMemory( NtCurrentProcess(), (void **)&peb, 0, &peb_size, MEM_COMMIT, PAGE_READWRITE ); + + teb->Peb = peb; + teb->Tib.Self = &teb->Tib; + teb->Tib.ExceptionList = (void *)~0ul; + teb->Tib.StackBase = (void *)~0ul; + teb->StaticUnicodeString.Buffer = teb->StaticUnicodeBuffer; + teb->StaticUnicodeString.MaximumLength = sizeof(teb->StaticUnicodeBuffer); + signal_init_threading(); + signal_alloc_thread( teb ); + signal_init_thread( teb ); + use_locks = TRUE; + return teb; +} + + /*********************************************************************** * virtual_alloc_teb */ NTSTATUS virtual_alloc_teb( TEB **ret_teb ) { - SIZE_T size = signal_stack_mask + 1; - void *addr = NULL; - TEB *teb; - NTSTATUS status; + sigset_t sigset; + TEB *teb = NULL; + NTSTATUS status = STATUS_SUCCESS; + SIZE_T teb_size = signal_stack_mask + 1; - if ((status = virtual_alloc_aligned( &addr, 0, &size, MEM_COMMIT | MEM_TOP_DOWN, - PAGE_READWRITE, signal_stack_align ))) - return status; + server_enter_uninterrupted_section( &csVirtual, &sigset ); + if (next_free_teb) + { + teb = next_free_teb; + next_free_teb = *(TEB **)teb; + memset( teb, 0, sizeof(*teb) ); + } + else + { + if (!teb_block_pos) + { + void *addr = NULL; + SIZE_T total = 32 * teb_size; - *ret_teb = teb = addr; + if ((status = NtAllocateVirtualMemory( NtCurrentProcess(), &addr, 0, &total, + MEM_RESERVE, PAGE_READWRITE ))) + { + server_leave_uninterrupted_section( &csVirtual, &sigset ); + return status; + } + teb_block = addr; + teb_block_pos = 32; + } + teb = (TEB *)((char *)teb_block + --teb_block_pos * teb_size); + NtAllocateVirtualMemory( NtCurrentProcess(), (void **)&teb, 0, &teb_size, + MEM_COMMIT, PAGE_READWRITE ); + } + server_leave_uninterrupted_section( &csVirtual, &sigset ); + + *ret_teb = teb; + teb->Peb = NtCurrentTeb()->Peb; teb->Tib.Self = &teb->Tib; teb->Tib.ExceptionList = (void *)~0UL; teb->StaticUnicodeString.Buffer = teb->StaticUnicodeBuffer; teb->StaticUnicodeString.MaximumLength = sizeof(teb->StaticUnicodeBuffer); if ((status = signal_alloc_thread( teb ))) { - size = 0; - NtFreeVirtualMemory( NtCurrentProcess(), &addr, &size, MEM_RELEASE ); + server_enter_uninterrupted_section( &csVirtual, &sigset ); + *(TEB **)teb = next_free_teb; + next_free_teb = teb; + server_leave_uninterrupted_section( &csVirtual, &sigset ); } return status; } @@ -2128,6 +2185,7 @@ void virtual_free_teb( TEB *teb ) { struct ntdll_thread_data *thread_data = (struct ntdll_thread_data *)&teb->GdiTebBatch; SIZE_T size; + sigset_t sigset; signal_free_thread( teb ); if (teb->DeallocationStack) @@ -2140,8 +2198,11 @@ void virtual_free_teb( TEB *teb ) size = 0; NtFreeVirtualMemory( GetCurrentProcess(), &thread_data->start_stack, &size, MEM_RELEASE ); } - size = 0; - NtFreeVirtualMemory( NtCurrentProcess(), (void **)&teb, &size, MEM_RELEASE ); + + server_enter_uninterrupted_section( &csVirtual, &sigset ); + *(TEB **)teb = next_free_teb; + next_free_teb = teb; + server_leave_uninterrupted_section( &csVirtual, &sigset ); }
1
0
0
0
Alexandre Julliard : ntdll: Get rid of obsolete KERN_THALTSTACK sysctl.
by Alexandre Julliard
30 Apr '20
30 Apr '20
Module: wine Branch: master Commit: 5dcb9ddff7cdd017b647cd6555c531ac2e15d368 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5dcb9ddff7cdd017b647cd65…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 30 09:54:26 2020 +0200 ntdll: Get rid of obsolete KERN_THALTSTACK sysctl. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_i386.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 2f2a36a579..e905ed0af1 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -45,9 +45,6 @@ #ifdef HAVE_SYS_SIGNAL_H # include <sys/signal.h> #endif -#ifdef HAVE_SYS_SYSCTL_H -# include <sys/sysctl.h> -#endif #ifdef HAVE_SYS_UCONTEXT_H # include <sys/ucontext.h> #endif @@ -2593,14 +2590,6 @@ void signal_init_thread( TEB *teb ) struct x86_thread_data *thread_data = (struct x86_thread_data *)teb->SystemReserved2; stack_t ss; -#ifdef __APPLE__ - int mib[2], val = 1; - - mib[0] = CTL_KERN; - mib[1] = KERN_THALTSTACK; - sysctl( mib, 2, NULL, NULL, &val, sizeof(val) ); -#endif - ss.ss_sp = (char *)teb + teb_size; ss.ss_size = signal_stack_size; ss.ss_flags = 0;
1
0
0
0
Zebediah Figura : quartz/vmr9: Improve tracing in IVMRSurfaceAllocatorNotify9::AllocateSurfaceHelper().
by Alexandre Julliard
30 Apr '20
30 Apr '20
Module: wine Branch: master Commit: 734a17bdae22d4d04ec510c2c1700a30b6a06848 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=734a17bdae22d4d04ec510c2…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Apr 29 20:15:16 2020 -0500 quartz/vmr9: Improve tracing in IVMRSurfaceAllocatorNotify9::AllocateSurfaceHelper(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/vmr9.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index f4faf2f97a..f611a3a7cf 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -2107,11 +2107,15 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AllocateSurfaceHelper(IVMRSurfa DWORD i; HRESULT hr = S_OK; - FIXME("(%p/%p)->(%p, %p => %u, %p) semi-stub\n", iface, This, allocinfo, numbuffers, (numbuffers ? *numbuffers : 0), surface); + TRACE("filter %p, allocinfo %p, numbuffers %p, surface %p.\n", This, numbuffers, allocinfo, surface); if (!allocinfo || !numbuffers || !surface) return E_POINTER; + TRACE("Flags %#x, size %ux%u, format %u (%#x), pool %u, minimum buffers %u.\n", + allocinfo->dwFlags, allocinfo->dwWidth, allocinfo->dwHeight, + allocinfo->Format, allocinfo->Format, allocinfo->Pool, allocinfo->MinBuffers); + if (!allocinfo->Format) { IDirect3DSurface9 *backbuffer; @@ -2126,19 +2130,19 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AllocateSurfaceHelper(IVMRSurfa if (!*numbuffers || *numbuffers < allocinfo->MinBuffers) { - ERR("Invalid number of buffers?\n"); + WARN("%u surfaces requested (minimum %u); returning E_INVALIDARG.\n", + *numbuffers, allocinfo->MinBuffers); return E_INVALIDARG; } if (!This->allocator_d3d9_dev) { - ERR("No direct3d device when requested to allocate a surface!\n"); + WARN("No Direct3D device; returning VFW_E_WRONG_STATE.\n"); return VFW_E_WRONG_STATE; } if (allocinfo->dwFlags == VMR9AllocFlag_OffscreenSurface) { - ERR("Creating offscreen surface\n"); for (i = 0; i < *numbuffers; ++i) { hr = IDirect3DDevice9_CreateOffscreenPlainSurface(This->allocator_d3d9_dev, allocinfo->dwWidth, allocinfo->dwHeight, @@ -2149,7 +2153,6 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AllocateSurfaceHelper(IVMRSurfa } else if (allocinfo->dwFlags == VMR9AllocFlag_TextureSurface) { - TRACE("Creating texture surface\n"); for (i = 0; i < *numbuffers; ++i) { IDirect3DTexture9 *texture; @@ -2178,6 +2181,9 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AllocateSurfaceHelper(IVMRSurfa return E_NOTIMPL; } + if (FAILED(hr)) + WARN("%u/%u surfaces allocated, hr %#x.\n", i, *numbuffers, hr); + if (i >= allocinfo->MinBuffers) { hr = S_OK;
1
0
0
0
← Newer
1
2
3
4
5
...
102
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
Results per page:
10
25
50
100
200