看板 FB_security 關於我們 聯絡資訊
RW <rwmaillists@googlemail.com> writes: > static __inline uint64_t > get_cyclecount(void) > { > struct bintime bt; > > binuptime(&bt); > return (bt.frac ^ bt.sec); >=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 > } Why the heck does it xor the integer and fractional parts together? That makes no sense at all. I would have used ((uint64_t)bt.sec << 32 | bt.frac >> 32). It wraps around after 136 years' uptime, but hey, you can't win them all. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no _______________________________________________ freebsd-security@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-security To unsubscribe, send any mail to "freebsd-security-unsubscribe@freebsd.org"