Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

membarrier.c 624B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
  3. * Copyright (c) 2015-2018 The strace developers.
  4. * All rights reserved.
  5. *
  6. * SPDX-License-Identifier: LGPL-2.1-or-later
  7. */
  8. #include "defs.h"
  9. #include "xlat/membarrier_cmds.h"
  10. SYS_FUNC(membarrier)
  11. {
  12. if (entering(tcp)) {
  13. int cmd = tcp->u_arg[0], flags = tcp->u_arg[1];
  14. printxval(membarrier_cmds, cmd, "MEMBARRIER_CMD_???");
  15. tprintf(", %d", flags);
  16. return cmd ? RVAL_DECODED : 0;
  17. }
  18. if (syserror(tcp) || !tcp->u_rval)
  19. return 0;
  20. tcp->auxstr = sprintflags("", membarrier_cmds,
  21. (kernel_ulong_t) tcp->u_rval);
  22. return RVAL_HEX | RVAL_STR;
  23. }