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
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git]
/
include
/
simgrid
/
s4u
/
Activity.hpp
diff --git
a/include/simgrid/s4u/Activity.hpp
b/include/simgrid/s4u/Activity.hpp
index
67fcbd5
..
06933c1
100644
(file)
--- a/
include/simgrid/s4u/Activity.hpp
+++ b/
include/simgrid/s4u/Activity.hpp
@@
-9,7
+9,7
@@
#include <simgrid/s4u/forward.hpp>
#include <simgrid/forward.h>
#include <simgrid/s4u/forward.hpp>
#include <simgrid/forward.h>
-
typedef enum { inited = 0, started, canceled, errored, finished } e_s4u_activity_state_t
;
+
enum e_s4u_activity_state_t { inited = 0, started, canceled, errored, finished }
;
namespace simgrid {
namespace s4u {
namespace simgrid {
namespace s4u {
@@
-22,6
+22,9
@@
XBT_PUBLIC_CLASS Activity {
friend Comm;
friend void intrusive_ptr_release(Comm * c);
friend void intrusive_ptr_add_ref(Comm * c);
friend Comm;
friend void intrusive_ptr_release(Comm * c);
friend void intrusive_ptr_add_ref(Comm * c);
+ friend Exec;
+ friend void intrusive_ptr_release(Exec * e);
+ friend void intrusive_ptr_add_ref(Exec * e);
protected:
Activity() = default;
protected:
Activity() = default;
@@
-49,11
+52,11
@@
public:
e_s4u_activity_state_t getState() {return state_;}
/** Get the remaining amount of work that this Activity entails. When it's 0, it's done. */
e_s4u_activity_state_t getState() {return state_;}
/** Get the remaining amount of work that this Activity entails. When it's 0, it's done. */
-
size_t
getRemains();
+
double
getRemains();
/** Set the [remaining] amount of work that this Activity will entail
*
* It is forbidden to change the amount of work once the Activity is started */
/** Set the [remaining] amount of work that this Activity will entail
*
* It is forbidden to change the amount of work once the Activity is started */
- void setRemains(
size_t
remains);
+ void setRemains(
double
remains);
/** Put some user data onto the Activity */
void setUserData(void *data) {userData_=data;}
/** Put some user data onto the Activity */
void setUserData(void *data) {userData_=data;}
@@
-63,7
+66,7
@@
public:
private:
simgrid::kernel::activity::ActivityImplPtr pimpl_ = nullptr;
e_s4u_activity_state_t state_ = inited;
private:
simgrid::kernel::activity::ActivityImplPtr pimpl_ = nullptr;
e_s4u_activity_state_t state_ = inited;
-
size_t remains_
= 0;
+
double remains_
= 0;
void *userData_ = nullptr;
}; // class
void *userData_ = nullptr;
}; // class