mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
fix errors
This commit is contained in:
parent
40eafcfd2a
commit
dd29ed5d1f
@ -37,7 +37,7 @@ public:
|
||||
}
|
||||
|
||||
bool valid() const noexcept {
|
||||
static const tmp[sizeof(pthread_mutex_t)] {};
|
||||
static const char tmp[sizeof(pthread_mutex_t)] {};
|
||||
return shm_.valid()
|
||||
&& (mutex_ != nullptr)
|
||||
&& (std::memcmp(tmp, mutex_, sizeof(pthread_mutex_t)) != 0);
|
||||
|
||||
@ -90,7 +90,7 @@ std::uint32_t get_ref(id_t id) {
|
||||
if (ii->mem_ == nullptr || ii->size_ == 0) {
|
||||
return 0;
|
||||
}
|
||||
return acc_of(mem, ii->size_).load(std::memory_order_acquire);
|
||||
return acc_of(ii->mem_, ii->size_).load(std::memory_order_acquire);
|
||||
}
|
||||
|
||||
void sub_ref(id_t id) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user