Page MenuHomeFreeBSD

Fix Linuxulator clock_gettime() and clock_getres() for cpu clocks
ClosedPublic

Authored by dchagin on Jan 23 2020, 7:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 11, 6:51 PM
Unknown Object (File)
Nov 8 2024, 5:30 PM
Unknown Object (File)
Oct 19 2024, 12:10 PM
Unknown Object (File)
Oct 16 2024, 1:59 PM
Unknown Object (File)
Oct 3 2024, 8:55 AM
Unknown Object (File)
Oct 3 2024, 8:55 AM
Unknown Object (File)
Oct 3 2024, 8:54 AM
Unknown Object (File)
Oct 3 2024, 8:54 AM
Subscribers

Details

Summary
  • handle the CLOCK_{PROCESS,THREAD}_CPUTIME_ID specified directly;
  • fix thread/proccess id calculation as in the Linuxulator we should convert the user supplied thread/proccess id by linux_tdfind();
  • fix CPUCLOCK_SCHED case by using kern_{process,thread}_cputime() directly as native get_cputime() used by kern_clock_gettime() uses native tdfind()/pfind() to find proccess/thread.

PR: 240990

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Why do you need D23340 ? Why the current method is not sufficient ?

In D23341#511764, @kib wrote:

Why do you need D23340 ? Why the current method is not sufficient ?

hi, in case when the Linux clock id obtained via pthread_getcpuclockid() call we should use linux_tdfind() to convert thread id of clock id to native struct thread.

This revision is now accepted and ready to land.Feb 1 2020, 10:20 PM