Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

segfault on create_workqueue(...)

19 views
Skip to first unread message

Michal

unread,
Aug 20, 2004, 6:51:50 AM8/20/04
to
Hello,

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.

0 new messages