Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/bh_threaded.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static int __init bottomhalf_init(void)
free_irq(button_irqs[0], &buttons[0]);

fail2:
gpio_free_array(buttons, ARRAY_SIZE(leds));
gpio_free_array(buttons, ARRAY_SIZE(buttons));

fail1:
gpio_free_array(leds, ARRAY_SIZE(leds));
Expand Down
2 changes: 1 addition & 1 deletion examples/bottomhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static int __init bottomhalf_init(void)
free_irq(button_irqs[0], NULL);

fail2:
gpio_free_array(buttons, ARRAY_SIZE(leds));
gpio_free_array(buttons, ARRAY_SIZE(buttons));

fail1:
gpio_free_array(leds, ARRAY_SIZE(leds));
Expand Down
2 changes: 1 addition & 1 deletion examples/intrpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static int __init intrpt_init(void)
free_irq(button_irqs[0], NULL);

fail2:
gpio_free_array(buttons, ARRAY_SIZE(leds));
gpio_free_array(buttons, ARRAY_SIZE(buttons));

fail1:
gpio_free_array(leds, ARRAY_SIZE(leds));
Expand Down
2 changes: 1 addition & 1 deletion lkmpg.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,7 @@ \subsection{Spinlocks}
In contrast, \cpp|spin_lock_irqsave()| disables interrupts and also saves the interrupt state, ensuring that interrupts are restored to their previous state when the lock is released.
This makes \cpp|spin_lock_irqsave()| a safer option in scenarios where preserving the interrupt state is crucial.

Next, \cpp|spin_lock_bh()| disables softirqs (software interrupts) but allows hardware interrupts to continue.
Next, \cpp|spin_lock_bh()| disables \textbf{softirqs} (software interrupts) but allows hardware interrupts to continue.
Unlike \cpp|spin_lock_irq()| and \cpp|spin_lock_irqsave()|, which disable both hardware and software interrupts, \cpp|spin_lock_bh()| is useful when hardware interrupts need to remain active.

For more information about spinlock usage and lock types, see the following resources:
Expand Down