git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@823 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
4e1a4a03d8
commit
239b181bc7
16 changed files with 352 additions and 57 deletions
|
|
@ -37,6 +37,7 @@
|
|||
#ifndef __cooperative_h
|
||||
#define __cooperative_h
|
||||
|
||||
#include <vector>
|
||||
#include "communicable.h"
|
||||
#include "runner.h"
|
||||
|
||||
|
|
@ -54,10 +55,20 @@ public :
|
|||
|
||||
virtual void unpack () = 0;
|
||||
|
||||
void send (Cooperative * __coop);
|
||||
virtual void packSynchronizeReq () = 0;
|
||||
|
||||
void send (Cooperative * __coop);
|
||||
|
||||
void synchronizeCoopEx ();
|
||||
|
||||
virtual void notifySending ();
|
||||
|
||||
virtual void notifyReceiving ();
|
||||
|
||||
virtual void notifySendingSyncReq ();
|
||||
|
||||
virtual void notifySynchronized ();
|
||||
|
||||
private :
|
||||
|
||||
Runner * owner;
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ extern void initRunnersEnv ();
|
|||
extern void initWorkersEnv ();
|
||||
|
||||
extern void initScheduler ();
|
||||
extern void initSynchron ();
|
||||
|
||||
|
||||
static void initExecutionEnv() {
|
||||
|
|
@ -61,6 +62,7 @@ static void initExecutionEnv() {
|
|||
initCommunicableEnv ();
|
||||
initBuffers ();
|
||||
initScheduler();
|
||||
initSynchron ();
|
||||
|
||||
initThreadsEnv ();
|
||||
initReactiveThreadsEnv ();
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ extern int getNodeRank ();
|
|||
|
||||
extern int getNumberOfNodes ();
|
||||
|
||||
extern void wakeUpCommunicator ();
|
||||
|
||||
|
||||
Runner :: Runner () {
|
||||
|
||||
|
|
@ -188,6 +190,8 @@ void unpackTerminationOfRunner () {
|
|||
stopReactiveThreads ();
|
||||
printDebugMessage ("Reactive threads stopped!");
|
||||
}
|
||||
|
||||
wakeUpCommunicator ();
|
||||
}
|
||||
|
||||
void initRunnersEnv () {
|
||||
|
|
|
|||
|
|
@ -45,3 +45,8 @@ void Topology :: add (Cooperative & __mig) {
|
|||
|
||||
mig.push_back (& __mig) ;
|
||||
}
|
||||
|
||||
Topology :: operator std :: vector <Cooperative *>& () {
|
||||
|
||||
return mig;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,9 +53,11 @@ public:
|
|||
std :: vector <Cooperative *> & __from,
|
||||
std :: vector <Cooperative *> & __to) = 0;
|
||||
|
||||
operator std :: vector <Cooperative *>& ();
|
||||
|
||||
protected:
|
||||
|
||||
std :: vector <Cooperative *> mig ;
|
||||
std :: vector <Cooperative *> mig;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue