syscall_get_nr — find what system call a task is executing
long syscall_get_nr ( | struct task_struct * task, |
struct pt_regs * regs) ; |
If task
is executing a system call or is at system call
tracing about to attempt one, returns the system call number.
If task
is not executing a system call, i.e. it's blocked
inside the kernel for a fault or signal, returns -1.
It's only valid to call this when task
is known to be blocked.