Dmitry V. Levin | 665f10c | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 1 | #include "defs.h" |
| 2 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame^] | 3 | SYS_FUNC(getcpu) |
Dmitry V. Levin | 665f10c | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 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 | } |