Re: TSC instead of ACPI: powerd doesn't work anymore (to be expected?)

From: David Xu <davidxu_at_freebsd.org>
Date: Mon, 31 Oct 2005 18:52:44 +0800
David Xu wrote:
> 
> In thread program, we have to use clock_gettime, for example a thread
> wants to wait for condition variable for two seconds, it has to:
> 
> struct timespec ts;
> 
> clock_gettime(CLOCK_REALTIME, &ts);
> ts.tv_sec += 2;
> pthread_cond_wait(&cond, &mtx);
> 
Should be:
pthread_cond_timedwait(&cond, &mtx, &ts);
Received on Mon Oct 31 2005 - 09:52:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:46 UTC