Project

General

Profile

Feature #12773

support CLOCK_THREAD_CPUTIME_ID and CLOCK_PROCESS_CPUTIME_ID

Added by Joshua M. Clulow 5 days ago. Updated 5 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
kernel
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Linux provides two clock backends for reading what amounts to microstate accounting data from either the current LWP (CLOCK_THREAD_CPUTIME_ID) or the current process (CLOCK_PROCESS_CPUTIME_ID). Today, one would use getrusage(3C) to collect this information, with RUSAGE_SELF for the process or RUSAGE_LWP for the LWP.


Files

t2.c (4.18 KB) t2.c Dan McDonald, 2020-05-21 04:49 PM

History

#1

Updated by Dan McDonald 5 days ago

NOTE: LX has half-hearted emulation for this in SmartOS & OmniOSce, but a proper implementation of these two would go a long way toward source-portability for all-the-world's-Linux code.

#2

Updated by Dan McDonald 5 days ago

Attaching a larval toy test program that demonstrates differences between LX"s emulation and what happens on a platform that fully supports these clock IDs.

Also available in: Atom PDF