Skip to content

avoid sleeping-relted deadlock (Issue #231)#232

Open
jasonzzzzzzz wants to merge 3 commits intos5z:masterfrom
jasonzzzzzzz:master
Open

avoid sleeping-relted deadlock (Issue #231)#232
jasonzzzzzzz wants to merge 3 commits intos5z:masterfrom
jasonzzzzzzz:master

Conversation

@jasonzzzzzzz
Copy link

Previous ThreadFini() lacks control of SLEEPING threads in finish().
This change helps many-thread simulation to completion; Otherwise, it deadlocks when running TailBench Apps with only 2-4 threads.

Previous ThreadFini() lacks control of SLEEPING threads in finish(). 
This change helps many-thread simulation to completion; Otherwise, it deadlocks when running TailBench Apps with only 2-4 threads.
@gaomy3832
Copy link
Contributor

I think this fix is correct. Please also clean up the print message and debug notes in the code. Also, it seems you do not need to actually schedule it after you remove it from the sleep queue. It is finishing any way. Simply mark it as BLOCKED and leave it to the later code to deal with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants