Commit graph

2418 commits

Author SHA1 Message Date
Justine Tunney
5dd7ddb9ea
Remove bad defines from early days of project
These definitions were causing issues with building LLVM. It is possible
they also caused crashes we've seen with our MacOS ARM64 OpenMP support.
2024-07-24 12:11:21 -07:00
Justine Tunney
f25fbbaaeb
Use libcxx abi v1 2024-07-24 09:49:48 -07:00
Justine Tunney
fbc4b03d4c
Restore support for AMD K8 2024-07-24 08:59:29 -07:00
Justine Tunney
e398f3887c
Make more improvements to threads and mappings
- NetBSD should now have faster synchronization
- POSIX barriers may now be shared across processes
- An edge case with memory map tracking has been fixed
- Grand Central Dispatch is no longer used on MacOS ARM64
- POSIX mutexes in normal mode now use futexes across processes
2024-07-24 01:19:54 -07:00
Justine Tunney
2187d6d2dd
Fix MODE=optlinux for GitHub Actions 2024-07-23 04:17:22 -07:00
Justine Tunney
0602ff6bab
Fix MODE=optlinux and MODE=tiny builds 2024-07-23 04:04:19 -07:00
Justine Tunney
5660ec4741
Release Cosmopolitan v3.6.0
This release is an atomic upgrade to GCC 14.1.0 with C23 and C++23
2024-07-23 03:28:19 -07:00
Justine Tunney
62ace3623a
Release Cosmopolitan v3.5.9 2024-07-22 21:02:40 -07:00
Justine Tunney
6e809ee49b
Add unit test for process shared conditions 2024-07-22 18:48:54 -07:00
Justine Tunney
61c36c1dd6
Allow pthread_condattr_setpshared() to set shared 2024-07-22 18:41:45 -07:00
Justine Tunney
0a9a6f86bb
Support process shared condition variables 2024-07-22 16:35:29 -07:00
Justine Tunney
3de6632be6
Graduate some clock_gettime() constants to #define
- CLOCK_THREAD_CPUTIME_ID
- CLOCK_PROCESS_CPUTIME_ID

