Changeset 7376
- Timestamp:
- 09/07/07 17:26:18
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OpenThreads/trunk/src/OpenThreads/pthreads/PThread.c++
r7330 r7376 22 22 #include <unistd.h> 23 23 #include <pthread.h> 24 #include <assert.h>25 24 26 25 #if defined __linux || defined __sun || defined __APPLE__ … … 142 141 // Set local storage so that Thread::CurrentThread() can return the right thing 143 142 int status = pthread_setspecific(PThreadPrivateData::s_tls_key, thread); 144 assert(status == 0); 143 if (status) 144 { 145 printf("Error: pthread_setspecific(,) returned error status, status = %d\n",status); 146 } 145 147 146 148 pthread_cleanup_push(thread_cleanup_handler, &tcs); … … 427 429 // Allocate a key to be used to access thread local storage 428 430 int status = pthread_key_create(&PThreadPrivateData::s_tls_key, NULL); 429 assert(status == 0); 431 if (status) 432 { 433 printf("Error: pthread_key_create(,) returned error status, status = %d\n",status); 434 } 430 435 431 436 #ifdef ALLOW_PRIORITY_SCHEDULING OpenThreads/trunk/src/OpenThreads/pthreads/PThreadCondition.c++
r6584 r7376 24 24 #endif 25 25 26 #include <assert.h> 26 #include <stdio.h> 27 27 28 #include <OpenThreads/Condition> 28 29 #include "PThreadConditionPrivateData.h" … … 86 87 87 88 int status = pthread_cond_init( &pd->condition, NULL ); 88 assert(status == 0); 89 if (status) 90 { 91 printf("Error: pthread_cond_init(,) returned error status, status = %d\n",status); 92 } 89 93 90 94 _prvData = static_cast<void *>(pd); … … 104 108 105 109 int status = pthread_cond_destroy( &pd->condition ); 106 assert(status == 0); 110 if (status) 111 { 112 printf("Error: pthread_cond_destroy(,) returned error status, status = %d\n",status); 113 } 107 114 108 115 delete pd;
