git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@790 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
9c87b3b0c0
commit
adb6419766
60 changed files with 1017 additions and 1095 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* <communicable.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
|
|
@ -41,35 +41,34 @@
|
|||
|
||||
typedef unsigned COMM_ID;
|
||||
|
||||
class Communicable
|
||||
{
|
||||
class Communicable {
|
||||
|
||||
public :
|
||||
public :
|
||||
|
||||
Communicable ();
|
||||
Communicable ();
|
||||
|
||||
virtual ~ Communicable ();
|
||||
|
||||
virtual ~ Communicable ();
|
||||
COMM_ID getKey ();
|
||||
|
||||
COMM_ID getKey ();
|
||||
void lock (); /* It suspends the current process if the semaphore is locked */
|
||||
void unlock (); /* It unlocks the shared semaphore */
|
||||
|
||||
void lock (); /* It suspends the current process if the semaphore is locked */
|
||||
void unlock (); /* It unlocks the shared semaphore */
|
||||
void stop (); /* It suspends the current process */
|
||||
void resume (); /* It resumes ___________ */
|
||||
|
||||
protected :
|
||||
|
||||
void stop (); /* It suspends the current process */
|
||||
void resume (); /* It resumes ___________ */
|
||||
COMM_ID key;
|
||||
|
||||
protected :
|
||||
sem_t sem_lock;
|
||||
|
||||
sem_t sem_stop;
|
||||
|
||||
COMM_ID key;
|
||||
static unsigned num_comm;
|
||||
};
|
||||
|
||||
sem_t sem_lock;
|
||||
|
||||
sem_t sem_stop;
|
||||
|
||||
static unsigned num_comm;
|
||||
};
|
||||
|
||||
extern Communicable * getCommunicable (COMM_ID __key);
|
||||
extern Communicable * getCommunicable (COMM_ID __key);
|
||||
|
||||
//extern COMM_ID getKey (const Communicable * __comm);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue