blob: 47af7950cb69c9e3b05ff4502da179df766361a4 [file] [log] [blame]
Dmitry V. Levin665f10c2014-12-11 19:21:54 +00001#include "defs.h"
2
Dmitry V. Levina0bd3742015-04-07 01:36:50 +00003SYS_FUNC(getcpu)
Dmitry V. Levin665f10c2014-12-11 19:21:54 +00004{
5 if (exiting(tcp)) {
6 unsigned u;
7 if (tcp->u_arg[0] == 0)
8 tprints("NULL, ");
9 else if (umove(tcp, tcp->u_arg[0], &u) < 0)
10 tprintf("%#lx, ", tcp->u_arg[0]);
11 else
12 tprintf("[%u], ", u);
13 if (tcp->u_arg[1] == 0)
14 tprints("NULL, ");
15 else if (umove(tcp, tcp->u_arg[1], &u) < 0)
16 tprintf("%#lx, ", tcp->u_arg[1]);
17 else
18 tprintf("[%u], ", u);
19 tprintf("%#lx", tcp->u_arg[2]);
20 }
21 return 0;
22}