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

From: David Xu (davidxu_at_freebsd.org)
Date: 10/31/05

  • Next message: Robert Watson: "Re: TSC instead of ACPI: powerd doesn't work anymore (to be expected?)"
    Date: Mon, 31 Oct 2005 18:52:44 +0800
    To: David Xu <davidxu@freebsd.org>
    
    

    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);
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: Robert Watson: "Re: TSC instead of ACPI: powerd doesn't work anymore (to be expected?)"