File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -402,8 +402,8 @@ arises in the fact that our Linux-flavored GCC and Clang toolchains
402
402
producing TLS instructions that use the %fs convention.
403
403
404
404
To solve these challenges, the ` cosmocc ` compiler will rewrite binary
405
- objects after they've been compiled by GCC, so that ` %gs ` register is
406
- used, rather than ` %fs ` . Morphing x86-64 binaries after they've been
405
+ objects after they've been compiled by GCC, so that the ` %gs ` register
406
+ is used, rather than ` %fs ` . Morphing x86-64 binaries after they've been
407
407
compiled is normally difficult, due to the complexity of the machine
408
408
instruction language. However GCC provides ` -mno-tls-direct-seg-refs `
409
409
which greatly reduces the complexity of this task. This flag forgoes
Original file line number Diff line number Diff line change 24
24
* Thunks free() if it's linked, otherwise do nothing.
25
25
*/
26
26
void _weakfree (void * p ) {
27
- if (_weaken (free )) {
27
+ if (_weaken (free ))
28
28
_weaken (free )(p );
29
- }
30
29
}
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ extern const int CLOCK_UPTIME_PRECISE;
24
24
25
25
COSMOPOLITAN_C_END_
26
26
27
- #define CLOCK_REALTIME 0
28
- #define CLOCK_MONOTONIC CLOCK_MONOTONIC
27
+ #define CLOCK_REALTIME 0
28
+ #define CLOCK_MONOTONIC CLOCK_MONOTONIC
29
+ #define CLOCK_PROCESS_CPUTIME_ID CLOCK_PROCESS_CPUTIME_ID
30
+ #define CLOCK_THREAD_CPUTIME_ID CLOCK_THREAD_CPUTIME_ID
29
31
30
32
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_CLOCK_H_ */
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ void _pthread_decimate(bool annihilation_only) {
118
118
if (status != kPosixThreadZombie )
119
119
break ; // zombies only exist at the end of the linked list
120
120
if (atomic_load_explicit (& pt -> tib -> tib_tid , memory_order_acquire ))
121
- continue ; // undead thread should that'll stop existing soon
121
+ continue ; // undead thread that should stop existing soon
122
122
dll_remove (& _pthread_list , e );
123
123
dll_make_first (& list , e );
124
124
}
You can’t perform that action at this time.
0 commit comments