mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 19:58:30 +00:00
Make improvements to locking
This change makes pthread_mutex_lock() as fast as _spinlock() by default. Thread instability issues on NetBSD have been resolved. Improvements made to gdtoa thread code. Crash reporting will now synchronize between threads in a slightly better way.
This commit is contained in:
parent
25041b8026
commit
d5312b60f7
60 changed files with 890 additions and 629 deletions
7
third_party/gdtoa/strtoId.c
vendored
7
third_party/gdtoa/strtoId.c
vendored
|
@ -39,14 +39,15 @@ strtoId(const char *s, char **sp, double *f0, double *f1)
|
|||
Long exp[2];
|
||||
Bigint *B[2];
|
||||
int k, rv[2];
|
||||
B[0] = __gdtoa_Balloc(1);
|
||||
ThInfo *TI = 0;
|
||||
B[0] = __gdtoa_Balloc(1, &TI);
|
||||
B[0]->wds = 2;
|
||||
k = __gdtoa_strtoIg(s, sp, &fpi, exp, B, rv);
|
||||
__gdtoa_ULtod((ULong*)f0, B[0]->x, exp[0], rv[0]);
|
||||
__gdtoa_Bfree(B[0]);
|
||||
__gdtoa_Bfree(B[0], &TI);
|
||||
if (B[1]) {
|
||||
__gdtoa_ULtod((ULong*)f1, B[1]->x, exp[1], rv[1]);
|
||||
__gdtoa_Bfree(B[1]);
|
||||
__gdtoa_Bfree(B[1], &TI);
|
||||
}
|
||||
else {
|
||||
((ULong*)f1)[0] = ((ULong*)f0)[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue