fix:Change the function name CheckInstanceIsExiting to CheckInstanceException

Signed-off-by: weimengxue <weimengxue1@h-partners.com>
This commit is contained in:
weimengxue 2024-10-08 03:26:20 +00:00
parent d5e6822168
commit 9b73f703cd
3 changed files with 8 additions and 8 deletions

View File

@ -54,7 +54,7 @@ public:
static bool UpdateSendRequestCount(int delta);
static bool CheckInstanceIsExiting(std::atomic<uint32_t> &flag);
static bool IsInstanceException(std::atomic<uint32_t> &flag);
bool IsSendRequesting();

View File

@ -109,7 +109,7 @@ void IPCThreadSkeleton::SaveThreadName(const std::string &name)
if (current == nullptr) {
return;
}
if (CheckInstanceIsExiting(current->exitFlag_)) {
if (IsInstanceException(current->exitFlag_)) {
return;
}
current->threadName_ = name;
@ -123,7 +123,7 @@ IPCThreadSkeleton *IPCThreadSkeleton::GetCurrent()
void *curTLS = pthread_getspecific(TLSKey_);
if (curTLS != nullptr) {
current = reinterpret_cast<IPCThreadSkeleton *>(curTLS);
if (CheckInstanceIsExiting(current->exitFlag_)) {
if (IsInstanceException(current->exitFlag_)) {
return nullptr;
}
GetVaildInstance(current);
@ -167,7 +167,7 @@ IPCThreadSkeleton::~IPCThreadSkeleton()
}
}
bool IPCThreadSkeleton::CheckInstanceIsExiting(std::atomic<uint32_t> &flag)
bool IPCThreadSkeleton::IsInstanceException(std::atomic<uint32_t> &flag)
{
if (flag == INVOKER_USE_MAGIC) {
return false;
@ -193,7 +193,7 @@ IRemoteInvoker *IPCThreadSkeleton::GetRemoteInvoker(int proto)
if (current == nullptr) {
return nullptr;
}
if (CheckInstanceIsExiting(current->exitFlag_)) {
if (IsInstanceException(current->exitFlag_)) {
return nullptr;
}
@ -286,7 +286,7 @@ bool IPCThreadSkeleton::UpdateSendRequestCount(int delta)
if (current == nullptr) {
return false;
}
if (CheckInstanceIsExiting(current->exitFlag_)) {
if (IsInstanceException(current->exitFlag_)) {
return false;
}
current->sendRequestCount_ += delta;

View File

@ -70,7 +70,7 @@ bool BrokerRegistration::Register(const std::u16string &descriptor, const Constr
for (; iter != objects_.end();) {
std::string soPath = GetObjectSoPath(iter->first);
if (soPath.empty() || (soPath != iter->second)) {
ZLOGW(LABEL, "path:%{public}s is dlcosed", iter->second.c_str());
ZLOGW(LABEL, "path:%{public}s is dlclosed", iter->second.c_str());
iter = objects_.erase(iter);
continue;
}
@ -109,7 +109,7 @@ void BrokerRegistration::Unregister(const std::u16string &descriptor)
for (auto iter = objects_.begin(); iter != objects_.end();) {
std::string soPath = GetObjectSoPath(iter->first);
if (soPath.empty() || (soPath != iter->second)) {
ZLOGW(LABEL, "path:%{public}s is dlcosed", iter->second.c_str());
ZLOGW(LABEL, "path:%{public}s is dlclosed", iter->second.c_str());
iter = objects_.erase(iter);
continue;
}