Messages in this thread | | | Date | Sun, 22 Aug 2004 18:04:13 +0200 (CEST) | From | Pascal Schmidt <> | Subject | Re: Nonotify 0.3.2 (A simple dnotify replacement) |
| |
On Sun, 22 Aug 2004, nf wrote:
> But i didn't want to bother people with asking to assign me a > syscall-number before even knowing if they like my idea. And changing it > to use a syscall lateron would be no problem at all from the concept of > nonotify.
Right. It's just something to consider if you aim for inclusion in the mainline tree later.
> Also - as a kernel newbie - i didn't find any good documentation how to > add my own syscall into the kernel. I just wanted to get nonotify > working as an 'optional patch', without changing tons of files.
Adding a syscall should roughly work like this:
- write your sys_foo() function - add your syscall number to include/asm-i386/unistd.h, don't forget to change the "#define NR_syscalls" accordingly - add ".long sys_foo" to sys_call_table in arch/i386/kernel/entry.S, in the right place (i.e. syscall 290 would need to be element 290 in the list) - arrange for the object file with sys_foo in it to be linked into the kernel
You're right, your going to have to touch a couple of files for this approach.
> But you could help me if you have a look at my ioctl function. I'm using > a structure which contains a char* pointer and four timespec fields. Do > you know if this causes problems with 32/64bit compatibility.
I don't think the timespecs will be a problem. However, the char pointer will have different sizes and alignment requirements on 32bit and 64bit system. I'm no expert in how that can be handled in the compat layer, though.
-- Ciao, Pascal - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |