This commit is contained in:
Jeff Hill
2000-09-14 00:43:31 +00:00
parent 53faeff877
commit 7cf4d6bc57
2 changed files with 16 additions and 15 deletions

View File

@@ -283,17 +283,18 @@ static int WINAPI epicsWin32ThreadEntry (LPVOID lpParameter)
win32ThreadParam *pParm = (win32ThreadParam *) lpParameter;
BOOL stat;
stat = TlsSetValue (tlsIndexWIN32, pParm);
stat = TlsSetValue ( tlsIndexWIN32, pParm );
if (stat) {
(*pParm->funptr) (pParm->parm);
TlsSetValue (tlsIndexWIN32, 0);
( *pParm->funptr ) ( pParm->parm );
TlsSetValue ( tlsIndexWIN32, 0 );
}
/*
* CAUTION: !!!! the thread id might continue to be used after this thread exits !!!!
*/
free (pParm);
return (stat); /* this indirectly closes the thread handle */
free ( pParm );
return ( stat ); /* this indirectly closes the thread handle */
}
/*
@@ -307,28 +308,28 @@ epicsShareFunc threadId epicsShareAPI threadCreate (const char *pName,
DWORD wstat;
BOOL bstat;
if (!win32ThreadInitOK) {
if ( ! win32ThreadInitOK ) {
threadInit ();
if (!win32ThreadInitOK) {
if ( ! win32ThreadInitOK ) {
return NULL;
}
}
pParmWIN32 = malloc ( sizeof (*pParmWIN32) + strlen (pName) + 1 );
pParmWIN32 = malloc ( sizeof ( *pParmWIN32 ) + strlen ( pName ) + 1 );
if ( pParmWIN32 == NULL ) {
return NULL;
}
pParmWIN32->pName = (char *) (pParmWIN32 + 1);
strcpy (pParmWIN32->pName, pName);
pParmWIN32->pName = (char *) ( pParmWIN32 + 1 );
strcpy ( pParmWIN32->pName, pName );
pParmWIN32->funptr = pFunc;
pParmWIN32->parm = pParm;
pParmWIN32->isSuspended = 0;
pParmWIN32->handle = (HANDLE) _beginthreadex (0, stackSize, epicsWin32ThreadEntry,
pParmWIN32, CREATE_SUSPENDED, &pParmWIN32->id);
pParmWIN32->handle = (HANDLE) _beginthreadex ( 0, stackSize, epicsWin32ThreadEntry,
pParmWIN32, CREATE_SUSPENDED, &pParmWIN32->id );
if ( pParmWIN32->handle == 0 ) {
free (pParmWIN32);
free ( pParmWIN32 );
return NULL;
}
@@ -347,7 +348,7 @@ epicsShareFunc threadId epicsShareAPI threadCreate (const char *pName,
return NULL;
}
return (threadId) pParmWIN32;
return ( threadId ) pParmWIN32;
}
/*

View File

@@ -254,7 +254,7 @@ osiTime::operator tm_nano_sec () const
//
osiTime::osiTime (const tm_nano_sec &tm)
{
static const time_t mktimeFailure = static_cast<time_t> (-1);
static const time_t mktimeFailure = static_cast <time_t> (-1);
time_t_wrapper ansiTimeTicks;
struct tm tmp = tm.ansi_tm;