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/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240990

            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 = {.tv_sec = 0, .tv_nsec = 0};

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

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

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

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

home | help

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