中断屏蔽方法

伪代码如下:

void lock() {
	DisableInterrupts(); //关中断
}

void unlock() {
	EnableInterrupts(); //开中断
}

优点:

缺点:

应用: