1SYSCALL_GET_NR(9)                Machine State               SYSCALL_GET_NR(9)
2
3
4

NAME

6       syscall_get_nr - find what system call a task is executing
7

SYNOPSIS

9       int syscall_get_nr(struct task_struct * task, struct pt_regs * regs);
10

ARGUMENTS

12       task
13           task of interest, must be blocked
14
15       regs
16
17           task_pt_regs of task
18

DESCRIPTION

20       If task is executing a system call or is at system call tracing about
21       to attempt one, returns the system call number. If task is not
22       executing a system call, i.e. it´s blocked inside the kernel for a
23       fault or signal, returns -1.
24
25       Note this returns int even on 64-bit machines. Only 32 bits of system
26       call number can be meaningful. If the actual arch value is 64 bits,
27       this truncates to 32 bits so 0xffffffff means -1.
28
29       It´s only valid to call this when task is known to be blocked.
30
31
32
33Kernel Hackers Manual 2.6.         June 2019                 SYSCALL_GET_NR(9)
Impressum