synchronize a kernel thread and interrupt service routine?

  • 0

    if a kernel thread and interrupt service routine are accessing the same variable, how to implement synchronization for this variable? using a mutex in kernel thread would cause the interrupt service routine to busy wait on the variable. But interrupt should execute as fast as possible.

  • 0

    ISR memory must be pinned and private.

  • 1

    Disable the interrupt by masking before accessing the same variable. Once the execution is complete enable the interrupt.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.