Skip to content
Snippets Groups Projects
Commit 2289520b authored by Petr Rockai's avatar Petr Rockai
Browse files

dios: Report an error if a thread terminates while holding a lock.

parent 25bc5446
No related branches found
No related tags found
No related merge requests found
......@@ -351,7 +351,10 @@ static inline void releaseThread( _PThread &thread )
static inline void releaseAndKillThread( __dios_task tid )
{
releaseThread( getThread( tid ) );
auto &thread = getThread( tid );
if ( thread.refcnt != 1 )
__dios_fault( _VM_Fault::_VM_F_Locking, "thread terminated while holding a lock" );
releaseThread( thread );
__dios_kill( tid );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment