In message: <[EMAIL PROTECTED]>
            "River" <[EMAIL PROTECTED]> writes:
: Many thanks for your reply. Did the lastest FreeBSD fix this bug?
: And which version? 

I believe that 5 fixes this bug, or at least mostly fixes things
(since there's at least one pthread API that uses absolute time).
However, I've not verified this on 5.

: Because our OS is based on FreeBSD 4.5 and can not port to other
: FreeBSD easily, Any method to fix it in 4.5? Thanks.

The only fix that I could come up with was to base everything on
uptime rather than system time.  However, I ran into snags because the
pthread's API is stupid:

     int
     pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
         const struct timespec *abstime);

abstime is lame, because it doesn't cope well with system time
changing.

Your best bet is to make sure that the system time doesn't step after
your application starts.  This means you'll likely need to wait for
ntpd to step the time, or use ntpdate to get things close and tell
ntpd not to step things.

Warner
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to