History

streamline system startup logging

Ge Wang committed 3 years ago

Commit f8d387a1 parent 87efd116 files · +130 −69Browse files

Showing the changes to src/core/util_thread.cpp (1 of 6 files). Show all

Unified · Split

src/core/util_thread.cpp+5−5
@@ -81,11 +81,11 @@ XThread::~XThread( ) · 80 unmodified lines
81 // TODO: find an alternative for Android?81 // TODO: find an alternative for Android?
82#if defined(__PLATFORM_MACOSX__) || ( defined(__PLATFORM_LINUX__) && !defined(__ANDROID__) ) || defined(__WINDOWS_PTHREAD__)82#if defined(__PLATFORM_MACOSX__) || ( defined(__PLATFORM_LINUX__) && !defined(__ANDROID__) ) || defined(__WINDOWS_PTHREAD__)
83 // log83 // log
84 EM_log( CK_LOG_FINER, "cancelling XThread: %u on thread: %u", (t_CKUINT)thread, (t_CKUINT)pthread_self() );84 EM_log( CK_LOG_FINER, "cancelling XThread [0x%x] on thread: 0x%x", (t_CKUINT)thread, (t_CKUINT)pthread_self() );
85 pthread_cancel(thread);85 pthread_cancel(thread);
86 pthread_join(thread, NULL);86 pthread_join(thread, NULL);
87 // log87 // log
88 EM_log( CK_LOG_FINER, "joined with XThread: %u on thread: %u", (t_CKUINT)thread, (t_CKUINT)pthread_self() );88 EM_log( CK_LOG_FINER, "joined with XThread [0x%x] on thread: 0x%x", (t_CKUINT)thread, (t_CKUINT)pthread_self() );
89#elif defined(__PLATFORM_WIN32__)89#elif defined(__PLATFORM_WIN32__)
90 TerminateThread((HANDLE)thread, 0);90 TerminateThread((HANDLE)thread, 0);
91#endif91#endif
@@ -295,11 +295,11 @@ void XWriteThread::shutdown() · 203 unmodified lines
295 SmartPushLog logPush;295 SmartPushLog logPush;
296 296
297 // log297 // log
298 EM_log( CK_LOG_FINER, "waiting on write thread: %u", (t_CKUINT)m_thread.getThread() );298 EM_log( CK_LOG_FINER, "waiting on write thread: 0x%x", (t_CKUINT)m_thread.getThread() );
299 // wait on the thread299 // wait on the thread
300 m_thread.wait( -1, false );300 m_thread.wait( -1, false );
301 // log301 // log
302 EM_log( CK_LOG_FINER, "done waiting for thread: %u", (t_CKUINT)m_thread.getThread() );302 EM_log( CK_LOG_FINER, "done waiting for thread: 0x%x", (t_CKUINT)m_thread.getThread() );
303}303}
304 304
305 305
@@ -492,7 +492,7 @@ t_CKBOOL XThreadUtil::set_priority( CHUCK_THREAD tid, t_CKINT priority ) · 186 unmodified lines
492 int policy;492 int policy;
493 493
494 // log494 // log
495 EM_log( CK_LOG_INFO, "setting thread priority to: %ld...", priority );495 EM_log( CK_LOG_INFO, "setting thread [0x%x] priority to: %ld...", (t_CKUINT)tid, priority );
496 496
497 // get for thread497 // get for thread
498 if( pthread_getschedparam( tid, &policy, &param) )498 if( pthread_getschedparam( tid, &policy, &param) )

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t