Changed Syntax

This commit is contained in:
Raphael Benistant 2020-03-28 12:41:15 +01:00
parent 79443bd9e9
commit dfe5df3a48
2 changed files with 5 additions and 5 deletions

View file

@ -150,14 +150,14 @@ void Tasks::Init() {
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
if (err = rt_sem_create(&sem_allow_StartReceive, NULL, 0, S_FIFO)) { if (err = rt_sem_create(&sem_allowStartReceive, NULL, 0, S_FIFO)) {
cerr << "Error semaphore create: " << strerror(-err) << endl << flush; cerr << "Error semaphore create: " << strerror(-err) << endl << flush;
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
//Initialization for some specific sem: Allow to run the first time //Initialization for some specific sem: Allow to run the first time
rt_sem_v(&sem_allow_StartReceive); rt_sem_v(&sem_allowStartReceive);
cout << "Semaphores created successfully" << endl << flush; cout << "Semaphores created successfully" << endl << flush;
@ -325,7 +325,7 @@ void Tasks::ReceiveFromMonTask(void *arg) {
rt_sem_p(&sem_barrier, TM_INFINITE); rt_sem_p(&sem_barrier, TM_INFINITE);
//Wait twin task to die if not first round //Wait twin task to die if not first round
rt_sem_p(&sem_allow_StartReceive, TM_INFINITE); rt_sem_p(&sem_allowStartReceive, TM_INFINITE);
//Reinitialize control boolean //Reinitialize control boolean
rt_mutex_acquire(&mutex_killReceiveFromMon, TM_INFINITE); rt_mutex_acquire(&mutex_killReceiveFromMon, TM_INFINITE);
@ -450,7 +450,7 @@ void Tasks::ReceiveFromMonTask(void *arg) {
} }
rt_sem_v(&sem_allow_StartReceive); rt_sem_v(&sem_allowStartReceive);
} }
/** /**

View file

@ -115,7 +115,7 @@ private:
RT_SEM sem_serverOk; RT_SEM sem_serverOk;
RT_SEM sem_startRobotWithoutWatchdog; RT_SEM sem_startRobotWithoutWatchdog;
RT_SEM sem_startRobotWithWatchdog; RT_SEM sem_startRobotWithWatchdog;
RT_SEM sem_allow_StartReceive; RT_SEM sem_allowStartReceive;
/**********************************************************************/ /**********************************************************************/
/* Message queues */ /* Message queues */