I just installed linux for the first time so that i could play around
with an operating system for which i had the source code (i usually
program under Solaris, which is locked up tight as a drum).
Anyway, i am trying to add a system call for fun. I've registered the
system call number (223) in /usr/src/linux/arch/i386/kernel/entry.S,
added the macro __NR_mycall to linux/include/asm/unistd.h, and added
mycall.c and mycall.h to linux/arch/i386/kernel, (mycall.h has the
_syscall1 macro) and rebuilt/installed the kernel. My call is in the
kernel (i verify that by looking in System.map), and, after much
head banging i tried calling interrupt 80 with my system call number,
and it worked. The problem is i don't have to call int 80 for time,
sleep, waitpid, etc, so i should not need to do that for my call.
The _syscall1 macro is creating a great little int 80 call in the
kernel, where it does me no good. Is there a standard place where i
should put the _syscall1 so that when i rebuild/install the kernel
it will go somewhere in /usr/lib and /usr/include/sys?
I didn't see an answer to this in the FAQ...