1 #include <linux/kernel.h>
2 #include <linux/module.h>
3 
4 int global_sym = 0;
5 EXPORT_SYMBOL(global_sym);
6 static spinlock_t my_lock;
7 
testexport(void)8 int testexport(void)
9 {
10   printk("in testexport\n");
11   return 0;
12 }
13 
14 EXPORT_SYMBOL(testexport);
15 
testexport2(spinlock_t *t)16 int testexport2(spinlock_t *t)
17 {
18   printk("in testexport\n");
19   return 0;
20 }
21 EXPORT_SYMBOL(testexport2);
22 
hello_init(void)23 int hello_init(void)
24 {
25   printk(KERN_INFO "Hello World!\n");
26   return 0;
27 }
28 
hello_exit(void)29 void hello_exit(void)
30 {
31   printk(KERN_INFO "Bye World!\n");
32 }
33 
34 module_init(hello_init);
35 module_exit(hello_exit);
36 
37 MODULE_LICENSE("GPL");
38