From f20fda486164264e0c9a64f3256b3238d0dc78d7 Mon Sep 17 00:00:00 2001 From: Matti Linnanvuori Date: Tue, 16 Oct 2007 23:29:41 -0700 Subject: [PATCH] Mutex documentation is unclear about software interrupts, tasklets and timers Acked-by: Arjan van de Ven Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Documentation/mutex-design.txt | 3 ++- include/linux/mutex.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/mutex-design.txt b/Documentation/mutex-design.txt index cbf79881a41c..51f935191ae5 100644 --- a/Documentation/mutex-design.txt +++ b/Documentation/mutex-design.txt @@ -90,7 +90,8 @@ of advantages of mutexes: * - task may not exit with mutex held * - memory areas where held locks reside must not be freed * - held mutexes must not be reinitialized - * - mutexes may not be used in irq contexts + * - mutexes may not be used in hardware or software interrupt + * contexts such as tasklets and timers furthermore, there are also convenience features in the debugging code: diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 6a735c72f23f..601479772b98 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -29,7 +29,8 @@ * - task may not exit with mutex held * - memory areas where held locks reside must not be freed * - held mutexes must not be reinitialized - * - mutexes may not be used in irq contexts + * - mutexes may not be used in hardware or software interrupt + * contexts such as tasklets and timers * * These semantics are fully enforced when DEBUG_MUTEXES is * enabled. Furthermore, besides enforcing the above rules, the mutex -- 2.20.1