Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unused private field warning of FastPthreadMutex #2839

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/bthread/mutex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ void submit_contention(const bthread_contention_site_t& csite, int64_t now_ns) {
}

#if BRPC_DEBUG_LOCK
#define MUTEX_RESET_OWNER_COMMON(owner) \
#define MUTEX_RESET_OWNER_COMMON(owner) \
((butil::atomic<bool>*)&(owner).hold) \
->store(false, butil::memory_order_relaxed)

Expand All @@ -678,9 +678,9 @@ void submit_contention(const bthread_contention_site_t& csite, int64_t now_ns) {
<< std::endl << trace.ToString(); \
}
#else
#define MUTEX_RESET_OWNER_COMMON(owner) ((void)0)
#define PTHREAD_MUTEX_SET_OWNER(owner) ((void)0)
#define PTHREAD_MUTEX_CHECK_OWNER(owner) ((void)0)
#define MUTEX_RESET_OWNER_COMMON(owner) ((void)owner)
#define PTHREAD_MUTEX_SET_OWNER(owner) ((void)owner)
#define PTHREAD_MUTEX_CHECK_OWNER(owner) ((void)owner)
#endif // BRPC_DEBUG_LOCK

namespace internal {
Expand Down
Loading