mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* strange new system call problems
@ 2004-08-06  9:56 kwl02r
  0 siblings, 0 replies; only message in thread
From: kwl02r @ 2004-08-06  9:56 UTC (permalink / raw)
  To: linux-kernel

    Hiya,

    I am running the Redhat9 with kernel-2.4.20-8. I added four new 
system calls for my application program.
    At file /asm/unistd.h, I added my system calls definition as following.
   
    #define __NR_set_tid_address    258 /* last system call defined by 
system*/

   #define __NR_mysystemcall1  259  /* my first system call*/
   #define __NR_mysystemcall2  260  /* my second system call*/
   #define __NR_mysystemcall3  261  /* my third system call*/
   #define __NR_mysystemcall4  262  /* my forth system call*/

   After this , I changed the linux/arch/i386/entry.S as following.
  . long SYMBOL_NAME(sys_mysystemcall1)             /* 259 system call */
  .long SYMBOL_NAME(sys_mysystemcall2)              /* 260 system call */
  .long SYMBOL_NAME(sys_mysystemcall3)              /* 261 system call */
  .long SYMBOL_NAME(sys_mysystemcall4)              /* 262 system call */

   When I compilered a new kernel, there was no any error messages.
   But only the new system call 259 was working. The rest of three 
(260-262) did not response
   anything. If I changed the position of system calls (259->260 and 
260->259), still the 259 had
   response. Anyway, only the new system call at the 259 position was 
working. What is wrong?
   Other questions are:
   (1) Is it correct that I add my new definitions at 
/linux/asm/unistd.h? There is another file under
         /linux/asm-i386/unistd.h
   (2) At entry.S, do I need to change codes following for my new system 
calls? How to change ?
       
       .rept NR_syscalls-(.-sys_call_table)/4
               .long SYMBOL_NAME(sys_ni_syscall)
        .endr

Thanks



   


 

   


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-08-06  9:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-06  9:56 strange new system call problems kwl02r

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome