Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : print statistics in all cases (property satisfied or not)
[simgrid.git] / buildtools / Cmake / test_prog / prog_sem_init.c
index f4d303852db58aa81cd034fadce6d680ff991cc1..e822e64f4eff71313db8ab67d1f9550dab81836e 100644 (file)
@@ -4,10 +4,15 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
 #include <semaphore.h>
 
 #include <semaphore.h>
 
-void main(void)
+int main(void)
 {
 {
-       sem_t s;
-       sem_init(&s);
+  sem_t s;
+  if (sem_init(&s, 0, 0) != 0) 
+     return 1;
+  return 0;
 }
 }