讨论了临界区代码保护、任务切换以及2407的软堆栈等问题。
The problem of the protection for critical code, task switch and the software stack of the 2407 are discussed.
锁保护的临界区:经lock -UNLOCK对不能实现完全的内存屏障的功能,但是,它们也的确会影响内存访问顺序,参考下面的示例代码。
LOCK-Based Critical Sections: Although a LOCK-UNLOCK pair does not act as a full memory barrier, these operations do affect memory ordering. Consider the following code.
临界区用来确保代码的某些部分同一时间只能由一个线程执行。
A critical section is an object used to make sure, that some part of the code is executed only by one thread at a time.
当内核正在执行处于临界区内的代码的时候,在该内核控制路径没有执行完临界区的代码之前,任何其它内核控制路径不能进入该临界区。
A critical region is any section of code that must be completely executed by any kernel control path that enters it before another kernel control path can enter it.
当内核正在执行处于临界区内的代码的时候,在该内核控制路径没有执行完临界区的代码之前,任何其它内核控制路径不能进入该临界区。
A critical region is any section of code that must be completely executed by any kernel control path that enters it before another kernel control path can enter it.
应用推荐