mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-26 04:20:30 +00:00
Change support vector to Windows 8+
Doing this makes binaries tinier, since we don't need to have all the
extra code for supporting a 32-bit address space. It also benefits us
because we're able to use WIN32 futexes, which makes locking simpler.
b69f3d2488
is what officially ended our
Windows 7 support. This change is merely a formalization. You can use
old versions of Cosmo now and forevermore if you need Windows 7 since
our repository is hermetic and vendors all its dependencies.
Won't fix #617
This commit is contained in:
parent
6c90f830d9
commit
134ffee519
25 changed files with 296 additions and 167 deletions
12
libc/nt/API-MS-Win-Core-Synch-l1-2-0/WaitOnAddress.s
Normal file
12
libc/nt/API-MS-Win-Core-Synch-l1-2-0/WaitOnAddress.s
Normal file
|
@ -0,0 +1,12 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp API-MS-Win-Core-Synch-l1-2-0,__imp_WaitOnAddress,WaitOnAddress,111
|
||||
|
||||
.text.windows
|
||||
WaitOnAddress:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_WaitOnAddress(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
.endfn WaitOnAddress,globl
|
||||
.previous
|
15
libc/nt/API-MS-Win-Core-Synch-l1-2-0/WakeByAddressAll.s
Normal file
15
libc/nt/API-MS-Win-Core-Synch-l1-2-0/WakeByAddressAll.s
Normal file
|
@ -0,0 +1,15 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp API-MS-Win-Core-Synch-l1-2-0,__imp_WakeByAddressAll,WakeByAddressAll,113
|
||||
|
||||
.text.windows
|
||||
WakeByAddressAll:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_WakeByAddressAll(%rip)
|
||||
leave
|
||||
ret
|
||||
.endfn WakeByAddressAll,globl
|
||||
.previous
|
15
libc/nt/API-MS-Win-Core-Synch-l1-2-0/WakeByAddressSingle.s
Normal file
15
libc/nt/API-MS-Win-Core-Synch-l1-2-0/WakeByAddressSingle.s
Normal file
|
@ -0,0 +1,15 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp API-MS-Win-Core-Synch-l1-2-0,__imp_WakeByAddressSingle,WakeByAddressSingle,116
|
||||
|
||||
.text.windows
|
||||
WakeByAddressSingle:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_WakeByAddressSingle(%rip)
|
||||
leave
|
||||
ret
|
||||
.endfn WakeByAddressSingle,globl
|
||||
.previous
|
|
@ -992,7 +992,7 @@
|
|||
#define kNtErrorInvalidKeyboardHandle 1457
|
||||
#define kNtErrorHookTypeNotAllowed 1458
|
||||
#define kNtErrorRequiresInteractiveWindowstation 1459
|
||||
#define kNtErrorTimeout 1460
|
||||
#define kNtErrorTimeout 1460 /* ETIMEDOUT */
|
||||
#define kNtErrorInvalidMonitorHandle 1461
|
||||
#define kNtErrorIncorrectSize 1462
|
||||
#define kNtErrorSymlinkClassDisabled 1463
|
||||
|
|
|
@ -3554,6 +3554,13 @@ imp 'InetIsOffline' InetIsOffline url 106
|
|||
imp 'MIMEAssociationDialog' MIMEAssociationDialogW url 108
|
||||
imp 'MailToProtocolHandler' MailToProtocolHandler url 109
|
||||
|
||||
# API-MS-Win-Core-Synch-l1-2-0.dll (Windows 8+)
|
||||
#
|
||||
# Name Actual DLL Hint Arity
|
||||
imp 'WaitOnAddress' WaitOnAddress API-MS-Win-Core-Synch-l1-2-0 111 4
|
||||
imp 'WakeByAddressAll' WakeByAddressAll API-MS-Win-Core-Synch-l1-2-0 113 1
|
||||
imp 'WakeByAddressSingle' WakeByAddressSingle API-MS-Win-Core-Synch-l1-2-0 116 1
|
||||
|
||||
# NTDLL.DLL
|
||||
# BEYOND THE PALE
|
||||
#
|
||||
|
|
|
@ -167,6 +167,27 @@ $(LIBC_NT_URL_A).pkg: \
|
|||
|
||||
#───────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
LIBC_NT_ARTIFACTS += LIBC_NT_SYNCHRONIZATION_A
|
||||
LIBC_NT_SYNCHRONIZATION = $(LIBC_NT_SYNCHRONIZATION_A_DEPS) $(LIBC_NT_SYNCHRONIZATION_A)
|
||||
LIBC_NT_SYNCHRONIZATION_A = o/$(MODE)/libc/nt/synchronization.a
|
||||
LIBC_NT_SYNCHRONIZATION_A_SRCS := $(wildcard libc/nt/API-MS-Win-Core-Synch-l1-2-0/*.s)
|
||||
LIBC_NT_SYNCHRONIZATION_A_OBJS = $(LIBC_NT_SYNCHRONIZATION_A_SRCS:%.s=o/$(MODE)/%.o)
|
||||
LIBC_NT_SYNCHRONIZATION_A_CHECKS = $(LIBC_NT_SYNCHRONIZATION_A).pkg
|
||||
LIBC_NT_SYNCHRONIZATION_A_DIRECTDEPS = LIBC_NT_KERNEL32
|
||||
LIBC_NT_SYNCHRONIZATION_A_DEPS := \
|
||||
$(call uniq,$(foreach x,$(LIBC_NT_SYNCHRONIZATION_A_DIRECTDEPS),$($(x))))
|
||||
|
||||
$(LIBC_NT_SYNCHRONIZATION_A): \
|
||||
libc/nt/API-MS-Win-Core-Synch-l1-2-0/ \
|
||||
$(LIBC_NT_SYNCHRONIZATION_A).pkg \
|
||||
$(LIBC_NT_SYNCHRONIZATION_A_OBJS)
|
||||
|
||||
$(LIBC_NT_SYNCHRONIZATION_A).pkg: \
|
||||
$(LIBC_NT_SYNCHRONIZATION_A_OBJS) \
|
||||
$(foreach x,$(LIBC_NT_SYNCHRONIZATION_A_DIRECTDEPS),$($(x)_A).pkg)
|
||||
|
||||
#───────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
LIBC_NT_ARTIFACTS += LIBC_NT_USER32_A
|
||||
LIBC_NT_USER32 = $(LIBC_NT_USER32_A_DEPS) $(LIBC_NT_USER32_A)
|
||||
LIBC_NT_USER32_A = o/$(MODE)/libc/nt/user32.a
|
||||
|
|
|
@ -54,6 +54,11 @@ typedef void (*NtTimerapcroutine)(void *lpArgToCompletionRoutine,
|
|||
typedef void (*NtWaitOrTimerCallback)(void *lpParameter,
|
||||
bool32 TimerOrWaitFired);
|
||||
|
||||
void WakeByAddressAll(void *Address);
|
||||
void WakeByAddressSingle(void *Address);
|
||||
bool32 WaitOnAddress(volatile void *Address, void *CompareAddress,
|
||||
size_t AddressSize, uint32_t opt_dwMilliseconds);
|
||||
|
||||
void Sleep(uint32_t dwMilliseconds);
|
||||
uint32_t SleepEx(uint32_t dwMilliseconds, bool32 bAlertable);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue