lkml.org 
[lkml]   [2004]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Posix compliant CLOCK_PROCESS/THREAD_CPUTIME_ID V4
Christoph Lameter wrote:
> George asked for a test program so I wrote one and debugged the patch.
> The test program uses syscall to bypass glibc processing. I have been
> working on a patch for glibc but that gets a bit complicated
> because backwards compatibility has to be kept. Maybe tomorrow.
> Found also that glibc allows the setting of these clocks so I also
> implemented that and used it in the test program. Setting these
> clocks modifies stime and utime directly, which may not be such a good
> idea. Do we really need to be able to set these clocks?

Another way of doing this is to save these values in the task structure. If
null, use the direct value of stime, utime, if not, adjust by the saved value
(i.e. saved value would represent time zero).
>
> So it actually works now. Test output, test program and revised patch:

Please, when sending patches, attach them. This avoids problems with mailers,
on both ends, messing with white space. They still appear in line, at least in
some mailers (mozilla in my case).

As to the test program, what happens when you attempt to set up a timer on these
clocks? (No, I don't think it should work, but we DO want to properly error
out. And the test should verify that this happens.) By the way, if you use the
support package from sourceforge, you will find a lot of test harness stuff.


~
--
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.424 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site