lkml.org 
[lkml]   [1999]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectSystem Call
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.034 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site