mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 18:28:30 +00:00
Reduce code size of mandatory runtime
This change reduces o/tiny/examples/life from 44kb to 24kb in size since it avoids linking mmap() when unnecessary. This is important, to helping cosmo not completely lose touch with its roots.
This commit is contained in:
parent
fdab49b30e
commit
15ea0524b3
17 changed files with 164 additions and 163 deletions
|
@ -40,9 +40,8 @@ int gettid(void) {
|
|||
int tid;
|
||||
if (VERY_LIKELY(__tls_enabled && !__vforked)) {
|
||||
tid = atomic_load_explicit(&__get_tls()->tib_tid, memory_order_acquire);
|
||||
if (VERY_LIKELY(tid > 0)) {
|
||||
if (VERY_LIKELY(tid > 0))
|
||||
return tid;
|
||||
}
|
||||
}
|
||||
if (IsXnuSilicon()) {
|
||||
return enosys(); // can only happen if we can't access thread local storage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue