Re: error of proc_register()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 17, 2001 at 05:29:41PM -0400, Hong Hsu wrote:

> for /proc part.  Does this also apply to Chapter 7 System Calls?   I 
> want to add a system call, say nrprocess(), with these steps: 1) add an 
> entry in include/asm-i386/unistd.h 2) #insmod nrprocess.o

The basic process is probably the same, or similar. I haven't checked the exact
text.

> but I don't see how the userland application know the new system call.  

it's just a matter of adding a little glue code. All system calls on x86 go
through the int 0x80 instruction, with eax (I think) containing the number of
the syscall (__NR_whatever), and the stack being correctly prepared.

Check the glibc source (or diet libc is probably more readable)

regards
john

-- 
"There are two kinds of fool. One says, 'This is old, and therefore good.' And
one says, 'This is new, and therefore better'."
	- John Brunner
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux