/*! creates thread local storage */ tls_t createTls() { pthread_key_t* key = new pthread_key_t; if (pthread_key_create(key,NULL) != 0) THROW_RUNTIME_ERROR("pthread_key_create"); return tls_t(key); }
/*! creates thread local storage */ tls_t createTls() { pthread_key_t* key = new pthread_key_t; if (pthread_key_create(key,NULL) != 0) throw std::runtime_error("pthread_key_create"); return tls_t(key); }
/*! creates thread local storage */ tls_t createTls() { return tls_t(size_t(TlsAlloc())); }