1 /* copyleft (C) GPL3 {{{2
4 * Author: arrow <arrow_zhang@sdc.sercomm.com>
5 * Created at: Mon 20 Aug 2007 07:05:37 PM CST
8 #include <linux/kernel.h>
9 #include <linux/module.h>
10 #include <linux/list.h>
11 #include <asm/semaphore.h>
12 #include <linux/timer.h>
18 struct timer_list timer
;
19 /*DECLARE_MUTEX(sem);*/
23 void loop(unsigned long data
)
27 timer
.expires
= jiffies
+ HZ
;
29 sbup("looping data = %ld\n", data
);
31 list_for_each_entry(tp
, &list
, list
) {
32 sbup("List name:%s\n", tp
->name
);
39 int __init
init_serv(void)
42 timer
.expires
= jiffies
+ HZ
;
43 timer
.function
= loop
;
48 void __exit
exit_serv(void)
53 int test_register(struct arrow_t
*new)
56 list_add(&new->list
, &list
);
60 EXPORT_SYMBOL(test_register
);
62 int test_unregister(struct arrow_t
*del
)
69 EXPORT_SYMBOL(test_unregister
);
71 module_init(init_serv
);
72 module_exit(exit_serv
);
74 /* vim:fdm=marker:ts=8:ft=c:norl:fdl=1: