Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion examples/c_supervised_app/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int main(void)
return EXIT_FAILURE;
}

if (score_lcm_report_running() != 0)
if (score_mw_lifecycle_report_running() != 0)
{
fprintf(stderr, "Failed to report running state\n");
score_lcm_alive_deinitialize(alive);
Expand Down
2 changes: 1 addition & 1 deletion examples/rust_supervised_app/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn main_logic(args: &Args, stop: Arc<AtomicBool>) -> Result<(), Box<dyn std::err

hm.start();

if !lifecycle_client_rs::report_execution_state_running() {
if !lifecycle_client_rs::report_running() {
error!("Rust app FAILED to report execution state!");
return Err("Failed to report execution state".into());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void score::mw::lifecycle::report_running() noexcept {
extern "C" {
#endif

int8_t score_lcm_report_running(void) {
int8_t score_mw_lifecycle_report_running(void) {
// RULECHECKER_comment(1, 2, check_static_object_dynamic_initialization, "static variable is in function scope so this initialization is safe", false)
static score::mw::lifecycle::ReportRunningImpl g_impl{};
const auto result = g_impl.ReportRunningState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extern "C" {

/// @brief Signals to the Launch Manager that this process has finished initialization and is now running.
/// @return 0 on success, -1 on failure
int8_t score_lcm_report_running(void);
int8_t score_mw_lifecycle_report_running(void);

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
// *******************************************************************************
pub mod lifecycle;

pub use lifecycle::report_execution_state_running;
pub use lifecycle::report_running;
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ use libc::c_int;

#[link(name = "report_running")]
unsafe extern "C" {
fn score_lcm_report_running() -> c_int;
fn score_mw_lifecycle_report_running() -> c_int;
}

pub fn report_execution_state_running() -> bool {
unsafe { score_lcm_report_running() == 0 }
pub fn report_running() -> bool {
unsafe { score_mw_lifecycle_report_running() == 0 }
}
Loading