A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix the liveness tests by ignoring the Comm ID memory that breaks the state equality...
[simgrid.git]
/
src
/
mc
/
remote
/
AppSide.hpp
diff --git
a/src/mc/remote/AppSide.hpp
b/src/mc/remote/AppSide.hpp
index 10088ea5bd3cf16c580e0764361265486acc6c7e..57189e65f039ad4af8e8c44597b783c44cded526 100644
(file)
--- a/
src/mc/remote/AppSide.hpp
+++ b/
src/mc/remote/AppSide.hpp
@@
-1,6
+1,6
@@
/* mc::remote::AppSide: the Application-side of the channel */
/* mc::remote::AppSide: the Application-side of the channel */
-/* Copyright (c) 2015-202
2
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2015-202
3
. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-12,8
+12,7
@@
#include <memory>
#include <memory>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** Model-checked-side of the communication protocol
*
/** Model-checked-side of the communication protocol
*
@@
-23,24
+22,31
@@
class XBT_PUBLIC AppSide {
private:
Channel channel_;
static std::unique_ptr<AppSide> instance_;
private:
Channel channel_;
static std::unique_ptr<AppSide> instance_;
+ bool need_memory_info_ = false; /* by default we don't send memory info, unless we got a NEED_MEMINFO */
+ std::unordered_map<int, int> child_statuses_;
public:
AppSide();
explicit AppSide(int fd) : channel_(fd) {}
public:
AppSide();
explicit AppSide(int fd) : channel_(fd) {}
- void handle_messages()
const
;
+ void handle_messages();
private:
void handle_deadlock_check(const s_mc_message_t* msg) const;
void handle_simcall_execute(const s_mc_message_simcall_execute_t* message) const;
private:
void handle_deadlock_check(const s_mc_message_t* msg) const;
void handle_simcall_execute(const s_mc_message_simcall_execute_t* message) const;
- void handle_actor_enabled(const s_mc_message_actor_enabled_t* msg) const;
void handle_finalize(const s_mc_message_int_t* msg) const;
void handle_finalize(const s_mc_message_int_t* msg) const;
+ void handle_fork(const s_mc_message_fork_t* msg);
+ void handle_wait_child(const s_mc_message_int_t* msg);
+ void handle_need_meminfo();
+ void handle_actors_status() const;
+ void handle_actors_maxpid() const;
public:
Channel const& get_channel() const { return channel_; }
Channel& get_channel() { return channel_; }
public:
Channel const& get_channel() const { return channel_; }
Channel& get_channel() { return channel_; }
- XBT_ATTRIB_NORETURN void main_loop()
const
;
- void report_assertion_failure()
const
;
+ XBT_ATTRIB_NORETURN void main_loop();
+ void report_assertion_failure();
void ignore_memory(void* addr, std::size_t size) const;
void ignore_memory(void* addr, std::size_t size) const;
+ void unignore_memory(void* addr, std::size_t size) const;
void ignore_heap(void* addr, std::size_t size) const;
void unignore_heap(void* addr, std::size_t size) const;
void declare_symbol(const char* name, int* value) const;
void ignore_heap(void* addr, std::size_t size) const;
void unignore_heap(void* addr, std::size_t size) const;
void declare_symbol(const char* name, int* value) const;
@@
-48,12
+54,9
@@
public:
void declare_stack(void* stack, size_t size, ucontext_t* context) const;
#endif
void declare_stack(void* stack, size_t size, ucontext_t* context) const;
#endif
- // Singleton :/
// TODO, remove the singleton antipattern.
// TODO, remove the singleton antipattern.
- static AppSide* initialize();
- static AppSide* get() { return instance_.get(); }
+ static AppSide* get();
};
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
#endif