I am new in Linux kernel development. I have implemented a system call say my_pid in linux kernel 2.6. I want to call getpid system call from my system call. How can I do it?
I want something like:
pid_t my_pid(){ return getpid(); }
Also from C in user-space I can call any system call using: syscall(); What is the generic way to do this in kernel mode?