Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 02 Oct 2019 00:38:27 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 240990] Linuxulator: CLOCK_THREAD_CPUTIME_ID and CLOCK_PROCESS_CPUTIME_ID are missing
Message-ID:  <bug-240990-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D240990

            Bug ID: 240990
           Summary: Linuxulator: CLOCK_THREAD_CPUTIME_ID and
                    CLOCK_PROCESS_CPUTIME_ID are missing
           Product: Base System
           Version: 12.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: iwtcex@gmail.com

% cat gettime_bug.c
#define _GNU_SOURCE

#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <time.h>

int main() {

  struct timespec t =3D {.tv_sec =3D 0, .tv_nsec =3D 0};

  int err1 =3D clock_gettime(CLOCK_THREAD_CPUTIME_ID, &t);
  printf("clock_gettime: %d [%s]\n", err1, strerror(errno));

  int err2 =3D clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &t);
  printf("clock_gettime: %d [%s]\n", err2, strerror(errno));

  return 0;
}
% /compat/linux/bin/cc -Wall --sysroot=3D/compat/linux gettime_bug.c -o
gettime_bug
% ./gettime_bug
clock_gettime: -1 [Invalid argument]
clock_gettime: -1 [Invalid argument]

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-240990-227>