.
D 2011-06-24T20:37:32
J assignee andreas_kupries
J cmimetype text/plain
J comment In\sthreaded\sunix\sbuilds,\stimer\sevents\suse\spthread_cond_timedwait,\swhich\sneeds\san\sabsolute\starget\stime.\sThe\scomputation\sof\sthis\starget\sis\sbroken,\sbecause\sit\sadds\sthe\s(correct)\sscaled==real\sdelta\sto\sthe\s(incorrect)\svirtual\sTcl_GetTime.\sThe\sfix\sis\sto\suse\sreal\stime\sfor\sthe\slatter.\n\nMoreover,\sin\ssome\sunices,\sthe\sclock\sused\sfor\spthread_cond_timedwait\scan\sbe\sselected\samong\sseveral,\swith\spthread_condattr_setclock\sat\scondvar\screation\stime.\sOne\sof\sthem,\sCLOCK_MONOTONIC,\shas\sthe\sextra\sadvantage\sof\sbeing\sinsensitive\sto\ssystem\sclock\stweaks.\sI\sthink\sthat\sselecting\sit\swhen\spossible\scan\sonly\simprove\sthings,\ssince\sit\sallows:\n\n\s\s\s\s\s-\susual,\stip-302-sensitive\s[after]\ssemantics\sunchanged,\ssince\sthe\stimer\sevents\sare\salso\sstored\sas\sabsolute\sepoch-time\s\stargets\sby\sTcl\n\s\s\s\s\s-\sfully\sworking\sVirtual\sTime\swith\sclock_gettime(CLOCK_MONOTONIC)\sgiving\stip-302-insensitive\s[after].\n\nI\shave\sa\sprovisional\spatch\sfor\splatforms\swith\sclock_gettime+CLOCK_MONOTONIC,\sdesigned\sto\senable\sJoe\sKeen's\scode\sin\shttp://groups.google.com/group/comp.lang.tcl/browse_frm/thread/8f820c68143850f9#\s.\sSome\sautogoo\swould\sbe\sdue\sbefore\scommitting.\n\nAn\salternative\sto\s'select\smonotonic\sif\spossible,\sepoch\sif\snot'\swould\sbe\sa\sruntime\ssetting,\slike\sa\s::tcl::unsupported::monotonicTime\slinked\svar.\sTo\sbe\sdiscussed.
J foundin None
J is_private 0
J priority 7\sHigh
J resolution None
J status Open
J submitter ferrieux
J subsystem 03.\sTimer\sEvents
J title Virtual\sTime\sbroken\son\sthreaded\sunix
J type Bug
K 3328635fffffffffffffffffffffffffffffffff
U ferrieux
Z 2c143718396d46878db974bbf192ca02