Re: [PATCH 1/7] cpu-timers: high-resolution CPU clocks for POSIXclock_* syscalls

From: Ulrich Drepper
Date: Tue Dec 14 2004 - 16:43:22 EST


Christoph Lameter wrote:

Posix does not prescribe any access limitations for those clocks and as
far as I understand the standard, access to all process clocks needs to
be possible.

And how exactly do you plan to address clocks of various threads in another process? Threads are only identified by the pthread_t descriptor. These values have no meaning outside the process the threads are in. The TIDs we use in the implementation cannot be used. They are an implementation detail and a thread might very well have different TIDs over time in future versions of the thread library.

The pthread_getcpuclockid() and similar uses return clock IDs which are only meaningful in the calling process. Using the value in another process has undefined results. I.e., what Roland says is correct, the limitation is needed.

--
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â

Attachment: signature.asc
Description: OpenPGP digital signature