Nucleus PLUS is a new generation of embedded real-time multitasking operating system kernel.In the multi-core operating system environment,multiple tasks simultaneously access the kernel at the same time,and the spin lock can handle the synchronization and mutual exclusion that exist between different processors. However, if the spin lock is used improperly, that can easily cause a deadlock,and the application layer function can not be realized. So the spin lock test is very necessary. Through the study of the spin lock mechanism,this paper provides a test method for the spin lock to avoid the spin lock in the use of deadlock.%Nucleus PLUS是新一代的嵌入式实时多任务操作系统内核.在多核操作系统环境下,同一时刻多任务同时访问内核,自旋锁可以很好地处理不同处理器之间存在的同步与互斥问题,但自旋锁如果使用不当,极易产生死锁,造成应用层功能无法实现,所以很有必要对自旋锁展开重点测试.通过对自旋锁机制的研究,提供了一种针对自旋锁的测试方法,避免自旋锁在使用中产生死锁.
展开▼