<i>Virtual Time broken on threaded unix</i> status still Open with 4 other changes
by
.
D 2026-10-21T10:53:13.347
J foundin 9.1.0
J icomment On\smain\sthe\stimers\sare\smonotonic\ssince\sTIP\s723,\sbut\stimed\scondition\swaits\son\sUnix\sstill\sused\san\sabsolute\swall-clock\sdeadline\s(default\s<tt>CLOCK_REALTIME</tt>\scondition\svariables,\sdeadline\sfrom\s<tt>Tcl_GetDayTime()</tt>).\sA\sstep\sof\sthe\ssystem\stime\sduring\sa\stimed\swait\smade\sit\slonger\sor\sshorter\sby\sthe\ssize\sof\sthe\sstep.\sThis\saffects\severy\stimed\swait,\sincluding\sthe\s0-timeout\sone\sin\szipfs\sinit.\n\nProposed\sfix\sin\sbranch\s[/timeline?r=unix-monotonic-condwait|unix-monotonic-condwait]:\scondition\svariables\sare\screated\swith\s<tt>pthread_condattr_setclock(CLOCK_MONOTONIC)</tt>\swhere\savailable,\sand\sdeadlines\sare\scomputed\son\sthe\ssame\sclock.\sIt\scovers\s<tt>Tcl_ConditionWait()</tt>\sand\sthe\sselect\snotifier's\swait.\s<tt>TclUnixWaitForFile()</tt>\salso\suses\sthe\smonotonic\sclock\snow.\sWithout\s<tt>pthread_condattr_setclock()</tt>\s(macOS),\sthe\sbehavior\sis\sunchanged.\n\nTested\son\sLinux,\sFreeBSD,\sNetBSD,\sOpenBSD\sand\sOpenIndiana,\swith\sthe\swall\sclock\sshifted\sby\san\s<tt>LD_PRELOAD</tt>\sshim.\sThere\sis\sno\stest\sin\sthe\ssuite,\ssince\sthat\sneeds\sa\sclock\schange.
J login serhiy.storchaka
J mimetype text/x-fossil-wiki
K 3328635fffffffffffffffffffffffffffffffff
U serhiy.storchaka
Z 12aa96a0b5f4b950ccef123018afa347