static void rocs_thread_wrapper( void* inst ) { #ifdef __ROCS_THREAD__ iOThreadData o = Data(inst); o->id = __threadid(); o->run( inst ); #endif }
unsigned long rocs_thread_id(void) { #ifdef __ROCS_THREAD__ return __threadid(); #else return 0; #endif }
_ASSERTE(*template != _T('\0')); /* * The Process ID is not a good choice in multi-threaded programs * because of the likelihood that two threads might call mktemp() * almost simultaneously, thus getting the same temporary name. * Instead, the Win32 Thread ID is used, because it is unique across * all threads in all processes currently running. * * Note, however, that unlike *NIX process IDs, which are not re-used * until all values up to 32K have been used, Win32 process IDs are * re-used and tend to always be relatively small numbers. Same for * thread IDs. */ #ifdef _MT number = __threadid(); #else /* _MT */ number = _getpid(); #endif /* _MT */ while (*string) string++; /* replace last five X's */ #ifdef _MBCS while ((--string>=template) && (!_ismbstrail(template,string)) && (*string == 'X') && xcount < 5) #else /* _MBCS */ while (*--string == _T('X') && xcount < 5) #endif /* _MBCS */ {