Renamed new meta model branch
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@609 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
b0c0d480b1
commit
a0f7039b27
413 changed files with 31937 additions and 0 deletions
58
branches/paradiseo-peo-meta-model/src/core/runner.h
Normal file
58
branches/paradiseo-peo-meta-model/src/core/runner.h
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
// "runner.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/*
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#ifndef __runner_h
|
||||
#define __runner_h
|
||||
|
||||
#include <eoFunctor.h>
|
||||
|
||||
#include "communicable.h"
|
||||
#include "thread.h"
|
||||
|
||||
typedef unsigned RUNNER_ID;
|
||||
|
||||
class Runner : public Communicable, public Thread {
|
||||
|
||||
public :
|
||||
|
||||
Runner ();
|
||||
|
||||
void start ();
|
||||
|
||||
void waitStarting ();
|
||||
|
||||
bool isLocal ();
|
||||
|
||||
void terminate ();
|
||||
|
||||
virtual void run () = 0;
|
||||
|
||||
RUNNER_ID getID ();
|
||||
|
||||
void packTermination ();
|
||||
|
||||
void notifySendingTermination ();
|
||||
|
||||
private :
|
||||
|
||||
sem_t sem_start;
|
||||
|
||||
unsigned id;
|
||||
};
|
||||
|
||||
extern bool atLeastOneActiveRunner ();
|
||||
|
||||
extern void unpackTerminationOfRunner ();
|
||||
|
||||
extern Runner * getRunner (RUNNER_ID __key);
|
||||
|
||||
extern void startRunners ();
|
||||
|
||||
extern void joinRunners ();
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue