assert fail before allowing invalid thread id into use

This commit is contained in:
Jeff Hill
2001-09-25 00:07:14 +00:00
parent 682dbfae7a
commit c4b6554964
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -504,6 +504,7 @@ epicsShareFunc void epicsShareAPI epicsThreadSleep ( double seconds )
epicsShareFunc epicsThreadId epicsShareAPI epicsThreadGetIdSelf (void)
{
win32ThreadParam *pParm = (win32ThreadParam *) TlsGetValue (tlsIndexWIN32);
assert ( pParm ); /* very dangerous to allow non-unique thread id into use */
return (epicsThreadId) pParm;
}
+1
View File
@@ -445,6 +445,7 @@ void epicsThreadSleep(double seconds)
epicsThreadId epicsThreadGetIdSelf(void) {
epicsThreadOSD *pthreadInfo = (epicsThreadOSD *)pthread_getspecific(getpthreadInfo);
assert ( pthreadInfo ); /* very dangerous to allow non-unique thread id into use */
return(pthreadInfo);
}