Skip to content

Commit c9d258e

Browse files
Move mutex lock, add context config (#237)
Co-authored-by: Nicolas Fußberger <145956508+NicolasFussberger@users.noreply.github.com>
1 parent 748a9d3 commit c9d258e

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

score/launch_manager/daemon/src/process_group_manager/details/graph.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515

1616
#include <score/span.hpp>
1717

18+
#include "score/mw/launch_manager/common/log.hpp"
1819
#include "score/mw/launch_manager/process_group_manager/details/graph.hpp"
19-
#include "score/mw/launch_manager/process_group_manager/process_group_manager.hpp"
2020
#include "score/mw/launch_manager/process_group_manager/details/process_info_node.hpp"
21-
#include "score/mw/launch_manager/common/log.hpp"
21+
#include "score/mw/launch_manager/process_group_manager/process_group_manager.hpp"
2222

2323
namespace score
2424
{
@@ -275,10 +275,7 @@ bool Graph::startTransition(ProcessGroupStateID pg_state)
275275

276276
if (nullptr != process_index_list)
277277
{
278-
{
279-
std::shared_lock lock(transition_completion_mutex_);
280-
setState(GraphState::kInTransition);
281-
}
278+
setState(GraphState::kInTransition);
282279

283280
if (GraphState::kInTransition == getState())
284281
{
@@ -532,6 +529,8 @@ void Graph::setLastExecutionError(uint32_t code)
532529

533530
IdentifierHash Graph::setPendingState(IdentifierHash new_state)
534531
{
532+
std::shared_lock lock(transition_completion_mutex_);
533+
535534
IdentifierHash result_state = pending_state_;
536535

537536
pending_state_ = new_state;

tests/utils/environments/ecu_logging_config.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,15 @@
33
"appId": "LM",
44
"logLevel": "kDebug",
55
"logLevelThresholdConsole": "kDebug",
6-
"logMode": "kConsole"
7-
}
6+
"logMode": "kConsole",
7+
"contextConfigs":[
8+
{
9+
"name": "LM",
10+
"logLevel": "kDebug"
11+
},
12+
{
13+
"name": "Sprv",
14+
"logLevel": "kDebug"
15+
}
16+
]
17+
}

0 commit comments

Comments
 (0)