Skip to content
Tcl Source Code Artifact [5d0b5632ff]
Login

Artifact [5d0b5632ff]

Artifact 5d0b5632ff9505fe9cfaf577ed1c0fb35ae9da6a25a1c9ae468778935be74405:

Ticket change [5d0b5632ff] - Ticket [893f8cc5db3ba8bd|893f8cc5db] <i>Nested mutexes following TIP 509</i> status still Closed with 5 other changes by sebres on 2025-10-03 20:57:44.
D 2025-10-03T20:57:44.211
J closedate 2460952.37342837
J closer sebres
J icomment <blockquote>>\sSo\snow\swe\swant\sout\sof\spure\sesoterism\senter\sthe\sland\sof\sundefined\sbehavior?</blockquote>\r\nNo,\sI\sdidn't\smean\sprocessor\sarchitecture\srelated\srequirements\sfor\sdata\salignment,\sthat\scan\scause\sUB.\sI\smeant\sproper\salignment\sin\ssense\sof\sprocessor\sarchitecture,\sbut\smisaligned\sfor\san\soperation\swhich\scan\srequire\smore\scycles\sbecause\sthe\sprocessor\smust\saccess\sdata\sfrom\smultiple,\scorrectly\saligned\smemory\slocations,\seffectively\ssplitting\sa\ssingle\slogical\soperation\sinto\stwo\sor\smore\sdistinct\smemory\saccesses\sthat\saren't\sperformed\sin\sa\ssingle,\sinstantaneous\sstep.\sThat\smakes\sthe\soperation\snon\satomic,\sbut\sit\sis\snot\san\sUB.\r\n\r\nThere\sare\sarchitectures\sand\sABIs,\sfor\sinstance\sSolaris\s(-m32),\swhich\srequire\s4\sbytes\salignment\sto\swork\sproperly\s(for\smost\sof\sthe\sCPU\sinstructions),\sbut\s8\sbytes\salignment\sto\sguarantee\satomic\sread/write.\r\n\r\n<blockquote>>\sWe\swant\sour\shome\sgrown\smutex\sstruct\sspecially\scrafted\sto\shave\sthe\sthread\sid\smisaligned?</blockquote>\r\n\r\nIt\sis\senough\sto\sinline\s"home\sgrown\smutex\sstruct"\sinto\sanother\sstructure\swithout\salignment\safter\sodd\scount\sof\sint16/int32\smembers.\sOr\suse\ssome\smemory\sallocator\swithout\snecessarily\saligned\smemory.\sOr\ssomething\slike\sthat.\r\n\r\n<blockquote>>\sWhat\sabout\sthe\sfine\s__atomic_something\sstuff\son\sunaligned\smemory\sthen?</blockquote>\r\n\r\nI\sdon't\sknown\ssuch\s__atomic_something\sthat\scan\sbe\saffected\sby\smisalignment.\sAtomic\sremains\satomic,\sno\smatter\sintrinsic\s(matter\sof\scompiler)\sor\sfunctions\s(the\sbarrier\sis\sprovided\sinternally,\se.g.\swith\sproper\sCPU\sinstruction).\sIn\sworse\scase\syou'd\sget\sa\scompiler\serror\sby\smisalignment.\r\n\r\nAnd\slast\sbut\snot\sleast,\sI'm\sbasically\sagainst\shome\smade\sas\swell\sas\sreentrant\smutexes\s-\sneither\sthe\sformer\snor\sthe\slatter\sis\sreally\sneeded\sby\sTcl\score.
J login sebres
J mimetype text/x-fossil-wiki
K 893f8cc5db3ba8bd6bed80ce89a0a75c6088a37c
U sebres
Z 7a5246d283741c8eba51283316775880