Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Define initial value, even if it's useless.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 9 Mar 2022 09:23:47 +0000 (10:23 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 9 Mar 2022 09:42:27 +0000 (10:42 +0100)
teshsuite/s4u/monkey-semaphore/monkey-semaphore.cpp

index de33292..5a7c7ce 100644 (file)
@@ -18,7 +18,7 @@ static simgrid::config::Flag<double> cfg_deadline{"deadline", "When to fail the
                                                   120};
 
 struct SharedBuffer {
-  int value;                                               /* Where the data is exchanged */
+  int value                   = 0;                         /* Where the data is exchanged */
   sg4::SemaphorePtr sem_empty = sg4::Semaphore::create(1); /* indicates whether the buffer is empty */
   sg4::SemaphorePtr sem_full  = sg4::Semaphore::create(0); /* indicates whether the buffer is full */
 };