Re: Y2K-like bug to hit Linux computers! - Info of the day

From: christos gentsis
Date: Sat May 14 2005 - 05:17:32 EST


jnf wrote:

submission$ cat test.c
int main(void) {
signed short int count = 0;

while(count >= 0 ) {
printf("count: %d\n", count++ );
}
printf("count: %d\n");
}
submission$ gcc -o test test.c
submission$ ./test
[...]
count: 32767
count: -1



correct but i didn't mean that... i mean how to become negative with out
an overflow...

I could be wrong here, but I don't think the hardware even keeps track of
the clock ticks, rather it just ticks and lets the software keep track.



it has to have hardware because if there is not so how the time is
updated then the system is turned off? ;)
it has to be hardware that keeps working...


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