summaryrefslogtreecommitdiff
path: root/src/thread.cc
diff options
context:
space:
mode:
authordeva <deva>2006-01-10 10:03:41 +0000
committerdeva <deva>2006-01-10 10:03:41 +0000
commit495330ce3cfb6b168d2fb9b56aa125bbc7ff6e7d (patch)
tree45cb7dc618e05a21657790e17b617a664652dae1 /src/thread.cc
parentcaa558e59c248521d1d4ad483fe669828277664e (diff)
*** empty log message ***
Diffstat (limited to 'src/thread.cc')
-rw-r--r--src/thread.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/thread.cc b/src/thread.cc
index 2791c53..147cf00 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -36,17 +36,21 @@ static void* thread_run(void *data) {
}
Thread::Thread()
-{}
+{
+}
Thread::~Thread()
-{}
+{
+}
void Thread::run()
{
- pthread_create (&tid, NULL, thread_run, this);
+ pthread_attr_init(&attr);
+
+ pthread_create(&tid, &attr, thread_run, this);
}
void Thread::wait_stop()
{
- pthread_join (tid, NULL);
+ pthread_join(tid, NULL);
}