Skip to content
Tcl Source Code Artifact [0f4795c9b3]
Login

Artifact [0f4795c9b3]

Artifact 0f4795c9b3884b884baa379c067d2be6da269e71:

Ticket change [0f4795c9b3] - New ticket [218742ffffffffff|218742ffff] <i>thread support on digital-unix</i>. by nobody on 2000-10-26 01:04:49.
D 2000-10-26T01:04:49
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s1966\sBug\nVersion:\s8.1b3\nSubmitDate:\s'1999-04-30'\nLastModified:\s'2000-01-11'\nSeverity:\sSER\nStatus:\sReleased\nSubmitter:\spat\nChangedBy:\shobbs\nRelatedBugIDs:\s1931\nOS:\sDigital\sUnix\nOSVersion:\s4.0B\nMachine:\sOther\nFixedDate:\s'2000-01-11'\nFixedInVersion:\s8.3b2\nClosedDate:\s'2000-10-25'\n\n\nName:\skazuro\sfurukawa\n\nComments:\n(this\spatch\sincludes\sa\spatch\ssubmitted\son\sapr.24.1999.)\n\s\s\s\s+\sfor\scompilation\sflags\son\sdu,\ssee\spthread_intro(3).\n\s\s\s\s+\sthread\sid\sshould\sbe\s64bit.\n\nReproducibleScript:\ntestthread\ssend\s[testthread\screate]\s{regexp\st\st}\n\s\s\s\sSegmentation\sfault\n\nObservedBehavior:\non\sdigital-unix/tru64unix,\sthread\sin\stcl\sseg-faults\sin\sregexec\sroutines.\n\nDesiredBehavior:\nno\sseg-faults\n\nPatch:\n---\sunix/configure.in.org\s\s\s\s\s\s\sTue\sApr\s27\s20:51:53\s1999\n+++\sunix/configure.in\s\s\sSat\sMay\s\s1\s07:00:04\s1999\n@@\s-2,7\s+2,7\s@@\n\sdnl\s\s\s\sgenerate\sthe\sfile\s"configure",\swhich\sis\srun\sduring\sTcl\sinstallation\n\sdnl\s\s\s\sto\sconfigure\sthe\ssystem\sfor\sthe\slocal\senvironment.\n\sAC_INIT(../generic/tcl.h)\n-#\sRCS:\s@(#)\s$Id:\sconfigure.in,v\s1.33\s1999/04/24\s01:46:54\sstanton\sExp\s$\n+#\sRCS:\s@(#)\s$Id:\sconfigure.in,v\s1.1\s1999/04/30\s21:59:49\sfurukawa\sExp\sfurukawa\s$\n\n\sTCL_VERSION=8.1\n\sTCL_MAJOR_VERSION=8\n@@\s-44,8\s+44,10\s@@\n\s\s\selse\n\s\s\s\s\s\sAC_MSG_WARN("Don\st\sknow\show\sto\sfind\spthread\slib\son\syour\ssystem\s-\syou\smust\sdisable\sthread\ssupport\sor\sedit\sthe\sLIBS\sin\sthe\sMakefile...")\n\s\s\sfi\n+\s\sdothread=yes\n\selse\n\s\s\sAC_MSG_RESULT(Will\scompile\swithout\sThreads\ssupport\s(normal))\n+\s\sdothread=no\n\sfi\n\n\s#\sset\sthe\swarning\sflags\sdepending\son\swhether\sor\snot\swe\sare\susing\sgcc\n@@\s-990,6\s+992,16\s@@\n\s\s\s\s\s\s\s\sDL_LIBS=""\n\s\s\s\s\s\s\s\sLD_FLAGS=""\n\s\s\s\s\s\s\s\sLD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'\n+\s\s\s\s\s\s\s#\ssee\spthread_intro(3)\sfor\spthread\ssupport\son\sosf1,\sk.furukawa\n+\s\s\s\s\s\s\sif\stest\s"$dothread"\s=\s"yes"\s;\sthen\n+\s\s\s\s\s\s\s\s\sif\stest\s"$CC"\s!=\s"gcc"\s-a\s`$CC\s-v\s2>&1\s|\sgrep\s-c\sgcc`\s=\s"0"\s;\sthen\n+\s\s\s\s\s\s\s\s\s\s\sEXTRA_CFLAGS="-std1\s-pthread"\n+\s\s\s\s\s\s\s\s\s\s\sLD_FLAGS="-pthread"\n+\s\s\s\s\s\s\s\s\selse\n+\s\s\s\s\s\s\s\s\s\s\sEXTRA_CFLAGS="-D_THREAD_SAFE"\n+\s\s\s\s\s\s\s\s\s\s\sLIBS='${LIBS}\s-lpthread\s-lmach\s-lexc\s-lc'\n+\s\s\s\s\s\s\s\s\sfi\n+\s\s\s\s\s\s\sfi\n\s\s\s\s\s\s\s\s;;\n\s\s\s\s\sRISCos-*)\n\s\s\s\s\s\s\s\sSHLIB_CFLAGS="-G\s0"\n\n---\sunix/tclUnixThrd.c.org\s\s\s\s\s\sFri\sApr\s16\s09:48:05\s1999\n+++\sunix/tclUnixThrd.c\s\sSat\sMay\s\s1\s07:06:19\s1999\n@@\s-9,7\s+9,7\s@@\n\s\s*\sSee\sthe\sfile\s"license.terms"\sfor\sinformation\son\susage\sand\sredistribution\n\s\s*\sof\sthis\sfile,\sand\sfor\sa\sDISCLAIMER\sOF\sALL\sWARRANTIES.\n\s\s*\n-\s*\sSCCS:\s\s@(#)\stclUnixThrd.c\s1.18\s98/02/19\s14:24:12\n+\s*\sRCS:\s@(#)\s$Id:\stclUnixThrd.c,v\s1.2\s1999/04/30\s22:06:07\sfurukawa\sExp\sfurukawa\s$\n\s\s*/\n\n\s#include\s"tclInt.h"\n@@\s-75,6\s+75,19\s@@\n\n\s\s\s\s\spthread_attr_init(&attr);\n\s\s\s\s\spthread_attr_setscope(&attr,\sPTHREAD_SCOPE_SYSTEM);\n+\n+#ifdef\s__osf__\n+\s\s\s\s/*\n+\s\s\s\s\s*\son\salpha/tru64unix\swe\sneed\sa\slarger\sstack\sto\sexecute\s"regexp",\s\n+\s\s\s\s\s*\swhich\smay\sconsume\s30k\sbytes,\swhile\sthe\sdefault\sper\sthread\sis\s8k.\s\n+\s\s\s\s\s*\seven\s"unknown"\sprocedure\smay\sseg-faults,\ssince\sit\suses\s"regexp".\s\n+\s\s\s\s\s*\si\sdon't\sknow\show\smuch\sis\soptimal.\ssimple\stest\sfor\sthe\sstack\sis\n+\s\s\s\s\s*\s"testthread\ssend\s[testthread\screate]\s{regexp\st\st}"\sand\smore\s\n+\s\s\s\s\s*\sserious\stest\sseems\sto\sbe\shttp.test.\s\sk.furukawa\n+\s\s\s\s\s*/\n+\s\s\s\spthread_attr_setstacksize(&attr,\sPTHREAD_STACK_MIN*32);\n+#endif\s/*\s__osf__\s*/\n+\n\s\s\s\s\sif\s(pthread_create((pthread_t\s*)idPtr,\s&attr,\s(void\s*\s(*)())proc,\s(void\s*)clientData)\s<\s0)\s{\n\s\s\s\s\s\s\s\sreturn\sTCL_ERROR;\n\s\s\s\s\s}\selse\s{\n\n---\sgeneric/tclThreadTest.c.org\sFri\sApr\s16\s09:46:54\s1999\n+++\sgeneric/tclThreadTest.c\s\s\s\s\sFri\sApr\s30\s16:13:59\s1999\n@@\s-11,7\s+11,7\s@@\n\s\s*\sSee\sthe\sfile\s"license.terms"\sfor\sinformation\son\susage\sand\sredistribution\n\s\s*\sof\sthis\sfile,\sand\sfor\sa\sDISCLAIMER\sOF\sALL\sWARRANTIES.\n\s\s*\n-\s*\sRCS:\s@(#)\s$Id:\stclThreadTest.c,v\s1.2\s1999/04/16\s00:46:54\sstanton\sExp\s$\n+\s*\sRCS:\s@(#)\s$Id:\stclThreadTest.c,v\s1.2\s1999/04/27\s06:43:20\sfurukawa\sExp\sfurukawa\s$\n\s\s*/\n\n\s#include\s"tclInt.h"\n@@\s-253,7\s+253,7\s@@\n\s\s\s\s\s\s\s\s}\n\s\s\s\s\s\s\s\scase\sTHREAD_ID:\n\s\s\s\s\s\s\s\s\s\s\s\sif\s(objc\s==\s2)\s{\n-\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTcl_Obj\s*idObj\s=\sTcl_NewIntObj((int)Tcl_GetCurrentThread());\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTcl_Obj\s*idObj\s=\sTcl_NewLongObj((long)Tcl_GetCurrentThread());\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTcl_SetObjResult(interp,\sidObj);\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sreturn\sTCL_OK;\n\s\s\s\s\s\s\s\s\s\s\s\s}\selse\s{\n@@\s-268,7\s+268,7\s@@\n\s\s\s\s\s\s\s\s\s\s\s\sreturn\sTclThreadList(interp);\n\s\s\s\s\s\s\s\s}\n\s\s\s\s\s\s\s\scase\sTHREAD_SEND:\s{\n-\s\s\s\s\s\s\s\s\s\s\sint\sid;\n+\s\s\s\s\s\s\s\s\s\s\slong\sid;\n\s\s\s\s\s\s\s\s\s\s\s\schar\s*script;\n\s\s\s\s\s\s\s\s\s\s\s\sint\swait,\sarg;\n\n@@\s-287,7\s+287,7\s@@\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\swait\s=\s1;\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sarg\s=\s2;\n\s\s\s\s\s\s\s\s\s\s\s\s}\n-\s\s\s\s\s\s\s\s\s\s\sif\s(Tcl_GetIntFromObj(interp,\sobjv[arg],\s&id)\s!=\sTCL_OK)\s{\n+\s\s\s\s\s\s\s\s\s\s\sif\s(Tcl_GetLongFromObj(interp,\sobjv[arg],\s&id)\s!=\sTCL_OK)\s{\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sreturn\sTCL_ERROR;\n\s\s\s\s\s\s\s\s\s\s\s\s}\n\s\s\s\s\s\s\s\s\s\s\s\sarg++;\n@@\s-371,7\s+371,7\s@@\n\s\s\s\s\sTcl_ConditionWait(&ctrl.condWait,\s&threadMutex,\sNULL);\n\s\s\s\s\sTcl_MutexUnlock(&threadMutex);\n\s\s\s\s\sTclFinalizeCondition(&ctrl.condWait);\n-\s\s\s\sTcl_SetObjResult(interp,\sTcl_NewIntObj((int)id));\n+\s\s\s\sTcl_SetObjResult(interp,\sTcl_NewLongObj((long)id));\n\s\s\s\s\sreturn\sTCL_OK;\n\s}\n\n@@\s-487,7\s+487,7\s@@\n\s\s\s\s\sTcl_Channel\serrChannel;\n\s\s\s\s\schar\s*errorInfo,\s*script;\n\s\s\s\s\schar\s*argv[3];\n-\s\s\s\schar\sbuf[10];\n+\s\s\s\schar\sbuf[20];\n\s\s\s\s\ssprintf(buf,\s"%ld",\s(long)\sTcl_GetCurrentThread());\n\n\s\s\s\s\serrorInfo\s=\sTcl_GetVar(interp,\s"errorInfo",\sTCL_GLOBAL_ONLY);\n@@\s-604,7\s+604,7\s@@\n\s\s\s\s\sTcl_MutexLock(&threadMutex);\n\s\s\s\s\sfor\s(tsdPtr\s=\sthreadList\s;\stsdPtr\s;\stsdPtr\s=\stsdPtr->nextPtr)\s{\n\s\s\s\s\s\s\s\sTcl_ListObjAppendElement(interp,\slistPtr,\n-\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTcl_NewIntObj((int)tsdPtr->threadId));\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTcl_NewLongObj((long)tsdPtr->threadId));\n\s\s\s\s\s}\n\s\s\s\s\sTcl_MutexUnlock(&threadMutex);\n\s\s\s\s\sTcl_SetObjResult(interp,\slistPtr);\n\nPatchFiles:\nunix/configure.in\n\s\s\s\sunix/tclUnixThrd.c\n\s\s\s\sgeneric/tclThreadTest.c\n\n\n\nThe\sabove\sfixes\shave\sbeen\smade\s(with\smods\swhere\snecessary)\sfor\s8.3b2.\nA\sslight\smodification\swas\smade\sfor\ssetting\sthe\sstack\ssize,\sso\sthat\nthe\suser\scan\sset\sthe\svalue\sfrom\sthe\smakefile.\s\sHowever,\sthe\suser\smust\nset\sTCL_THREAD_STACK_MIN\sto\ssomething\sto\sget\sthe\sstack\ssetting\nbehavior\s(it\sleaves\sit\sto\sthe\sdefaults\sotherwise).\n\nSee\stclUnixThrd.c\sin\s8.3b2\sfor\smore.\s\sThis\smay\sbe\sbetter\sparametrized\nin\sthe\sfuture\s(runtime\soption?).\s\n--\s01/11/2000\shobbs
J foundin obsolete:\s8.1b3
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 49.\sThreading
J title thread\ssupport\son\sdigital-unix
J type Bug
K 218742ffffffffffffffffffffffffffffffffff
U nobody
Z 3c4956540519b42bc93c4ecb777293a8