This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -578,6 +578,10 @@ impl<'tcx> ThreadManager<'tcx> {
578
578
self . threads [ thread_id] . state . is_terminated ( )
579
579
}
580
580
581
+ fn has_blocked_on_epoll ( & self , thread_id : ThreadId ) -> bool {
582
+ self . threads [ thread_id] . state . is_blocked_on ( BlockReason :: Epoll )
583
+ }
584
+
581
585
/// Have all threads terminated?
582
586
fn have_all_terminated ( & self ) -> bool {
583
587
self . threads . iter ( ) . all ( |thread| thread. state . is_terminated ( ) )
@@ -1137,6 +1141,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
1137
1141
this. machine . threads . enable_thread ( thread_id) ;
1138
1142
}
1139
1143
1144
+ #[ inline]
1145
+ fn has_blocked_on_epoll ( & self , thread_id : ThreadId ) -> bool {
1146
+ let this = self . eval_context_ref ( ) ;
1147
+ this. machine . threads . has_blocked_on_epoll ( thread_id)
1148
+ }
1149
+
1140
1150
#[ inline]
1141
1151
fn active_thread_stack < ' a > ( & ' a self ) -> & ' a [ Frame < ' tcx , Provenance , FrameExtra < ' tcx > > ] {
1142
1152
let this = self . eval_context_ref ( ) ;
Original file line number Diff line number Diff line change @@ -600,7 +600,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
600
600
waiter. sort ( ) ;
601
601
waiter. dedup ( ) ;
602
602
for thread_id in waiter {
603
- this. unblock_thread ( thread_id, BlockReason :: Epoll ) ?;
603
+ if this. has_blocked_on_epoll ( thread_id) {
604
+ this. unblock_thread ( thread_id, BlockReason :: Epoll ) ?;
605
+ }
604
606
}
605
607
Ok ( ( ) )
606
608
}
You can’t perform that action at this time.
0 commit comments