1TASK_CURRENT_SYSCALL(9) Machine State TASK_CURRENT_SYSCALL(9)
2
3
4
6 task_current_syscall - Discover what a blocked task is doing.
7
9 int task_current_syscall(struct task_struct * target, long * callno,
10 unsigned long args[6], unsigned int maxargs,
11 unsigned long * sp, unsigned long * pc);
12
14 target
15 thread to examine
16
17 callno
18 filled with system call number or -1
19
20 args[6]
21 filled with maxargs system call arguments
22
23 maxargs
24 number of elements in args to fill
25
26 sp
27 filled with user stack pointer
28
29 pc
30 filled with user PC
31
33 If target is blocked in a system call, returns zero with *callno set to
34 the the call's number and args filled in with its arguments. Registers
35 not used for system call arguments may not be available and it is not
36 kosher to use struct user_regset calls while the system call is still
37 in progress. Note we may get this result if target has finished its
38 system call but not yet returned to user mode, such as when it's
39 stopped for signal handling or syscall exit tracing.
40
41 If target is blocked in the kernel during a fault or exception, returns
42 zero with *callno set to -1 and does not fill in args. If so, it's now
43 safe to examine target using struct user_regset get calls as long as
44 we're sure target won't return to user mode.
45
46 Returns -EAGAIN if target does not remain blocked.
47
48 Returns -EINVAL if maxargs is too large (maximum is six).
49
50
51
52Kernel Hackers Manual 2.6. November 2011 TASK_CURRENT_SYSCALL(9)