summaryrefslogtreecommitdiffstats
path: root/Documentation/translations
diff options
context:
space:
mode:
authorAlexander Sverdlin <alexander.sverdlin@siemens.com>2022-12-12 17:37:15 +0100
committerThomas Gleixner <tglx@linutronix.de>2023-01-11 19:45:26 +0100
commit379af13b31fa8a36ad4abd59a5c511f25c5d4d42 (patch)
treeef5e8b47f5ec5874b752d097b3ac766a977fae6d /Documentation/translations
parentgenirq: Add might_sleep() to disable_irq() (diff)
downloadlinux-379af13b31fa8a36ad4abd59a5c511f25c5d4d42.tar.xz
linux-379af13b31fa8a36ad4abd59a5c511f25c5d4d42.zip
docs: locking: Discourage from calling disable_irq() in atomic
Correct the example in the documentation so that disable_irq() is not being called in atomic context. disable_irq() calls sleeping synchronize_irq(), it's not allowed to call them in atomic context. Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Manfred Spraul <manfred@colorfullife.com> Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/lkml/87k02wbs2n.ffs@tglx/ Link: https://lore.kernel.org/r/20221212163715.830315-1-alexander.sverdlin@siemens.com
Diffstat (limited to 'Documentation/translations')
-rw-r--r--Documentation/translations/it_IT/kernel-hacking/locking.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/translations/it_IT/kernel-hacking/locking.rst b/Documentation/translations/it_IT/kernel-hacking/locking.rst
index b8ecf41273c5..05d362b16bf0 100644
--- a/Documentation/translations/it_IT/kernel-hacking/locking.rst
+++ b/Documentation/translations/it_IT/kernel-hacking/locking.rst
@@ -1307,11 +1307,11 @@ se i dati vengono occasionalmente utilizzati da un contesto utente o
da un'interruzione software. Il gestore d'interruzione non utilizza alcun
*lock*, e tutti gli altri accessi verranno fatti così::
- spin_lock(&lock);
+ mutex_lock(&lock);
disable_irq(irq);
...
enable_irq(irq);
- spin_unlock(&lock);
+ mutex_unlock(&lock);
La funzione disable_irq() impedisce al gestore d'interruzioni
d'essere eseguito (e aspetta che finisca nel caso fosse in esecuzione su