File tree Expand file tree Collapse file tree 1 file changed +2
-21
lines changed Expand file tree Collapse file tree 1 file changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -911,18 +911,9 @@ const WasiThreadImpl = struct {
911
911
allocator .free (self .thread .memory );
912
912
}
913
913
914
- var spin : u8 = 10 ;
915
914
while (true ) {
916
915
const tid = self .thread .tid .load (.seq_cst );
917
- if (tid == 0 ) {
918
- break ;
919
- }
920
-
921
- if (spin > 0 ) {
922
- spin -= 1 ;
923
- std .atomic .spinLoopHint ();
924
- continue ;
925
- }
916
+ if (tid == 0 ) break ;
926
917
927
918
const result = asm (
928
919
\\ local.get %[ptr]
@@ -1514,18 +1505,9 @@ const LinuxThreadImpl = struct {
1514
1505
fn join (self : Impl ) void {
1515
1506
defer posix .munmap (self .thread .mapped );
1516
1507
1517
- var spin : u8 = 10 ;
1518
1508
while (true ) {
1519
1509
const tid = self .thread .child_tid .load (.seq_cst );
1520
- if (tid == 0 ) {
1521
- break ;
1522
- }
1523
-
1524
- if (spin > 0 ) {
1525
- spin -= 1 ;
1526
- std .atomic .spinLoopHint ();
1527
- continue ;
1528
- }
1510
+ if (tid == 0 ) break ;
1529
1511
1530
1512
switch (linux .E .init (linux .futex_4arg (
1531
1513
& self .thread .child_tid .raw ,
@@ -1616,7 +1598,6 @@ test "setName, getName" {
1616
1598
}
1617
1599
1618
1600
test {
1619
- // Doesn't use testing.refAllDecls() since that would pull in the compileError spinLoopHint.
1620
1601
_ = Futex ;
1621
1602
_ = ResetEvent ;
1622
1603
_ = Mutex ;
You can’t perform that action at this time.
0 commit comments