1 #include "defs.h" 2 SYS_FUNC(getcpu)3SYS_FUNC(getcpu) 4 { 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 } 23