Ticket #2100: boost_thread_BOOST_NO_EXCEPTIONS_20110306.diff
File boost_thread_BOOST_NO_EXCEPTIONS_20110306.diff, 3.1 KB (added by , 12 years ago) |
---|
-
pthread/thread_data.hpp
83 83 84 84 void check_for_interruption() 85 85 { 86 #ifndef BOOST_NO_EXCEPTIONS 86 87 if(thread_info->interrupt_requested) 87 88 { 88 89 thread_info->interrupt_requested=false; 89 90 throw thread_interrupted(); 90 91 } 92 #endif 91 93 } 92 94 93 95 void operator=(interruption_checker&); -
win32/thread_heap_alloc.hpp
75 75 inline T* heap_new() 76 76 { 77 77 void* const heap_memory=allocate_raw_heap_memory(sizeof(T)); 78 #ifndef BOOST_NO_EXCEPTIONS 78 79 try 80 #endif 79 81 { 80 82 T* const data=new (heap_memory) T(); 81 83 return data; 82 84 } 85 #ifndef BOOST_NO_EXCEPTIONS 83 86 catch(...) 84 87 { 85 88 free_raw_heap_memory(heap_memory); 86 89 throw; 87 90 } 91 #endif 88 92 } 89 93 90 94 #ifndef BOOST_NO_RVALUE_REFERENCES … … 171 175 inline T* heap_new_impl(A1 a1,A2 a2) 172 176 { 173 177 void* const heap_memory=allocate_raw_heap_memory(sizeof(T)); 178 #ifndef BOOST_NO_EXCEPTIONS 174 179 try 180 #endif 175 181 { 176 182 T* const data=new (heap_memory) T(a1,a2); 177 183 return data; 178 184 } 185 #ifndef BOOST_NO_EXCEPTIONS 179 186 catch(...) 180 187 { 181 188 free_raw_heap_memory(heap_memory); 182 189 throw; 183 190 } 191 #endif 184 192 } 185 193 186 194 template<typename T,typename A1,typename A2,typename A3> … … 203 211 inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4) 204 212 { 205 213 void* const heap_memory=allocate_raw_heap_memory(sizeof(T)); 214 #ifndef BOOST_NO_EXCEPTIONS 206 215 try 216 #endif 207 217 { 208 218 T* const data=new (heap_memory) T(a1,a2,a3,a4); 209 219 return data; 210 220 } 221 #ifndef BOOST_NO_EXCEPTIONS 211 222 catch(...) 212 223 { 213 224 free_raw_heap_memory(heap_memory); 214 225 throw; 215 226 } 227 #endif 216 228 } 217 229 218 230 -
win32/once.hpp
136 136 status=BOOST_INTERLOCKED_COMPARE_EXCHANGE(&flag.status,running_value,0); 137 137 if(!status) 138 138 { 139 #ifndef BOOST_NO_EXCEPTIONS 139 140 try 141 #endif 140 142 { 141 143 if(!event_handle) 142 144 { … … 164 166 } 165 167 break; 166 168 } 169 #ifndef BOOST_NO_EXCEPTIONS 167 170 catch(...) 168 171 { 169 172 BOOST_INTERLOCKED_EXCHANGE(&flag.status,0); … … 177 180 } 178 181 throw; 179 182 } 183 #endif 180 184 } 181 185 182 186 if(!counted)