From a386fc5dfa186d888d03ec05868967cfd35ddd14 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 22 Jul 2008 12:38:08 -0700 Subject: [PATCH] thread: start/stop debugging --- src/common/Thread.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/Thread.h b/src/common/Thread.h index 24876f7f12427..018686fff5668 100644 --- a/src/common/Thread.h +++ b/src/common/Thread.h @@ -56,7 +56,9 @@ class Thread { } int create() { _num_threads.inc(); - return pthread_create( &thread_id, NULL, _entry_func, (void*)this ); + int r = pthread_create( &thread_id, NULL, _entry_func, (void*)this ); + generic_dout(10) << "thread " << thread_id << " start" << dendl; + return r; } int join(void **prval = 0) { if (thread_id == 0) { @@ -83,6 +85,7 @@ class Thread { } assert(0); // none of these should happen. } + generic_dout(10) << "thread " << thread_id << " stop" << dendl; thread_id = 0; return status; } -- 2.39.5