> Date: Wed, 15 Oct 2014 20:36:33 +0200 (CEST) > From: Mark Kettenis <[email protected]> > > > Date: Wed, 15 Oct 2014 20:18:10 +0200 (CEST) > > From: Mark Kettenis <[email protected]> > > > > > From: "Todd C. Miller" <[email protected]> > > > Date: Wed, 15 Oct 2014 11:37:26 -0600 > > > > > > Since this came up in another thread. Trivial implementations of > > > CLOCK_VIRTUAL and CLOCK_PROF, modeled after what FreeBSD does. > > > > Shouldn't this do a tuagg() on all the threads of the process like we > > do for getrusage? Otherwise the CLOCK_VIRTUAL and CLOCK_PROF clocks > > will only be updated upon a context switch. > > > > Also, you should add support for these to clock_getres(2). > > > > Oh, and documenting CLOCK_PROF in the man page would be good. > > Hmm, looking at the FreeBSD man page... isn't CLOCK_PROF the same > thing as CLOCK_PROCESS_CPUTIME_ID?
Oh, and while FreeBSD seems to implement CLOCK_VIRTUAL and CLOCK_PROF as per-process, Solaris implements them as per-thread (but doesn't document them). And on Solaris CLOCK_PROF is just an alias for CLOCK_THREAD_CPUTIME_ID. Starting to doubt if we really want to implement these...
