synchronize a kernel thread and interrupt service routine?

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.

Comments (4)