Reduce header complexity

- Remove most __ASSEMBLER__ __LINKER__ ifdefs
- Rename libc/intrin/bits.h to libc/serialize.h
- Block pthread cancelation in fchmodat() polyfill
- Remove `clang-format off` statements in third_party
This commit is contained in:
Justine Tunney 2023-11-28 14:24:28 -08:00
parent 96f979dfc5
commit fa20edc44d
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
3057 changed files with 410 additions and 4398 deletions

View file

@ -1,4 +1,3 @@
// clang-format off
/* ------------------------ Operations on bin maps ----------------------- */

View file

@ -1,4 +1,3 @@
// clang-format off
/* ------------------- Chunks sizes and alignments ----------------------- */

View file

@ -1,4 +1,3 @@
// clang-format off
/* -------------------------- Debugging setup ---------------------------- */

View file

@ -1,4 +1,3 @@
// clang-format off
#if DEBUG
/* ------------------------- Debugging Support --------------------------- */

View file

@ -1,4 +1,3 @@
// clang-format off
/* ----------------------- Direct-mmapping chunks ----------------------- */

View file

@ -24,7 +24,6 @@
#include "libc/thread/tls.h"
#include "third_party/dlmalloc/vespene.internal.h"
#include "third_party/nsync/mu.h"
// clang-format off
#define FOOTERS 0
#define MSPACES 0

View file

@ -25,7 +25,6 @@
#define dlrealloc_in_place __dlrealloc_in_place
#define dlrealloc_in_place __dlrealloc_in_place
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*
@ -510,5 +509,4 @@ void dlmalloc_atfork(void);
void dlmalloc_abort(void) relegated wontreturn;
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_DLMALLOC_DLMALLOC_H_ */

View file

@ -1,4 +1,3 @@
// clang-format off
/* ------------- Global malloc_state and malloc_params ------------------- */

View file

@ -1,4 +1,3 @@
// clang-format off
/* ------------------ Operations on head and foot fields ----------------- */

View file

@ -1,4 +1,3 @@
// clang-format off
/* ------------------------------- Hooks -------------------------------- */

View file

@ -1,4 +1,3 @@
// clang-format off
/* ---------------------------- Indexing Bins ---------------------------- */

View file

@ -1,4 +1,3 @@
// clang-format off
/* ---------------------------- setting mparams -------------------------- */

View file

@ -1,4 +1,3 @@
// clang-format off
/* --------------------------- Lock preliminaries ------------------------ */

View file

@ -1,4 +1,3 @@
// clang-format off
/* -------------------------- mspace management -------------------------- */

View file

@ -1,5 +1,4 @@
#include "third_party/dlmalloc/dlmalloc.h"
// clang-format off
static mstate init_user_mstate(char* tbase, size_t tsize) {
size_t msize = pad_request(sizeof(struct malloc_state));

View file

@ -1,4 +1,3 @@
// clang-format off
#define LACKS_UNISTD_H
#define LACKS_FCNTL_H

View file

@ -1,4 +1,3 @@
// clang-format off
/* ----------------------- Runtime Check Support ------------------------- */

View file

@ -1,4 +1,3 @@
// clang-format off
/* ----------------------- Operations on smallbins ----------------------- */

View file

@ -1,4 +1,3 @@
// clang-format off
/* ----------------------------- statistics ------------------------------ */

View file

@ -1,4 +1,3 @@
// clang-format off
/* -------------------------- system alloc setup ------------------------- */

View file

@ -1,4 +1,3 @@
// clang-format off
/* ------------------------- Operations on trees ------------------------- */

View file

@ -1,10 +1,8 @@
#ifndef COSMOPOLITAN_THIRD_PARTY_DLMALLOC_VESPENE_INTERNAL_H_
#define COSMOPOLITAN_THIRD_PARTY_DLMALLOC_VESPENE_INTERNAL_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
void *dlmalloc_requires_more_vespene_gas(size_t);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_DLMALLOC_VESPENE_INTERNAL_H_ */