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: [email protected]
          Reporter: [email protected]

% 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.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to