Commit 03ba3a3
committed
Replace
This avoid a dependency on pthread API (which are used to implement
call_once under the hood) which makes libc++ much more usable from
Wasm Workers (there pthreads are not available).
The downside here is that when thread race to be first one to use a
given facet we would "leak" an ID which could cause the `facets_` vector
to become more spare that it otherwise would be.
IIUC this `facets_` vector can already be sparse so it not clear to
me what impact this would have in practice.
We could make this change only for the Wasm Workers build of libc++
but I'd like to get as much test coverage of it as I can.
See: #26375call_once usage in libc++ with atomics1 parent 3051725 commit 03ba3a3
File tree
4 files changed
+22
-1
lines changed- system/lib/libcxx
- include
- src
- test
- codesize
4 files changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
149 | 150 | | |
| 151 | + | |
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
592 | 608 | | |
| 609 | + | |
593 | 610 | | |
594 | 611 | | |
595 | 612 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13537 | 13537 | | |
13538 | 13538 | | |
13539 | 13539 | | |
| 13540 | + | |
| 13541 | + | |
| 13542 | + | |
13540 | 13543 | | |
13541 | 13544 | | |
13542 | 13545 | | |
| |||
0 commit comments