case ENOMEM:
throw std::bad_alloc();
default:
- isc_throw(isc::InvalidOperation, strerror(result));
+ isc_throw(isc::InvalidOperation, std::strerror(result));
}
Deinitializer deinitializer(attributes);
// TODO: Distinguish if debug mode is enabled in compilation.
// If so, it should be PTHREAD_MUTEX_NORMAL or NULL
result = pthread_mutexattr_settype(&attributes, PTHREAD_MUTEX_ERRORCHECK);
if (result != 0) {
- isc_throw(isc::InvalidOperation, strerror(result));
+ isc_throw(isc::InvalidOperation, std::strerror(result));
}
auto_ptr<Impl> impl(new Impl);
result = pthread_mutex_init(&impl->mutex, &attributes);
case EAGAIN:
throw std::bad_alloc();
default:
- isc_throw(isc::InvalidOperation, strerror(result));
+ isc_throw(isc::InvalidOperation, std::strerror(result));
}
}
assert(impl_ != NULL);
const int result = pthread_mutex_lock(&impl_->mutex);
if (result != 0) {
- isc_throw(isc::InvalidOperation, strerror(result));
+ isc_throw(isc::InvalidOperation, std::strerror(result));
}
++impl_->locked_count; // Only in debug mode
}
case EAGAIN:
throw std::bad_alloc();
default: // Other errors. They should not happen.
- isc_throw(isc::InvalidOperation, strerror(result));
+ isc_throw(isc::InvalidOperation, std::strerror(result));
}
}
const int result = pthread_join(impl_->tid_, NULL);
if (result != 0) {
- isc_throw(isc::InvalidOperation, strerror(result));
+ isc_throw(isc::InvalidOperation, std::strerror(result));
}
// Was there an exception in the thread?