Jacek Caban
a7ecf08040
include: Don't use DECLSPEC_HIDDEN for NTSYSAPI in Unix libs.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 20:09:20 +02:00
Alex Henrie
3ad4def46a
include: Provide a definition of NOP_FUNCTION that works on GCC.
...
NOP_FUNCTION is a drop-in function replacement that ignores its
arguments but also suppresses compiler warnings about them being unused.
For example, on MSVC, 0(foo, bar, baz()); or __noop(foo, bar, baz());
would suppress warnings about foo and bar being unused and not call baz
at all. Neither of those syntaxes is supported on GCC, which provides no
similar way to suppress unused variable warnings, but we can at least
allow such code to compile by defining NOP_FUNCTION to be an empty
variadic macro.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 20:12:15 +02:00
Alexandre Julliard
7a25671c38
include: Define all the context structures on all platforms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-12 16:56:27 +02:00
Alexandre Julliard
dba8d3c3d4
include: Remove context definitions for obsolete platforms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-11 20:33:51 +02:00
Alexandre Julliard
2d519f5aa4
ntdll: Support MaxVersionTested in the manifest compatibility element.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 15:39:55 +02:00
Paul Gofman
084519a82b
ntdll: Implement NtQuerySystemInformationEx(SystemCpuSetInformation).
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Jacek Caban
b39b9eea39
include: Don't default to WINE_NO_NAMELESS_EXTENSION for Wine build.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 21:48:38 +01:00
Alexandre Julliard
e5cade0ff1
ntdll: Remove DLL_WINE_PREATTACH support.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 11:01:25 +01:00
Jacek Caban
894dbe8353
include: Use GCC-style InterlockedCompareExchange128 implementation on clang in MSVC mode.
...
It's not yet supported on aarch64.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-26 16:28:56 +01:00
Jacek Caban
4fdea7a7ca
include: Add MSVC ARM version of NtCurrentTeb.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-26 16:28:37 +01:00
Jacek Caban
e3708c2c79
include: Fix __dmb declaration.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-26 16:28:20 +01:00
Dmitry Timoshkov
3f951cbe72
include/winnt.h: Fix arguments order for _InterlockedCompareExchange64() MSVC intrinsic.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-26 16:28:12 +01:00
Alexandre Julliard
584427fc89
server: Avoid redefining the DuplicateHandle() constants.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 21:20:47 +01:00
Alexandre Julliard
7b78896a8a
include: Add a couple of access right flags.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 20:43:08 +01:00
Rémi Bernon
9138508a94
include: Define DECLSPEC_SELECTANY on MinGW.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 10:50:22 +01:00
Jacek Caban
1495ccd152
winnt.h: Fix MSVC variants of InterlockedIncrement16 and InterlockedDecrement16.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 18:33:32 +01:00
Alexandre Julliard
e137063394
include: Add a couple of dll characteristics.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 20:46:13 +01:00
Alexandre Julliard
fc7c3b51ac
ntdll: Always inline NtCurrentTeb() on ARM.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 20:46:13 +01:00
Zebediah Figura
86fc30c105
include: Add YieldProcessor().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 10:30:41 +01:00
Zebediah Figura
a3c295d4cf
include: Add InterlockedIncrement16() and InterlockedDecrement16().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 10:27:49 +01:00
Zebediah Figura
0d1345ac2b
include: Add InterlockedAnd().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 10:27:33 +01:00
Zebediah Figura
a952453888
include: Add MemoryBarrier().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-20 22:24:29 +01:00
Zebediah Figura
377f721362
include: Add InterlockedOr().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-20 22:23:35 +01:00
Zebediah Figura
aabdaed102
include: Use __atomic_exchange_n() for InterlockedExchange*() if possible.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-20 22:22:52 +01:00
Zebediah Figura
04a9c9eba7
include: Move InterlockedCompareExchange128 next to the other InterlockedCompareExchange* functions.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 21:44:24 +01:00
Zebediah Figura
aef2e01772
include: Move interlocked functions to winnt.h.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-18 22:46:37 +01:00
Martin Storsjo
8c7014eb23
include: Fix the signature of _InterlockedCompareExchange128.
...
Clang 12 doesn't consider a function with an inconsistent signature
as matching the intrinsic.
This fixes InterlockedCompareExchange128 with clang 12 in MSVC mode.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-21 11:57:03 +01:00
Alexandre Julliard
c6f2ef3d1c
include: Move XSTATE definitions to winnt.h.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-24 16:59:26 +01:00
Myah Caron
3c8832711e
include: Introduce MEM_EXTENDED_PARAMETER.
...
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 20:33:21 +01:00
Kevin Puetz
d45b3d4fdd
include: Fix undefined char16_t in C11.
...
In c++11 char16_t is a distinct fundamental type,
but in c11 it is merely a typedef in <uchar.h>.
Explicitly mention char16_t only in c++11 (where it is built-in),
otherwise define WCHAR as unsigned short (without naming char16_t)
and just hope that on C11 this matches u"..."
Remove WINE_UNICODE_CHAR16; it is now the default when supported.
Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-30 17:21:07 +02:00
Vijay Kiran Kamuju
e5d7802729
include: Remove duplicated defines in winnt.h.
...
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:23:05 +02:00
Michael Müller
8c5638aa5e
ntdll: Implement NtFilterToken.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-23 15:58:10 +02:00
Martin Storsjo
5b3842451b
include: Update ARM64 context flag definitions to match current SDKs.
...
CONTEXT_FLOATING_POINT should be included in CONTEXT_FULL, and
there's a new flag CONTEXT_ARM64_X18 (not available without
the arch specific prefix) that only is part of CONTEXT_ALL.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 15:01:56 +02:00
Paul Gofman
22f4b6fcf5
include: Define extended context structures.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:49:44 +02:00
Paul Gofman
de1cb029f6
include: Define _XSAVE_FORMAT structure.
...
The structure is defined for both x86_64 and i386 (along with
M128A) in (newer) Windows SDK.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:49:38 +02:00
Paul Gofman
525e7078a8
ntdll: Report newer vector processor features on x86 / x64.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 10:15:45 +02:00
Jacek Caban
b59bf31f61
ntdll: Move InterlockedCompareExchange128 support to winnt.h.
...
Also properly declare intrinsic on msvc.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-04 20:22:38 +02:00
André Hentschel
bd36f9f91d
include: Define PCONTEXT for all architectures.
...
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 18:37:55 +02:00
Jacek Caban
2618162e89
winnt.h: Add BitScanForward and BitScanReverse implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Martin Storsjo
babbf352b6
ntdll: Fix unwinding functions that end with a branch instruction.
...
This happens with functions that aren't intended to return e.g. like
_Unwind_Resume. In these cases, the return address is outside of the
function (the first instruction in the next function).
Set the flag CONTEXT_UNWOUND_TO_CALL after unwinding to a callsite,
and if this flag is set, look up a RUNTIME_FUNCTION based on
Control.Pc - 4.
This isn't a complete (nor probably entirely correct) implementation
of the flag CONTEXT_UNWOUND_TO_CALL, but it practically seems to
work fine and fixes a large number of unwinding cases.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Jacek Caban
6a05b84eca
winnt.h: Provide inline NtCurrentTeb implementation for mingw arm builds.
...
Based on mingw-w64.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 20:50:40 +02:00
Alex Henrie
e3d2d852a4
include: Add more RTL functions.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-26 10:10:15 +02:00
Paul Gofman
2716e215df
ntoskrnl.exe: Add KeQueryActiveProcessorCountEx() function.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 20:20:02 +02:00
Alexandre Julliard
ab350866e4
ntdll: Add some more CPU feature flags.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-21 17:06:04 +02:00
Jacek Caban
5ab64243da
include: Add winapifamily.h file.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-20 20:14:31 +02:00
Jacek Caban
6cad7dd2a7
winnt.h: Add ARRAYSIZE macro.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 15:07:26 +02:00
Jacek Caban
0a09fdfa1f
include: Introduce WINE_USE_LONG macro.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 17:33:56 +02:00
Alexandre Julliard
a4c6ad6b1f
include: Get rid of BITFIELDS_BIGENDIAN.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-30 12:37:27 +02:00
Jacek Caban
b1aba79b8b
winnt.h: Use the same C_ASSERT version on all compilers.
...
It works on MSCV as well.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 20:20:28 +02:00
Jacek Caban
6ba6aac5a3
winnt.h: Add __readgsqword declaration.
...
pragma intrinsic is meant only as an addition to C declaration.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-15 22:53:48 +02:00