#include <cstdlib>
#include <folly/Portability.h>
#include <mutex>
-#include <pthread.h>
#include <type_traits>
#include <glog/logging.h>
*/
void init(IntType initialValue = 0) {
CHECK(!(initialValue & kLockBitMask_));
- lock_ = initialValue;
+ lock_ = UIntType(initialValue);
}
/*
*/
void setData(IntType w) {
CHECK(!(w & kLockBitMask_));
- lock_ = (lock_ & kLockBitMask_) | w;
+ lock_ = UIntType((lock_ & kLockBitMask_) | w);
}
/*