The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 06-25-2009
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2003
Location: Florida
Posts: 1,935
Perhaps the following will help you. Assuming you are using a 32-bit X86 2.6 Linux kernel .....

0x80 is the value of the software interrupt (INT) which performs the transfer to kernel mode via system_call(). See ../arch/x84/kernel/entry_32.S for the system_call() source.

The syscall interface for open() is defined in ../include/linux/syscalls.h

Code:
asmlinkage long sys_open(const char __user *filename, int flags, int mode);

The system call number for open is defined in ../arch/include/asm/unistd_32.h

Code:
#define __NR_open 5