Skip to content
Tcl Source Code Artifact [7e059502f8]
Login

Artifact [7e059502f8]

Artifact 7e059502f824054a1d067d6a5b944294479670e0:

Ticket change [7e059502f8] - Ticket [992108ffffffffff|992108ffff] <i>TclpFinalizeLock on Unix not correct.</i> status still Open with 4 other changes by vasiljevic on 2004-07-17 04:57:37.
D 2004-07-17T04:57:37
J icomment Logged\sIn:\sYES\s\nuser_id=95086\n\nFrankly\sspeaking,\sthe\scommon\ssense\stells\sthat\s\s\nif\syou\sfirst\sdestroy\sthe\sthing,\sthen\syou\sneed\sto\s\s\ncreate\sthe\sthing\sbefore\syou\scan\suse\sit\sagain.\s\n\s\s\nSo,\sif\syou\sdestroy\sthe\sstatic\smutex\s(which\syou\s\ndid\snot\screate\sat\sthe\sfirst\splace,\srather\sthe\s\ncompiler\sdid\sthat\sfor\syou)\swho\sis\sgoing\sto\s\s\ncreate\sit?\s\n\s\nThis\sis\svery\simplementation\sspecific.\sFor\sexample,\s\nhave\sa\slook\son\sthe\sNPTL\spthread_mutex_destroy:\s\n\s\nint\s\n__pthread_mutex_destroy\s(mutex)\s\n\s\s\s\s\spthread_mutex_t\s*mutex;\s\n{\s\n\s\sif\s(mutex->__data.__nusers\s!=\s0)\s\n\s\s\s\sreturn\sEBUSY;\s\n\s\n\s\sreturn\s0;\s\n}\s\n\s\nI\sam\sall\swith\syou\sthat\swe\sshould\saim\sat\scleaning\s\nup\swhat's\spossible\safter\sus,\sbut\sI'm\safraid\sthat\s\nin\ssome\scircumstances\swe\smight\sclean-up\stoo\smuch.\s\n\s\nTo\sbe\son\sthe\ssafe\sside,\sI'd\srather\srisk\sa\sleak\s\nthen\sa\s(eventual)\smemory\scorruption.\s\nIdeally,\sone\swould\sgrab\ssources\sof\sall\sthread\s\nlibrary\simplementations,\slook\swhat\sis\sreally\s\ndone\sunder\sthe\shood\sand\smake\sa\swrapper\swith\s\nifdef's\sfor\sall\ssupported\svariants.\s\s\nThis\sis\shard\sjob\sto\sdo.\sAnd\simplementor\sdocs\s\nare\smore\sthan\sconfusing\sin\sthat\srespect,\sas\s\nAndreas\shave\sfound\sout.\s\n\s\n
J login vasiljevic
J mimetype text/plain
J username vasiljevic
K 992108ffffffffffffffffffffffffffffffffff
U vasiljevic
Z e197b5cc355e0817fecae33990e24de7