NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/58733: clock_nanosleep() (and I suspect more) is badly broken



The following reply was made to PR kern/58733; it has been noted by GNATS.

From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/58733: clock_nanosleep() (and I suspect more) is badly broken
Date: Thu, 10 Oct 2024 18:57:34 +0700

     Date:        Thu, 10 Oct 2024 18:09:49 +0700
     From:        Robert Elz <kre%munnari.OZ.AU@localhost>
     Message-ID:  <10285.1728558589%jacaranda.noi.kre.to@localhost>
 
   | [  4098.067055] nanosleep1(): abstime end-now=[-1.990111640]
   | When we calculate the end time then, we see we have overrun by about
   | 2 seconds
 
 And of course, that was just me mis-reading how negative timespecs (and
 timevals for that matter) work...   -1.99 means -1 second + 0.99 seconds,
 which is really -0.01 seconds (approx), not almost -2 !
 
 Intellectually I know that, but when I see -1.99 the brain just jumps
 to normal numbers.
 
 kre
 


Home | Main Index | Thread Index | Old Index