RWMutexImpl::~RWMutexImpl()
{
pthread_rwlock_t* rwlock = static_cast<pthread_rwlock_t*>(data_);
- assert(rwlock != 0);
+ assert(rwlock != nullptr);
pthread_rwlock_destroy(rwlock);
free(rwlock);
}
RWMutexImpl::reader_acquire()
{
pthread_rwlock_t* rwlock = static_cast<pthread_rwlock_t*>(data_);
- assert(rwlock != 0);
+ assert(rwlock != nullptr);
int errorcode = pthread_rwlock_rdlock(rwlock);
return errorcode == 0;
RWMutexImpl::reader_release()
{
pthread_rwlock_t* rwlock = static_cast<pthread_rwlock_t*>(data_);
- assert(rwlock != 0);
+ assert(rwlock != nullptr);
int errorcode = pthread_rwlock_unlock(rwlock);
return errorcode == 0;
RWMutexImpl::writer_acquire()
{
pthread_rwlock_t* rwlock = static_cast<pthread_rwlock_t*>(data_);
- assert(rwlock != 0);
+ assert(rwlock != nullptr);
int errorcode = pthread_rwlock_wrlock(rwlock);
return errorcode == 0;
RWMutexImpl::writer_release()
{
pthread_rwlock_t* rwlock = static_cast<pthread_rwlock_t*>(data_);
- assert(rwlock != 0);
+ assert(rwlock != nullptr);
int errorcode = pthread_rwlock_unlock(rwlock);
return errorcode == 0;