Messages in this thread | | | From | "Livia Catarina Soares" <> | Subject | System Call | Date | 21 Apr 1999 13:35:06 -0300 |
| |
Dear Colleagues
In my "trip" around the kernel :-)...I found a new problem now :-).
I created a system call and used the steps below:
1- In the file "/asm/unistd.h" I added the system call by the following command "#define __NR_setdeadline 164"
2- In the file "arch/i386/kernel/entry.S" I added ... ".long SYMBOL_NAME(sys_setdeadline) /* 164 */" and the file follows with... ".long 0,0 .long SYMBOL_NAME(sys_vm86)" and in the last row I updated from 166 to 167 ... ".space (NR_syscalls-167)*4"
3- In the file "kernel/sys.c" I defined the system call setdeadline.
4- After the above steps I created a file in C which uses the system call setdeadline. In that file I used "systcall3 (int, setdeadline, int, which, int, who, float, deadline)". It is beacause setdeadline has three parameters. I also used in the headers : "<linux/unistd.h>".
After the algorithm showed :-) ... The kernel was recompiled and the machine rebooted. Therefore would be possible to test the system call... I compiled my C file and I got the following message:
" In function 'setdeadline': __NR_setdeadline undeclared (first use this function)"
What is the matter ??
I could not understand why I need to use "syscall3". If I have another system with two, one or other value different from three. How I must proceed ??
The used procedure is in the book: "The Linux Kernel book " Remy Card, Eric Dumas and Franc Mevel.
Thank you again. Best regards, Livia Catarina. _____________________________________________________________ http://www.zipmail.com.br O e-mail que vai aonde você está.
_____________________________________________________________
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |