diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2006-03-12 16:32:53 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2006-03-12 16:32:53 +0000 |
commit | 3abd9ebe48693d27ef125a855f5523b369f99e67 (patch) | |
tree | fe9b8a04a572a1f0d4e33561b88f2c150c7363c7 /ace/TSS_T.cpp | |
parent | 7dc78bfd51ae7fda2f5e4cc6c90a7a2bab53cced (diff) | |
download | ATCD-3abd9ebe48693d27ef125a855f5523b369f99e67.tar.gz |
ChangeLogTag:Sun Mar 12 09:10:01 2006 Douglas C. Schmidt <schmidt@cse.wustl.edu>
Diffstat (limited to 'ace/TSS_T.cpp')
-rw-r--r-- | ace/TSS_T.cpp | 97 |
1 files changed, 49 insertions, 48 deletions
diff --git a/ace/TSS_T.cpp b/ace/TSS_T.cpp index 93897437e64..fbafd717802 100644 --- a/ace/TSS_T.cpp +++ b/ace/TSS_T.cpp @@ -195,8 +195,8 @@ ACE_TSS<TYPE>::ts_get (void) const ACE_TSS_Adapter *tss_adapter = 0; // Get the adapter from thread-specific storage - if (ACE_Thread::getspecific (this->key_, - (void **) &tss_adapter) == -1) + void *temp = tss_adapter; // Need this temp to keep G++ from complaining. + if (ACE_Thread::getspecific (this->key_, &temp) == -1) return 0; // This should not happen! // Check to see if this is the first time in for this thread. @@ -204,8 +204,8 @@ ACE_TSS<TYPE>::ts_get (void) const #else // Get the ts_obj from thread-specific storage. Note that no locks // are required here... - if (ACE_Thread::getspecific (this->key_, - (void **) &ts_obj) == -1) + void *temp = ts_obj; // Need this temp to keep G++ from complaining. + if (ACE_Thread::getspecific (this->key_, &temp) == -1) return 0; // This should not happen! // Check to see if this is the first time in for this thread. @@ -274,15 +274,15 @@ ACE_TSS<TYPE>::ts_object (void) const ACE_TSS_Adapter *tss_adapter = 0; // Get the tss adapter from thread-specific storage - if (ACE_Thread::getspecific (this->key_, - (void **) &tss_adapter) == -1) + void *temp = tss_adapter; // Need this temp to keep G++ from complaining. + if (ACE_Thread::getspecific (this->key_, &temp) == -1) return 0; // This should not happen! else if (tss_adapter != 0) // Extract the real TS object. ts_obj = (TYPE *) tss_adapter->ts_obj_; #else - if (ACE_Thread::getspecific (this->key_, - (void **) &ts_obj) == -1) + void *temp = ts_obj; // Need this temp to keep G++ from complaining. + if (ACE_Thread::getspecific (this->key_, &temp) == -1) return 0; // This should not happen! #endif /* ACE_HAS_THR_C_DEST */ @@ -310,8 +310,8 @@ ACE_TSS<TYPE>::ts_object (TYPE *new_ts_obj) #if defined (ACE_HAS_THR_C_DEST) ACE_TSS_Adapter *tss_adapter = 0; - if (ACE_Thread::getspecific (this->key_, - (void **) &tss_adapter) == -1) + void *temp = tss_adapter; // Need this temp to keep G++ from complaining. + if (ACE_Thread::getspecific (this->key_, &temp) == -1) return 0; // This should not happen! if (tss_adapter != 0) @@ -332,8 +332,9 @@ ACE_TSS<TYPE>::ts_object (TYPE *new_ts_obj) return ts_obj; // This should not happen! } #else + void *temp = ts_obj; // Need this temp to keep G++ from complaining. if (ACE_Thread::getspecific (this->key_, - (void **) &ts_obj) == -1) + &temp) == -1) return 0; // This should not happen! if (ACE_Thread::setspecific (this->key_, (void *) new_ts_obj) == -1) @@ -389,12 +390,12 @@ ACE_TSS_Guard<ACE_LOCK>::release (void) #if defined (ACE_HAS_THR_C_DEST) ACE_TSS_Adapter *tss_adapter = 0; - ACE_Thread::getspecific (this->key_, - (void **) &tss_adapter); - guard = (ACE_Guard<ACE_LOCK> *)tss_adapter->ts_obj_; + void *temp = tss_adapter; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); + guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_; #else - ACE_Thread::getspecific (this->key_, - (void **) &guard); + void *temp = guard; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); #endif /* ACE_HAS_THR_C_DEST */ return guard->release (); @@ -409,12 +410,12 @@ ACE_TSS_Guard<ACE_LOCK>::remove (void) #if defined (ACE_HAS_THR_C_DEST) ACE_TSS_Adapter *tss_adapter = 0; - ACE_Thread::getspecific (this->key_, - (void **) &tss_adapter); + void *temp = tss_adapter; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_; #else - ACE_Thread::getspecific (this->key_, - (void **) &guard); + void *temp = guard; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); #endif /* ACE_HAS_THR_C_DEST */ return guard->remove (); @@ -429,12 +430,12 @@ ACE_TSS_Guard<ACE_LOCK>::~ACE_TSS_Guard (void) #if defined (ACE_HAS_THR_C_DEST) ACE_TSS_Adapter *tss_adapter = 0; - ACE_Thread::getspecific (this->key_, - (void **) &tss_adapter); + void *temp = tss_adapter; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_; #else - ACE_Thread::getspecific (this->key_, - (void **) &guard); + void *temp = guard; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); #endif /* ACE_HAS_THR_C_DEST */ // Make sure that this pointer is NULL when we shut down... @@ -486,12 +487,12 @@ ACE_TSS_Guard<ACE_LOCK>::acquire (void) #if defined (ACE_HAS_THR_C_DEST) ACE_TSS_Adapter *tss_adapter = 0; - ACE_Thread::getspecific (this->key_, - (void **) &tss_adapter); + void *temp = tss_adapter; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_; #else - ACE_Thread::getspecific (this->key_, - (void **) &guard); + void *temp = guard; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); #endif /* ACE_HAS_THR_C_DEST */ return guard->acquire (); @@ -506,12 +507,12 @@ ACE_TSS_Guard<ACE_LOCK>::tryacquire (void) #if defined (ACE_HAS_THR_C_DEST) ACE_TSS_Adapter *tss_adapter = 0; - ACE_Thread::getspecific (this->key_, - (void **) &tss_adapter); + void *temp = tss_adapter; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_; #else - ACE_Thread::getspecific (this->key_, - (void **) &guard); + void *temp = guard; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); #endif /* ACE_HAS_THR_C_DEST */ return guard->tryacquire (); @@ -551,12 +552,12 @@ ACE_TSS_Write_Guard<ACE_LOCK>::acquire (void) #if defined (ACE_HAS_THR_C_DEST) ACE_TSS_Adapter *tss_adapter = 0; - ACE_Thread::getspecific (this->key_, - (void **) &tss_adapter); + void *temp = tss_adapter; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_; #else - ACE_Thread::getspecific (this->key_, - (void **) &guard); + void *temp = guard; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); #endif /* ACE_HAS_THR_C_DEST */ return guard->acquire_write (); @@ -571,12 +572,12 @@ ACE_TSS_Write_Guard<ACE_LOCK>::tryacquire (void) #if defined (ACE_HAS_THR_C_DEST) ACE_TSS_Adapter *tss_adapter = 0; - ACE_Thread::getspecific (this->key_, - (void **) &tss_adapter); + void *temp = tss_adapter; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_; #else - ACE_Thread::getspecific (this->key_, - (void **) &guard); + void *temp = guard; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, temp); #endif /* ACE_HAS_THR_C_DEST */ return guard->tryacquire_write (); @@ -639,12 +640,12 @@ ACE_TSS_Read_Guard<ACE_LOCK>::acquire (void) #if defined (ACE_HAS_THR_C_DEST) ACE_TSS_Adapter *tss_adapter = 0; - ACE_Thread::getspecific (this->key_, - (void **) &tss_adapter); + void *temp = tss_adapter; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_; #else - ACE_Thread::getspecific (this->key_, - (void **) &guard); + void *temp = guard; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); #endif /* ACE_HAS_THR_C_DEST */ return guard->acquire_read (); @@ -659,12 +660,12 @@ ACE_TSS_Read_Guard<ACE_LOCK>::tryacquire (void) #if defined (ACE_HAS_THR_C_DEST) ACE_TSS_Adapter *tss_adapter = 0; - ACE_Thread::getspecific (this->key_, - (void **) &tss_adapter); + void *temp = tss_adapter; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_; #else - ACE_Thread::getspecific (this->key_, - (void **) &guard); + void *temp = guard; // Need this temp to keep G++ from complaining. + ACE_Thread::getspecific (this->key_, &temp); #endif /* ACE_HAS_THR_C_DEST */ return guard->tryacquire_read (); |