瀏覽代碼

Kernel: Add VERIFY(!m_in_block) when entering Thread::block()

Andreas Kling 4 年之前
父節點
當前提交
0f03a8aece
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Kernel/Thread.h

+ 1 - 0
Kernel/Thread.h

@@ -855,6 +855,7 @@ public:
         SpinlockLocker block_lock(m_block_lock);
         // We need to hold m_block_lock so that nobody can unblock a blocker as soon
         // as it is constructed and registered elsewhere
+        VERIFY(!m_in_block);
         m_in_block = true;
         BlockerType blocker(forward<Args>(args)...);