Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Peguen
Copy link
Contributor

@Peguen Peguen commented Sep 5, 2025

Description

  • adding process state structure as types
  • handling global process state with mutexes

Related issues

@Peguen Peguen added the cherry-pick-to-support/v6.0 Cherry pick these changes to support/v6.0 label Sep 5, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

* @brief Definition of process datatypes.
**/

#include <string>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'string' file not found [clang-diagnostic-error]

#include <string>
         ^


#include "ecal/process_severity.h"

namespace eCAL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: variable 'eCAL' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

namespace eCAL
          ^


eCAL::Process::eSeverity g_process_severity(eCAL::Process::eSeverity::unknown);
eCAL::Process::eSeverityLevel g_process_severity_level(eCAL::Process::eSeverityLevel::level1);
Types::Process::SProcessState g_process_state;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: variable 'g_process_state' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

  Types::Process::SProcessState g_process_state;
                                ^

eCAL::Process::eSeverity g_process_severity(eCAL::Process::eSeverity::unknown);
eCAL::Process::eSeverityLevel g_process_severity_level(eCAL::Process::eSeverityLevel::level1);
Types::Process::SProcessState g_process_state;
std::mutex g_process_state_mutex;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: variable 'g_process_state_mutex' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

  std::mutex                    g_process_state_mutex;
                                ^


extern eCAL::Process::eSeverity g_process_severity;
extern eCAL::Process::eSeverityLevel g_process_severity_level;
extern Types::Process::SProcessState g_process_state;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: variable 'g_process_state' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

  extern Types::Process::SProcessState g_process_state;
                                       ^

extern eCAL::Process::eSeverity g_process_severity;
extern eCAL::Process::eSeverityLevel g_process_severity_level;
extern Types::Process::SProcessState g_process_state;
extern std::mutex g_process_state_mutex;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: variable 'g_process_state_mutex' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

  extern std::mutex                    g_process_state_mutex;
                                       ^

@Peguen Peguen merged commit 361cf9a into master Sep 5, 2025
29 checks passed
@Peguen Peguen deleted the feature/process_state_struct branch September 5, 2025 14:01
Peguen added a commit that referenced this pull request Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-to-support/v6.0 Cherry pick these changes to support/v6.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eCAL::Process::SetState() is not threadsafe

2 participants