(root)/
strace-6.5/
tests-mx32/
clock_adjtime-common.c
       1  /*
       2   * This file is part of clock_adjtime* strace tests.
       3   *
       4   * Copyright (c) 2016-2020 Dmitry V. Levin <ldv@strace.io>
       5   * All rights reserved.
       6   *
       7   * SPDX-License-Identifier: GPL-2.0-or-later
       8   */
       9  
      10  # include <stdio.h>
      11  # include <time.h>
      12  # include <unistd.h>
      13  
      14  int
      15  main(void)
      16  {
      17  	long rc = syscall(SYSCALL_NR, CLOCK_MONOTONIC, NULL);
      18  	printf("%s(CLOCK_MONOTONIC, NULL) = %s\n",
      19  	       SYSCALL_NAME, sprintrc(rc));
      20  
      21  	void *efault = tail_alloc(1);
      22  
      23  	rc = syscall(SYSCALL_NR, CLOCK_REALTIME, efault);
      24  	printf("%s(CLOCK_REALTIME, %p) = %s\n",
      25  	       SYSCALL_NAME, efault, sprintrc(rc));
      26  
      27  	puts("+++ exited with 0 +++");
      28  	return 0;
      29  }