From: Arnaud Giersch Date: Tue, 24 Oct 2017 17:04:12 +0000 (+0200) Subject: Rename method to avoid false positive with sonar. X-Git-Tag: v3.18~397^2~15 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e7f87282045aad5c82fee922140dc5c60320b87b?ds=sidebyside Rename method to avoid false positive with sonar. --- diff --git a/src/kernel/context/ContextUnix.cpp b/src/kernel/context/ContextUnix.cpp index 6574a74bb2..ea21e2579e 100644 --- a/src/kernel/context/ContextUnix.cpp +++ b/src/kernel/context/ContextUnix.cpp @@ -103,7 +103,7 @@ UContext::UContext(std::function code, void_pfn_smxprocess_t cleanup_fun this->uc_.uc_link = nullptr; this->uc_.uc_stack.ss_sp = sg_makecontext_stack_addr(this->stack_); this->uc_.uc_stack.ss_size = sg_makecontext_stack_size(smx_context_usable_stack_size); - UContext::makecontext(&this->uc_, UContext::wrapper, this); + UContext::make_ctx(&this->uc_, UContext::wrapper, this); } else { if (process != nullptr && maestro_context_ == nullptr) maestro_context_ = this; @@ -131,11 +131,11 @@ void UContext::wrapper(int i1, int i2) * Makecontext expects integer arguments, we the context variable is decomposed into a serie of integers and each * integer is passed as argument to makecontext. */ -void UContext::makecontext(ucontext_t* ucp, void (*func)(int, int), UContext* arg) +void UContext::make_ctx(ucontext_t* ucp, void (*func)(int, int), UContext* arg) { int ctx_addr[CTX_ADDR_LEN]{}; memcpy(ctx_addr, &arg, sizeof arg); - ::makecontext(ucp, (void (*)())func, 2, ctx_addr[0], ctx_addr[1]); + makecontext(ucp, (void (*)())func, 2, ctx_addr[0], ctx_addr[1]); } void UContext::stop() diff --git a/src/kernel/context/ContextUnix.hpp b/src/kernel/context/ContextUnix.hpp index 256fcc0c0e..91badf2d55 100644 --- a/src/kernel/context/ContextUnix.hpp +++ b/src/kernel/context/ContextUnix.hpp @@ -41,7 +41,7 @@ private: ucontext_t uc_; /* the ucontext that executes the code */ static void wrapper(int, int); - static void makecontext(ucontext_t* ucp, void (*func)(int, int), UContext* arg); + static void make_ctx(ucontext_t* ucp, void (*func)(int, int), UContext* arg); }; class SerialUContext : public UContext {