summaryrefslogtreecommitdiff
path: root/muse2/muse/thread.cpp
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2011-02-13 22:55:46 +0000
committerTim E. Real <termtech@rogers.com>2011-02-13 22:55:46 +0000
commitc929c936dcfec395c57b0a1836708caa961092f9 (patch)
tree4df8263200b3c7c492c0e157a3915a134188a74c /muse2/muse/thread.cpp
parentb1c3f0d7ccce8feafa9f043aa5a4ee32bc78624e (diff)
Correction: Check pthread_create return value, not handle. Test OK.
Diffstat (limited to 'muse2/muse/thread.cpp')
-rw-r--r--muse2/muse/thread.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/muse2/muse/thread.cpp b/muse2/muse/thread.cpp
index 8e89a862..67daf07b 100644
--- a/muse2/muse/thread.cpp
+++ b/muse2/muse/thread.cpp
@@ -100,7 +100,7 @@ void Thread::start(int prio, void* ptr)
int rv = pthread_create(&thread, attributes, ::loop, this);
- if(!thread)
+ if(rv)
{
// p4.0.16: realTimeScheduling is unreliable. It is true even in some clearly non-RT cases.
// I cannot seem to find a reliable answer to the question of "are we RT or not".
@@ -110,7 +110,7 @@ void Thread::start(int prio, void* ptr)
rv = pthread_create(&thread, NULL, ::loop, this);
}
- if(rv || !thread)
+ if(rv)
fprintf(stderr, "creating thread <%s> failed: %s\n", _name, strerror(rv));
if (attributes) // p4.0.16