mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58: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
|
@ -81,14 +81,11 @@ textwindows void __sig_delete(int sig) {
|
|||
struct Dll *e;
|
||||
atomic_fetch_and_explicit(&__sig.pending, ~(1ull << (sig - 1)),
|
||||
memory_order_relaxed);
|
||||
BLOCK_SIGNALS;
|
||||
_pthread_lock();
|
||||
for (e = dll_last(_pthread_list); e; e = dll_prev(_pthread_list, e)) {
|
||||
for (e = dll_last(_pthread_list); e; e = dll_prev(_pthread_list, e))
|
||||
atomic_fetch_and_explicit(&POSIXTHREAD_CONTAINER(e)->tib->tib_sigpending,
|
||||
~(1ull << (sig - 1)), memory_order_relaxed);
|
||||
}
|
||||
_pthread_unlock();
|
||||
ALLOW_SIGNALS;
|
||||
}
|
||||
|
||||
static textwindows int __sig_getter(atomic_ulong *sigs, sigset_t masked) {
|
||||
|
@ -559,7 +556,7 @@ void __stack_call(struct NtExceptionPointers *, int, int, struct CosmoTib *,
|
|||
__msabi dontinstrument unsigned __sig_crash(struct NtExceptionPointers *ep) {
|
||||
|
||||
// translate win32 to unix si_signo and si_code
|
||||
int code, sig = __sig_crash_sig(ep, &code);
|
||||
int code, sig = __sig_crash_sig(ep->ExceptionRecord->ExceptionCode, &code);
|
||||
|
||||
// advance the instruction pointer to skip over debugger breakpoints
|
||||
// this behavior is consistent with how unix kernels are implemented
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue