So I am writing a new system call and adding it to the kernel of Linux which works when I explicitly call it through the system call number: syscall(335, pid);
but gives an warning: implicit declaration of function of the system call when using its general name: s_call(pid). I can't figure out why its not finding it.
-test file is already in the kernel
-the system call is already defined in sys.c SYSCALL_DEFINE1(s_call, int, who)
-has an asmlinkage in syscalls.h asmlinkage long sys_s_call(int pid);
-in the syscall_64.tbl as
335 64 s_call __x64_sys_s_call
-headers being used in the test file:
#include <stdio.h>
#include <unistd.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>