futex: avoid printing val when it is not used by the futex command
This is analogous to timeout argument omitting in FUTEX_WAKE_BITSET command. * futex.c (SYS_FUNC(futex)): Remove common printing of val argument. Add printing of val argument for all futex commands except FUTEX_LOCK_PI, FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
This commit is contained in:
parent
606d4b2d54
commit
110da33aff
14
futex.c
14
futex.c
@ -59,32 +59,40 @@ SYS_FUNC(futex)
|
||||
printaddr(uaddr);
|
||||
tprints(", ");
|
||||
printxval(futexops, op, "FUTEX_???");
|
||||
tprintf(", %u", val);
|
||||
switch (cmd) {
|
||||
case FUTEX_WAIT:
|
||||
tprintf(", %u", val);
|
||||
tprints(", ");
|
||||
print_timespec(tcp, timeout);
|
||||
break;
|
||||
case FUTEX_LOCK_PI:
|
||||
tprints(", ");
|
||||
print_timespec(tcp, timeout);
|
||||
break;
|
||||
case FUTEX_WAIT_BITSET:
|
||||
tprintf(", %u", val);
|
||||
tprints(", ");
|
||||
print_timespec(tcp, timeout);
|
||||
tprintf(", %#x", val3);
|
||||
break;
|
||||
case FUTEX_WAKE_BITSET:
|
||||
tprintf(", %u", val);
|
||||
tprintf(", %#x", val3);
|
||||
break;
|
||||
case FUTEX_REQUEUE:
|
||||
tprintf(", %u", val);
|
||||
tprintf(", %u, ", val2);
|
||||
printaddr(uaddr2);
|
||||
break;
|
||||
case FUTEX_CMP_REQUEUE:
|
||||
case FUTEX_CMP_REQUEUE_PI:
|
||||
tprintf(", %u", val);
|
||||
tprintf(", %u, ", val2);
|
||||
printaddr(uaddr2);
|
||||
tprintf(", %u", val3);
|
||||
break;
|
||||
case FUTEX_WAKE_OP:
|
||||
tprintf(", %u", val);
|
||||
tprintf(", %u, ", val2);
|
||||
printaddr(uaddr2);
|
||||
tprints(", {");
|
||||
@ -96,6 +104,7 @@ SYS_FUNC(futex)
|
||||
tprintf(", %u}", val3 & 0xfff);
|
||||
break;
|
||||
case FUTEX_WAIT_REQUEUE_PI:
|
||||
tprintf(", %u", val);
|
||||
tprints(", ");
|
||||
print_timespec(tcp, timeout);
|
||||
tprints(", ");
|
||||
@ -103,10 +112,13 @@ SYS_FUNC(futex)
|
||||
break;
|
||||
case FUTEX_FD:
|
||||
case FUTEX_WAKE:
|
||||
tprintf(", %u", val);
|
||||
break;
|
||||
case FUTEX_UNLOCK_PI:
|
||||
case FUTEX_TRYLOCK_PI:
|
||||
break;
|
||||
default:
|
||||
tprintf(", %u", val);
|
||||
tprintf(", %#lx", timeout);
|
||||
tprints(", ");
|
||||
printaddr(uaddr2);
|
||||
|
Loading…
Reference in New Issue
Block a user