pthread_cond_timedwait() broken in 9-stable? (from JAN 10)
David Xu
listlog2011 at gmail.com
Fri Feb 17 02:44:59 UTC 2012
On 2012/2/17 10:42, David Xu wrote:
> aybe following code can check to see if TSC-LOW works by let the
> thread run
> on each cpu.
>
>
refresh:
gettimeofday(&prev, NULL);
int cpu = 0;
for (;;) {
cpuset_t set;
cpu = ++cpu % 4;
CPU_ZERO(&set);
CPU_SET(cpu, &set);
pthread_setaffinity_np(pthread_self(), sizeof(set), &set);
gettimeofday(&cur, NULL);
if ( timercmp(&prev, &cur, >)) {
abort();
}
prev = cur;
}
More information about the freebsd-stable
mailing list