From: Stefan Kisdaroczi <kisda@domain.hid>
To: Shashank Bhatia <shashank.bhatia@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Interrupt service routine problem
Date: Mon, 25 May 2009 15:37:45 +0200 [thread overview]
Message-ID: <4A1A9F29.8050806@domain.hid> (raw)
In-Reply-To: <200905251736.07951.shashank.bhatia@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 2697 bytes --]
Hi,
the rt_intr_* functions are disabled by default in the kernel configuration [1].
You can enable them here:
Real-time subsystem -> Interfaces -> Native API -> Interrupts
For device drivers its suggested that you use the RTDM skin and not the
rt_intr_* calls from the native API.
kisda
[1] https://mail.gna.org/public/xenomai-help/2006-07/msg00197.html
Shashank Bhatia schrieb:
> Dear All,
>
> I was trying to make a simple kernel module, and was unable to insert it into
> the kernel space. The code and Error messages are provided hereunder:
>
>
> Code:
> #include <native/task.h>
> #include <native/timer.h>
> #include <native/intr.h>
>
> #define STACK_SIZE 0
>
> RT_INTR isrDesc;
>
>
> int isrKbdHandler(struct xnintr* _idesc) {
>
>
> printk("module: catch a key\n");
>
> return RT_INTR_PROPAGATE;
>
> }
>
>
>
> int init_module (void) {
>
> printk("module: Init\n");
> rt_intr_create(&isrDesc, "kbdisr", (unsigned)1, &isrKbdHandler, NULL, 0);
> rt_intr_enable(&isrDesc);
>
>
> return 0;
> }
>
>
>
> void cleanup_module (void) {
>
>
> rt_intr_delete(&isrDesc);
>
> printk("module: exit\n");
> }
>
> MODULE_LICENSE("GPL");
>
>
>
>
> Makefile:
>
>
> obj-m = module.o
>
>
> KDIR = /lib/modules/$(shell uname -r)/build
> PWD = $(shell pwd)
> EXTRA_CFLAGS = -I/usr/xenomai/include -I/usr/include/
> default:
> $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>
> clean:
> rm -f *.o *.ko *.mod.c *symvers *~
>
>
>
> Error message:
> make -C /lib/modules/2.6.25.11-default/build
> SUBDIRS=/home/bhatia/rtprog/interupt modules
> make[1]: Entering directory `/usr/src/linux-2.6.25.11'
> CC [M] /home/bhatia/rtprog/interupt/module.o
> Building modules, stage 2.
> MODPOST 1 modules
> WARNING: "rt_intr_enable" [/home/bhatia/rtprog/interupt/module.ko] undefined!
> WARNING: "rt_intr_create" [/home/bhatia/rtprog/interupt/module.ko] undefined!
> WARNING: "rt_intr_delete" [/home/bhatia/rtprog/interupt/module.ko] undefined!
> CC /home/bhatia/rtprog/interupt/module.mod.o
> LD [M] /home/bhatia/rtprog/interupt/module.ko
> make[1]: Leaving directory `/usr/src/linux-2.6.25.11'
>
>
>
> Error while insmoding:
> insmod: error inserting './module.ko': -1 Unknown symbol in module
>
>
>
>
>
>
>
> Thanks and Regards,
>
> Shashank
>
> -------------------------------------
> Hi-Tech Gears Limited, Gurgaon, India
>
>
>
>
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2009-05-25 13:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-25 12:06 [Xenomai-help] Interrupt service routine problem Shashank Bhatia
2009-05-25 13:37 ` Stefan Kisdaroczi [this message]
2009-05-26 5:43 ` Shashank Bhatia
2009-05-26 11:05 ` Stefan Kisdaroczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A1A9F29.8050806@domain.hid \
--to=kisda@domain.hid \
--cc=shashank.bhatia@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.