[Prev][Next][Index][Thread]

Re: Clock implementation in oskit



> From: Voon-Li Chung <vlchung@cs.uwa.edu.au>
> Subject: Re: Clock implementation in oskit 
> 
> If you are using pthreads, you could insert a line in the scheduler that
> increments some state variable each thread has every time the scheduler

Note that if you look in oskit/threads/pthread_resource.c, you will find a
couple of silly little time functions that I added when I was doing some
measurements. Note the use of PTHREAD_TICK.

> If it isn't multithreaded, you should be able to register a function to
> the timer interrupt routines to increment your own variable very so often

See oskit/examples/x86/timer.c for a very a nice illustration of exactly
this suggestion.

Lbs

---------------------------------------------------------------------------
Leigh B. Stoller                     Computer Science - Flux Research Group
stoller@cs.utah.edu                  University of Utah
http://www.cs.utah.edu/~stoller      Salt Lake City, Utah 84112
Voice: (541) 929-2666                FAX: (801) 585-3743
---------------------------------------------------------------------------