mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 18:58:30 +00:00
Make improvements
- Make rand64() thread safe - Introduce lemur64 lcg prng - Improve strace on New Technology - Improve msync() on New Technology
This commit is contained in:
parent
43ba3009b2
commit
29bf8b1a30
73 changed files with 888 additions and 269 deletions
|
@ -1,2 +0,0 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp KernelBase,__imp_UnmapViewOfFile2,UnmapViewOfFile2,1696
|
|
@ -1,2 +0,0 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp KernelBase,__imp_UnmapViewOfFileEx,UnmapViewOfFileEx,1697
|
|
@ -2,7 +2,7 @@
|
|||
.imp kernel32,__imp_CloseHandle,CloseHandle,0
|
||||
|
||||
.text.windows
|
||||
CloseHandle:
|
||||
__CloseHandle:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
|
@ -11,5 +11,5 @@ CloseHandle:
|
|||
call *__imp_CloseHandle(%rip)
|
||||
leave
|
||||
ret
|
||||
.endfn CloseHandle,globl
|
||||
.endfn __CloseHandle,globl
|
||||
.previous
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
.imp kernel32,__imp_CreateNamedPipeW,CreateNamedPipeW,0
|
||||
|
||||
.text.windows
|
||||
CreateNamedPipe:
|
||||
__CreateNamedPipe:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_CreateNamedPipeW(%rip),%rax
|
||||
jmp __sysv2nt8
|
||||
.endfn CreateNamedPipe,globl
|
||||
.endfn __CreateNamedPipe,globl
|
||||
.previous
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
.imp kernel32,__imp_CreatePipe,CreatePipe,0
|
||||
|
||||
.text.windows
|
||||
CreatePipe:
|
||||
__CreatePipe:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_CreatePipe(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
.endfn CreatePipe,globl
|
||||
.endfn __CreatePipe,globl
|
||||
.previous
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
.imp kernel32,__imp_FlushFileBuffers,FlushFileBuffers,0
|
||||
|
||||
.text.windows
|
||||
FlushFileBuffers:
|
||||
__FlushFileBuffers:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
|
@ -11,5 +11,5 @@ FlushFileBuffers:
|
|||
call *__imp_FlushFileBuffers(%rip)
|
||||
leave
|
||||
ret
|
||||
.endfn FlushFileBuffers,globl
|
||||
.endfn __FlushFileBuffers,globl
|
||||
.previous
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
.imp kernel32,__imp_FlushViewOfFile,FlushViewOfFile,0
|
||||
|
||||
.text.windows
|
||||
FlushViewOfFile:
|
||||
__FlushViewOfFile:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_FlushViewOfFile(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
.endfn FlushViewOfFile,globl
|
||||
.endfn __FlushViewOfFile,globl
|
||||
.previous
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
.imp kernel32,__imp_UnmapViewOfFile,UnmapViewOfFile,0
|
||||
|
||||
.text.windows
|
||||
UnmapViewOfFile:
|
||||
__UnmapViewOfFile:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
|
@ -11,5 +11,5 @@ UnmapViewOfFile:
|
|||
call *__imp_UnmapViewOfFile(%rip)
|
||||
leave
|
||||
ret
|
||||
.endfn UnmapViewOfFile,globl
|
||||
.endfn __UnmapViewOfFile,globl
|
||||
.previous
|
||||
|
|
12
libc/nt/kernel32/UnmapViewOfFile2.s
Normal file
12
libc/nt/kernel32/UnmapViewOfFile2.s
Normal file
|
@ -0,0 +1,12 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp kernel32,__imp_UnmapViewOfFile2,UnmapViewOfFile2,0
|
||||
|
||||
.text.windows
|
||||
UnmapViewOfFile2:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_UnmapViewOfFile2(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
.endfn UnmapViewOfFile2,globl
|
||||
.previous
|
12
libc/nt/kernel32/UnmapViewOfFileEx.s
Normal file
12
libc/nt/kernel32/UnmapViewOfFileEx.s
Normal file
|
@ -0,0 +1,12 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp kernel32,__imp_UnmapViewOfFileEx,UnmapViewOfFileEx,0
|
||||
|
||||
.text.windows
|
||||
UnmapViewOfFileEx:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_UnmapViewOfFileEx(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
.endfn UnmapViewOfFileEx,globl
|
||||
.previous
|
|
@ -418,7 +418,7 @@ imp 'CloseEventLog' CloseEventLog advapi32 1102
|
|||
imp 'CloseFigure' CloseFigure gdi32 1045
|
||||
imp 'CloseGestureInfoHandle' CloseGestureInfoHandle user32 1589
|
||||
imp 'CloseGlobalizationUserSettingsKey' CloseGlobalizationUserSettingsKey KernelBase 133
|
||||
imp 'CloseHandle' CloseHandle kernel32 0 1 # KernelBase
|
||||
imp '__CloseHandle' CloseHandle kernel32 0 1 # KernelBase
|
||||
imp 'CloseMetaFile' CloseMetaFile gdi32 1046
|
||||
imp 'ClosePackageInfo' ClosePackageInfo kernel32 0 # KernelBase
|
||||
imp 'ClosePrivateNamespace' ClosePrivateNamespace kernel32 0 # KernelBase
|
||||
|
@ -624,7 +624,7 @@ imp 'CreateMutex' CreateMutexW kernel32 0 # KernelBase
|
|||
imp 'CreateMutexA' CreateMutexA kernel32 0 # KernelBase
|
||||
imp 'CreateMutexEx' CreateMutexExW kernel32 0 # KernelBase
|
||||
imp 'CreateMutexExA' CreateMutexExA kernel32 0 # KernelBase
|
||||
imp 'CreateNamedPipe' CreateNamedPipeW kernel32 0 8 # KernelBase
|
||||
imp '__CreateNamedPipe' CreateNamedPipeW kernel32 0 8 # KernelBase
|
||||
imp 'CreateNamedPipeA' CreateNamedPipeA kernel32 219 8
|
||||
imp 'CreateOPMProtectedOutput' CreateOPMProtectedOutput gdi32 1089
|
||||
imp 'CreateOPMProtectedOutputs' CreateOPMProtectedOutputs gdi32 1090
|
||||
|
@ -633,7 +633,7 @@ imp 'CreatePalmRejectionDelayZone' CreatePalmRejectionDelayZone user32 15
|
|||
imp 'CreatePatternBrush' CreatePatternBrush gdi32 1092
|
||||
imp 'CreatePen' CreatePen gdi32 1093
|
||||
imp 'CreatePenIndirect' CreatePenIndirect gdi32 1094
|
||||
imp 'CreatePipe' CreatePipe kernel32 0 4 # KernelBase
|
||||
imp '__CreatePipe' CreatePipe kernel32 0 4 # KernelBase
|
||||
imp 'CreatePolyPolygonRgn' CreatePolyPolygonRgn gdi32 1095
|
||||
imp 'CreatePolygonRgn' CreatePolygonRgn gdi32 1096
|
||||
imp 'CreatePopupMenu' CreatePopupMenu user32 1622 0
|
||||
|
@ -1677,11 +1677,11 @@ imp 'FlsGetValue' FlsGetValue kernel32 0 # KernelBase
|
|||
imp 'FlsSetValue' FlsSetValue kernel32 0 # KernelBase
|
||||
imp 'FlushConsoleInputBuffer' FlushConsoleInputBuffer kernel32 0 1 # KernelBase
|
||||
imp 'FlushEfsCache' FlushEfsCache advapi32 1303
|
||||
imp 'FlushFileBuffers' FlushFileBuffers kernel32 0 1 # KernelBase
|
||||
imp '__FlushFileBuffers' FlushFileBuffers kernel32 0 1 # KernelBase
|
||||
imp 'FlushInstructionCache' FlushInstructionCache kernel32 0 # KernelBase
|
||||
imp 'FlushTraceA' FlushTraceA advapi32 1304
|
||||
imp 'FlushTrace' FlushTraceW advapi32 1305
|
||||
imp 'FlushViewOfFile' FlushViewOfFile kernel32 0 2 # KernelBase
|
||||
imp '__FlushViewOfFile' FlushViewOfFile kernel32 0 2 # KernelBase
|
||||
imp 'FoldStringA' FoldStringA kernel32 424
|
||||
imp 'FoldString' FoldStringW kernel32 0 # KernelBase
|
||||
imp 'FontIsLinked' FontIsLinked gdi32 1484
|
||||
|
@ -6714,9 +6714,9 @@ imp 'UnlockFile' UnlockFile kernel32 0 5 # KernelBase
|
|||
imp 'UnlockFileEx' UnlockFileEx kernel32 0 5 # KernelBase
|
||||
imp 'UnlockServiceDatabase' UnlockServiceDatabase advapi32 1820
|
||||
imp 'UnlockWindowStation' UnlockWindowStation user32 2456
|
||||
imp 'UnmapViewOfFile' UnmapViewOfFile kernel32 0 1 # KernelBase
|
||||
imp 'UnmapViewOfFile2' UnmapViewOfFile2 KernelBase 1696
|
||||
imp 'UnmapViewOfFileEx' UnmapViewOfFileEx KernelBase 1697
|
||||
imp '__UnmapViewOfFile' UnmapViewOfFile kernel32 0 1 # KernelBase
|
||||
imp 'UnmapViewOfFile2' UnmapViewOfFile2 kernel32 0 2 # KernelBase
|
||||
imp 'UnmapViewOfFileEx' UnmapViewOfFileEx kernel32 0 3 # KernelBase
|
||||
imp 'UnpackDDElParam' UnpackDDElParam user32 2457
|
||||
imp 'UnrealizeObject' UnrealizeObject gdi32 1934
|
||||
imp 'UnregisterApplicationRecoveryCallback' UnregisterApplicationRecoveryCallback kernel32 1466
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#define CopyFile(...) __imp_CopyFileW(__VA_ARGS__)
|
||||
extern typeof(CopyFile) *const __imp_CopyFileW __msabi;
|
||||
|
||||
#define FlushFileBuffers(...) __imp_FlushFileBuffers(__VA_ARGS__)
|
||||
extern typeof(FlushFileBuffers) *const __imp_FlushFileBuffers __msabi;
|
||||
|
||||
#define GetFileType(...) __imp_GetFileType(__VA_ARGS__)
|
||||
extern typeof(GetFileType) *const __imp_GetFileType __msabi;
|
||||
|
|
|
@ -1,6 +1 @@
|
|||
#define FlushViewOfFile(...) __imp_FlushViewOfFile(__VA_ARGS__)
|
||||
#define UnmapViewOfFile(...) __imp_UnmapViewOfFile(__VA_ARGS__)
|
||||
|
||||
extern typeof(LocalFree) *const __imp_LocalFree __msabi;
|
||||
extern typeof(UnmapViewOfFile) *const __imp_UnmapViewOfFile __msabi;
|
||||
extern typeof(FlushViewOfFile) *const __imp_FlushViewOfFile __msabi;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue