pcp
[Top] [All Lists]

Bug in sginap macro

To: pcp@xxxxxxxxxxx
Subject: Bug in sginap macro
From: Eric Roman <eroman@xxxxxxx>
Date: Fri, 11 Feb 2000 15:08:35 -0800
Reply-to: eroman@xxxxxxx
Sender: owner-pcp@xxxxxxxxxxx
The sginap macro looks like it's supposed to sleep for a
given number of clock ticks:

#define sginap(x) (long)(usleep(1000000 * x / 100), 0)

On Linux Alpha the value of CLK_TCK is 1024 (not 100, like on x86), sooo
sginap sleeps about 10 times longer than it's supposed to from functions
that use CLK_TCK to convert seconds to clock ticks.

I noticed this from running pmval and pmclient with -t 1 on Alpha.  Output
occurs every 10 seconds, rather than every second.  (Reports wierd values
too.)

Eric

<Prev in Thread] Current Thread [Next in Thread>
  • Bug in sginap macro, Eric Roman <=