Linux Online Advertisement
[ Register ]

[ Applications ]
[ Documentation ]
[ Distributions ]
[ Download Info ]
[ General Info ]
[ Book Store ]

Advertisement

[ Courses ]
[ News ]
[ People ]
[ Hardware ]
[ Vendors ]
[ Projects ]
[ Events ]
[ User Groups ]
[ User Area ]

Automating Unix and Linux Administration

[ About Us ]
[ Home Page ]
[ Advertise ]

testmycall.h (new user space header file to be created)

14. testmycall.h (new user space header file to be created)

testmycall.h

  1. Create a header file called testmycall.h. This header file should be included by any program calling our system call.

  2. Add three lines to it

  1. Line 1: This is needed because we need the definition of _syscall1.

#include<linux/unistd.h>

  1. Line 2: This is needed because we need the number of our system call.

#define __NR_mycall 317

  1. Line 3: This is needed for system calls with 1 argument. It is explained in detail below.

_syscall1(long, mycall, int, i)

So, our user header file looks like:

/*---Start of header file------*/

#include<linux/unistd.h>

#define __NR_mycall 317

_syscall1(long, mycall, int, i)

/*---End of header file--------*/



Comments: feedback (at) linux.org
Advertising: banners (at) linux.org
Copyright Linux Documentation Project.
Compilation ©1994-2008 Linux Online, Inc.
All rights reserved.