Cosmo now supports the above constants universally across supported OSes
therefore it's now safe to let programs detect their presence w/ #ifdefs
2024-07-22 07:14:35 -07:00
Justine Tunney
c83ec5fdd9
Fix more issues 2024-07-22 02:28:41 -07:00
Justine Tunney
23611cd854
Talk more about alignment 2024-07-22 02:11:09 -07:00
Justine Tunney
62a97c919f
Fix typos in APE specification
Fixes #1244
2024-07-22 01:41:44 -07:00
Justine Tunney
16d244614e
Mention red zone in APE ABI specification 2024-07-21 21:18:12 -07:00
Justine Tunney
41cc053419
Add more content to APE specification 2024-07-21 20:47:24 -07:00
Justine Tunney
5d2d9e9640
Add back missing TlsAlloc() call
Cosmopolitan Libc once called this important function although somewhere
along the way, possibly in a refactoring, it got removed and __tls_alloc
has always been zero ever since.
2024-07-21 20:45:27 -07:00
Justine Tunney
e08a4cd99e
Release Cosmopolitan v3.5.8 2024-07-21 17:01:33 -07:00
Justine Tunney
7ebaff34c6
Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
Justine Tunney
e7be5a5e2b
Upgrade to latest superconfigure 2024-07-21 15:30:47 -07:00
Justine Tunney
30afd6ddbb
Improve multithreading 2024-07-21 14:40:45 -07:00
Justine Tunney
d3167126aa
Fix regression with last commit 2024-07-20 16:43:48 -07:00
Justine Tunney
d3f87f4c64
Upgrade to cosmocc v3.5.7 2024-07-20 11:21:26 -07:00
Justine Tunney
29ce25c767
Start writing formal specification for APE 2024-07-20 10:04:22 -07:00
Justine Tunney
7996bf67b5
Release Cosmopolitan v3.5.7 2024-07-20 03:48:57 -07:00
Justine Tunney
626a5d02ee
Add missing lock statement 2024-07-20 03:47:22 -07:00
Justine Tunney
527aaa41eb
Prevent MODE=tiny ShowCrashReports() looping 2024-07-20 03:34:37 -07:00
Justine Tunney
421a819d88
Fix bug in munmap_test 2024-07-20 03:23:37 -07:00
Justine Tunney
3374cbba73
Release Cosmopolitan v3.5.6 2024-07-20 02:43:10 -07:00
Justine Tunney
2018cac11f
Use better memory strategy on Windows
Rather than using the the rollo global to pick addresses, we select them
randomly now using a conservative vaspace.
2024-07-20 02:20:03 -07:00
Justine Tunney
6a5d4ed65b
Fix bug with disabling sigaltstack() 2024-07-20 01:00:16 -07:00
Justine Tunney
493ffc9b7f
Release Cosmopolitan v3.5.5 2024-07-19 22:33:17 -07:00
Justine Tunney
101fb3d9b3
Make some new Windows 10 memory APIs available 2024-07-19 22:26:49 -07:00
Justine Tunney
f6ba270ff3
Add last commit to .git-blame-ignore-revs 2024-07-19 19:38:53 -07:00
Justine Tunney
86d884cce2
Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
Justine Tunney
0ed916ad5c
Fix a bug in example code 2024-07-19 19:11:28 -07:00
Justine Tunney
1029dcc597
Reduce default stack size from 256kb to 81kb
This is the same as Musl Libc. Please note it only applies to threads.
2024-07-19 14:18:06 -07:00
Ikko Eltociear Ashimine
c697133a2d
Fix typo in accept4-sysv.c (#1235) 2024-07-19 05:46:29 -07:00
Justine Tunney
1ff037df3c
Add some documentation 2024-07-19 04:46:26 -07:00
Justine Tunney
567d8fe32d
Create variables for page size 2024-07-18 21:16:53 -07:00
Justine Tunney
23dfb79d33
Fix minor suboptimalities in memory manager 2024-07-18 19:19:51 -07:00
Justine Tunney
76cea6c687
Squeeze more performance out of memory manager 2024-07-08 03:08:42 -07:00
Justine Tunney
63065cdd70
Make a test less intensive by default 2024-07-07 19:35:09 -07:00
Justine Tunney
3f2a1b696e
Fix greenbean example
The memory leak detector was crashing. When using gc() you shouldn't use
the CheckForMemoryLeaks() function from inside the same function, due to
how it runs the atexit handlers.
2024-07-07 17:52:33 -07:00
Justine Tunney
f590e96abd
Work around QEMU bugs 2024-07-07 15:42:46 -07:00
Justine Tunney
f7780de24b
Make realloc() go 100x faster on Linux/NetBSD
Cosmopolitan now supports mremap(), which is only supported on Linux and
NetBSD. First, it allows memory mappings to be relocated without copying
them; this can dramatically speed up data structures like std::vector if
the array size grows larger than 256kb. The mremap() system call is also
10x faster than munmap() when shrinking large memory mappings.

There's now two functions, getpagesize() and getgransize() which help to
write portable code that uses mmap(MAP_FIXED). Alternative sysconf() may
be called with our new _SC_GRANSIZE. The madvise() system call now has a
better wrapper with improved documentation.
2024-07-07 12:40:30 -07:00
Justine Tunney
196942084b
Recomment out accidental code 2024-07-06 19:57:47 -07:00
Justine Tunney
6be030cd7c
Fix MODE=tinylinux build 2024-07-06 01:51:08 -07:00
Justine Tunney
8c645fa1ee
Make mmap() scalable
It's now possible to create thousands of thousands of sparse independent
memory mappings, without any slowdown. The memory manager is better with
tracking memory protection now, particularly on Windows in a precise way
that can be restored during fork(). You now have the highest quality mem
manager possible. It's even better than some OSes like XNU, where mmap()
is implemented as an O(n) operation which means sadly things aren't much
improved over there. With this change the llamafile HTTP server endpoint
at /tokenize with a prompt of 50 tokens is now able to handle 2.6m r/sec
2024-07-05 23:26:00 -07:00