> The whole point was about, given the current implementation of> clock_getcpuclockid done by glibc, can we remove that "failed with> success" (showed in the changelog) thing and come up with some> meaningful clockid for that situation? It's more than possible for the> answer to be no!!! :-P

I think we should change glibc if clock_getcpuclockid() doesn't work,please see below.

You do not need clock_getcpuclockid() at all. In fact I do not reallyunderstand what this helper should actually do, probably it is onlyneeded to validate the pid. You can simply use MAKE_THREAD_CPUCLOCK()to sample a single thread via clock_gettime().

IOW. Unless I missed something, with this patch, the only problemis that getcpuclockid() always assumes MAKE_PROCESS_CPUCLOCK(),I do not think this is the kernel problem.