Style for PEO
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@906 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
f4740e571c
commit
b74a446baa
82 changed files with 1946 additions and 1663 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* <communicable.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
|
|
@ -42,37 +42,38 @@
|
|||
|
||||
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 ___________ */
|
||||
void stop (); /* It suspends the current process */
|
||||
void resume (); /* It resumes ___________ */
|
||||
|
||||
public :
|
||||
public :
|
||||
|
||||
static unsigned num_comm;
|
||||
static unsigned num_comm;
|
||||
|
||||
protected :
|
||||
protected :
|
||||
|
||||
COMM_ID key;
|
||||
COMM_ID key;
|
||||
|
||||
sem_t sem_lock;
|
||||
sem_t sem_lock;
|
||||
|
||||
sem_t sem_stop;
|
||||
};
|
||||
sem_t sem_stop;
|
||||
};
|
||||
|
||||
extern void initCommunicableEnv ();
|
||||
|
||||
extern Communicable * getCommunicable (COMM_ID __key);
|
||||
extern Communicable * getCommunicable (COMM_ID __key);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue