Re: system call implementation for x86_64

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Randy Dunlap
Date: Sunday, May 20, 2007 - 10:46 pm

On Sat, 19 May 2007 04:55:12 -0700 kernel coder wrote:


Your example is very CPU-independent, i.e., not x86_64-specific,
so following examples of recently-added syscalls should be good enough.

I used your "patch" below (with a few small modifications) on
2.6.22-rc2 and it worked fine.

Linux unicorn 2.6.22-rc2 #2 SMP Sun May 20 22:22:36 PDT 2007 x86_64 x86_64 x86_64 GNU/Linux
...
[   98.369454] new system call



syscall_max is no longer used.


not unsigned.


not unsigned.


	return 0;


  EXPORT_SYMBOL_GPL(sys_newcall);


#include <unistd.h>


eh?  does not compile.


I just used the syscall() glibc interface instead of asm:

	ret = syscall(__NR_newcall);


Mostly typos...


Sounds mostly OK to me.
Where are the ring head, tail, size, etc. maintained?


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
system call implementation for x86_64, kernel coder, (Sat May 19, 4:55 am)
Re: system call implementation for x86_64, Randy Dunlap, (Sun May 20, 10:46 pm)