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 <linux/timer.h>
17 struct timer_list timer
;
21 void loop(unsigned long data
)
25 timer
.expires
= jiffies
+ HZ
;
27 sbup("looping data = %ld\n", data
);
28 list_for_each_entry(tp
, &list
, list
) {
29 sbup("List name:%s\n", tp
->name
);
35 int __init
init_serv(void)
38 timer
.expires
= jiffies
+ HZ
;
39 timer
.function
= loop
;
44 void __exit
exit_serv(void)
49 int test_register(struct arrow_t
*new)
51 list_add(&new->list
, &list
);
54 EXPORT_SYMBOL(test_register
);
56 int test_unregister(struct arrow_t
*del
)
61 EXPORT_SYMBOL(test_unregister
);
63 module_init(init_serv
);
64 module_exit(exit_serv
);
66 /* vim:fdm=marker:ts=8:ft=c:norl:fdl=1: