History

workqueue: Use lockdep to assert IRQs are disabled/enabled

Use lockdep to check that IRQs are enabled or disabled as expected. This way the sanity check only shows overhead when concurrency correctness debug code is enabled.

Frederic Weisbecker committed 9 years ago

Commit 8e8eb731 parent f71b74b1 file · +1 −1Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+1−1
@@ -1376,7 +1376,7 @@ static void __queue_work(int cpu, struct workqueue_struct *wq, · 1375 unmodified lines
1376 * queued or lose PENDING. Grabbing PENDING and queueing should1376 * queued or lose PENDING. Grabbing PENDING and queueing should
1377 * happen with IRQ disabled.1377 * happen with IRQ disabled.
1378 */1378 */
1379 WARN_ON_ONCE(!irqs_disabled());1379 lockdep_assert_irqs_disabled();
1380 1380
1381 debug_work_activate(work);1381 debug_work_activate(work);
1382 1382