I apologize for my amateurish question, but I don't understand the
reason why my simple module won't run. On 'insmod ./wq_test.ko' I
always get the segfault. I was trying to get my first workqueue
working but without any success. The code is here:
...
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/workqueue.h>
static struct workqueue_struct *wq_test_workqueue;
static int __init wq_test_init(void)
{
// Create workqueue
wq_test_workqueue = create_workqueue("wq_test_workqueue");
// Success
return 0;
}
static void __exit wq_test_exit(void)
{
}
module_init(wq_test_init);
module_exit(wq_test_exit);
...
Compiled on 2.6.8.1 with gcc version 3.3.4 (Debian 1:3.3.4-6sarge1).
thanx for advice,
-m.