nmi-watchdog测试

#include <linux/module.h>
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/spinlock.h>

spinlock_t test_lock;

static int __init nmi_test_init(void)
{
 int cpu = smp_processor_id();

 spin_lock_init(&test_lock);

 printk(KERN_INFO "NMI test lock on cpu:%d\n", cpu);

 spin_lock(&test_lock);
 spin_lock(&test_lock);

 return 0;
}

module_init(nmi_test_init);

MODULE_LICENSE("Dual BSD/GPL");

你可能感兴趣的:(测试,Module,include)