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> {
578578 self . threads [ thread_id] . state . is_terminated ( )
579579 }
580580
581+ fn has_blocked_on_epoll ( & self , thread_id : ThreadId ) -> bool {
582+ self . threads [ thread_id] . state . is_blocked_on ( BlockReason :: Epoll )
583+ }
584+
581585 /// Have all threads terminated?
582586 fn have_all_terminated ( & self ) -> bool {
583587 self . threads . iter ( ) . all ( |thread| thread. state . is_terminated ( ) )
@@ -1137,6 +1141,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
11371141 this. machine . threads . enable_thread ( thread_id) ;
11381142 }
11391143
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+
11401150 #[ inline]
11411151 fn active_thread_stack < ' a > ( & ' a self ) -> & ' a [ Frame < ' tcx , Provenance , FrameExtra < ' tcx > > ] {
11421152 let this = self . eval_context_ref ( ) ;
Original file line number Diff line number Diff line change @@ -615,7 +615,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
615615 waiter. sort ( ) ;
616616 waiter. dedup ( ) ;
617617 for thread_id in waiter {
618- this. unblock_thread ( thread_id, BlockReason :: Epoll ) ?;
618+ if this. has_blocked_on_epoll ( thread_id) {
619+ this. unblock_thread ( thread_id, BlockReason :: Epoll ) ?;
620+ }
619621 }
620622 Ok ( ( ) )
621623 }
You can’t perform that action at this time.
0 commit comments