Commit Graph

505 Commits

Author SHA1 Message Date
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
Dmitry Timoshkov 12584f6952 include/winnt.h: Update ACE types list.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-08 12:36:13 +02:00
Gabriel Ivăncescu caff74f369 include/winnt: Add more ACTCTX_COMPATIBILITY_ELEMENT_TYPE definitions and fix typo.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 13:18:02 +01:00
Vijay Kiran Kamuju 739b975b1e include: Fix QUOTA_LIMITS_EX in winnt.h.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 13:20:25 +01:00
Vijay Kiran Kamuju c921f9724a include: Add some missing defines in winnt.h.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 13:20:25 +01:00
Kevin Puetz c2679945dd include: Introduce WINE_UNICODE_CHAR16 that allows using char16_t as Windows WCHAR.
This is useful for winelib applications that don't use -fshort-wchar.
They may use u"" for string literals and u16string. However, C++ has
builtin char16_t type, so we need WCHAR to be compatible with that.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 08:51:19 +01:00
Rémi Bernon e9ec889dbf include: Add DBG_REPLY_LATER NTSTATUS code.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:49:05 +01:00
Zebediah Figura 9f8935d823 include: Add more NTSTATUS codes.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-14 20:01:17 +01:00
Vijay Kiran Kamuju 0f23cf61da include: Add missing defines for tokens in winnt.h.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-12 23:17:05 +01:00
Jacek Caban 7ceca21835 winnt.h: Add missing NTSYSAPI attributes.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Alexandre Julliard bf03953942 kernelbase: Implement GetSystemWow64Directory2().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 22:05:58 +01:00
Alistair Leslie-Hughes 2ef00173e1 include: Add COM_DECLSPEC_NOTHROW define.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-18 18:05:32 +02:00
Alex Henrie 4407fb7ada include: Add Tag field to SYSTEM_BATTERY_STATE.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-25 20:10:55 +02:00
Jacek Caban 8bbdfbceed include: Add threadpoolapiset.h file.
Based on patch by Hans Leidekker.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-25 16:30:41 +02:00
Chip Davis 6e10f8fad3 include: Pick up the ms_hook_prologue attribute for Clang, too.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 22:07:53 +02:00
Alexandre Julliard 14e34bedbf ntdll: Share dynamic exception table functions across platforms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 13:21:47 +02:00
Alexandre Julliard 44a6043388 ntdll: Move some exception definitions to winnt.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 13:17:37 +02:00
Chip Davis 49ffaddf9b kernel32: Forward power request functions to ntdll.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-01 19:12:03 +02:00