mirror of
				https://github.com/jart/cosmopolitan.git
				synced 2025-10-26 19:16:41 +00:00 
			
		
		
		
	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:
		
							parent
							
								
									96f979dfc5
								
							
						
					
					
						commit
						fa20edc44d
					
				
					 3057 changed files with 410 additions and 4398 deletions
				
			
		
							
								
								
									
										1
									
								
								third_party/dlmalloc/binmaps.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/binmaps.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* ------------------------ Operations on bin maps ----------------------- */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/chunks.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/chunks.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* ------------------- Chunks sizes and alignments ----------------------- */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/debugging.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/debugging.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* -------------------------- Debugging setup ---------------------------- */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/debuglib.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/debuglib.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| #if DEBUG
 | ||||
| /* ------------------------- Debugging Support --------------------------- */ | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/directmap.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/directmap.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* -----------------------  Direct-mmapping chunks ----------------------- */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/dlmalloc.c
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/dlmalloc.c
									
										
									
									
										vendored
									
									
								
							|  | @ -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 | ||||
|  |  | |||
							
								
								
									
										2
									
								
								third_party/dlmalloc/dlmalloc.h
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								third_party/dlmalloc/dlmalloc.h
									
										
									
									
										vendored
									
									
								
							|  | @ -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_ */ | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/global.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/global.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* ------------- Global malloc_state and malloc_params ------------------- */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/headfoot.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/headfoot.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* ------------------ Operations on head and foot fields ----------------- */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/hooks.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/hooks.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* -------------------------------  Hooks -------------------------------- */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/indexing.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/indexing.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* ---------------------------- Indexing Bins ---------------------------- */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/init.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/init.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* ---------------------------- setting mparams -------------------------- */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/locks.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/locks.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* --------------------------- Lock preliminaries ------------------------ */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/management.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/management.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* -------------------------- mspace management -------------------------- */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/mspaces.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/mspaces.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -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)); | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/platform.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/platform.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| #define LACKS_UNISTD_H
 | ||||
| #define LACKS_FCNTL_H
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/runtimechecks.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/runtimechecks.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* ----------------------- Runtime Check Support ------------------------- */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/smallbins.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/smallbins.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* ----------------------- Operations on smallbins ----------------------- */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/statistics.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/statistics.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* ----------------------------- statistics ------------------------------ */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/system.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/system.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* -------------------------- system alloc setup ------------------------- */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								third_party/dlmalloc/trees.inc
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								third_party/dlmalloc/trees.inc
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,3 @@ | |||
| // clang-format off
 | ||||
| 
 | ||||
| /* ------------------------- Operations on trees ------------------------- */ | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										2
									
								
								third_party/dlmalloc/vespene.internal.h
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								third_party/dlmalloc/vespene.internal.h
									
										
									
									
										vendored
									
									
								
							|  | @ -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_ */ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue