mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-26 08:28:20 +08:00
Fix locking issue in epoch_watchdog()
The _Watchdog_Per_CPU_insert_ticks() assumes that interrupts are disabled.
This commit is contained in:
parent
9f87c4586b
commit
9f2c3ceebe
@ -91,10 +91,13 @@ static void
|
|||||||
epoch_watchdog(Watchdog_Control *wdg)
|
epoch_watchdog(Watchdog_Control *wdg)
|
||||||
{
|
{
|
||||||
struct epoch_pcpu *epcpu;
|
struct epoch_pcpu *epcpu;
|
||||||
|
ISR_Level level;
|
||||||
|
|
||||||
epcpu = __containerof(wdg, struct epoch_pcpu, wdg);
|
epcpu = __containerof(wdg, struct epoch_pcpu, wdg);
|
||||||
|
_ISR_Local_disable(level);
|
||||||
_Watchdog_Per_CPU_insert_ticks(&epcpu->wdg,
|
_Watchdog_Per_CPU_insert_ticks(&epcpu->wdg,
|
||||||
_Watchdog_Get_CPU(&epcpu->wdg), 1);
|
_Watchdog_Get_CPU(&epcpu->wdg), 1);
|
||||||
|
_ISR_Local_enable(level);
|
||||||
|
|
||||||
if (RTEMS_PREDICT_FALSE(epcpu->cb_count != 0)) {
|
if (RTEMS_PREDICT_FALSE(epcpu->cb_count != 0)) {
|
||||||
rtems_interrupt_server_request_submit(&epcpu->irq_srv_req);
|
rtems_interrupt_server_request_submit(&epcpu->irq_srv_req);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user