strace/membarrier.c
Dmitry V. Levin 2aec1e67df Implement membarrier syscall decoding
* membarrier.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* xlat/membarrier_cmds.in: New file.
* linux/dummy.h (membarrier): Remove.
* tests/membarrier.c: New file.
* tests/membarrier.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add membarrier.
(TESTS): Add membarrier.test.
* tests/.gitignore: Add membarrier.
2015-11-17 00:40:22 +00:00

22 lines
413 B
C

#include "defs.h"
#include "xlat/membarrier_cmds.h"
SYS_FUNC(membarrier)
{
if (entering(tcp)) {
int cmd = tcp->u_arg[0], flags = tcp->u_arg[1];
printxval(membarrier_cmds, cmd, "MEMBARRIER_CMD_???");
tprintf(", %d", flags);
return cmd ? RVAL_DECODED : 0;
}
if (syserror(tcp) || !tcp->u_rval)
return 0;
tcp->auxstr = sprintflags("", membarrier_cmds, tcp->u_rval);
return RVAL_HEX | RVAL_STR;
}