mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Fix POSIX advisory locks on Windows
This commit is contained in:
parent
050062bcbb
commit
a5fa90a21f
14 changed files with 472 additions and 39 deletions
|
@ -2,11 +2,11 @@
|
|||
.imp kernel32,__imp_LockFileEx,LockFileEx,0
|
||||
|
||||
.text.windows
|
||||
LockFileEx:
|
||||
__LockFileEx:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_LockFileEx(%rip),%rax
|
||||
jmp __sysv2nt6
|
||||
.endfn LockFileEx,globl
|
||||
.endfn __LockFileEx,globl
|
||||
.previous
|
||||
|
|
|
@ -1,2 +1,15 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp kernel32,__imp_SuspendThread,SuspendThread,0
|
||||
|
||||
.text.windows
|
||||
SuspendThread:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_SuspendThread(%rip)
|
||||
leave
|
||||
ret
|
||||
.endfn SuspendThread,globl
|
||||
.previous
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
.imp kernel32,__imp_UnlockFileEx,UnlockFileEx,0
|
||||
|
||||
.text.windows
|
||||
UnlockFileEx:
|
||||
__UnlockFileEx:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_UnlockFileEx(%rip),%rax
|
||||
jmp __sysv2nt6
|
||||
.endfn UnlockFileEx,globl
|
||||
.endfn __UnlockFileEx,globl
|
||||
.previous
|
||||
|
|
|
@ -700,7 +700,6 @@ imp 'LocalUnlock' LocalUnlock kernel32 0
|
|||
imp 'LocaleNameToLCID' LocaleNameToLCID kernel32 0
|
||||
imp 'LocateXStateFeature' LocateXStateFeature kernel32 0
|
||||
imp 'LockFile' LockFile kernel32 0 5
|
||||
imp 'LockFileEx' LockFileEx kernel32 0 6
|
||||
imp 'LockResource' LockResource kernel32 0 1
|
||||
imp 'MapUserPhysicalPages' MapUserPhysicalPages kernel32 0
|
||||
imp 'MapUserPhysicalPagesScatter' MapUserPhysicalPagesScatter kernel32 986
|
||||
|
@ -983,7 +982,7 @@ imp 'SleepConditionVariableSRW' SleepConditionVariableSRW kernel32 0
|
|||
imp 'SleepEx' SleepEx kernel32 0 2
|
||||
imp 'SortCloseHandle' SortCloseHandle kernel32 1416
|
||||
imp 'SortGetHandle' SortGetHandle kernel32 1417
|
||||
imp 'SuspendThread' SuspendThread kernel32 0
|
||||
imp 'SuspendThread' SuspendThread kernel32 0 1
|
||||
imp 'SwitchToFiber' SwitchToFiber kernel32 0
|
||||
imp 'SwitchToThread' SwitchToThread kernel32 0
|
||||
imp 'SystemTimeToFileTime' SystemTimeToFileTime kernel32 0 2
|
||||
|
@ -1024,7 +1023,6 @@ imp 'UTUnRegister' UTUnRegister kernel32 1459
|
|||
imp 'UmsThreadYield' UmsThreadYield kernel32 1460
|
||||
imp 'UnhandledExceptionFilter' UnhandledExceptionFilter kernel32 0
|
||||
imp 'UnlockFile' UnlockFile kernel32 0 5
|
||||
imp 'UnlockFileEx' UnlockFileEx kernel32 0 5
|
||||
imp 'UnmapViewOfFile2' UnmapViewOfFile2 kernel32 0 2
|
||||
imp 'UnmapViewOfFileEx' UnmapViewOfFileEx kernel32 0 3
|
||||
imp 'UnregisterApplicationRecoveryCallback' UnregisterApplicationRecoveryCallback kernel32 1466
|
||||
|
@ -1120,6 +1118,7 @@ imp '__FlushViewOfFile' FlushViewOfFile kernel32 0 2
|
|||
imp '__GenerateConsoleCtrlEvent' GenerateConsoleCtrlEvent kernel32 0 2
|
||||
imp '__GetExitCodeProcess' GetExitCodeProcess kernel32 0 2
|
||||
imp '__GetFileAttributes' GetFileAttributesW kernel32 0 1
|
||||
imp '__LockFileEx' LockFileEx kernel32 0 6
|
||||
imp '__MapViewOfFileEx' MapViewOfFileEx kernel32 0 6
|
||||
imp '__MapViewOfFileExNuma' MapViewOfFileExNuma kernel32 0 7
|
||||
imp '__MoveFileEx' MoveFileExW kernel32 0 3
|
||||
|
@ -1128,6 +1127,7 @@ imp '__ReOpenFile' ReOpenFile kernel32 0 4 # TODO(jart): 6.2 and highe
|
|||
imp '__RemoveDirectory' RemoveDirectoryW kernel32 0 1
|
||||
imp '__SetCurrentDirectory' SetCurrentDirectoryW kernel32 0 1
|
||||
imp '__TerminateProcess' TerminateProcess kernel32 0 2
|
||||
imp '__UnlockFileEx' UnlockFileEx kernel32 0 5
|
||||
imp '__UnmapViewOfFile' UnmapViewOfFile kernel32 0 1
|
||||
imp '__VirtualProtect' VirtualProtect kernel32 0 4
|
||||
imp '__WaitForMultipleObjects' WaitForMultipleObjects kernel32 0 4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue