Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move the cmake files in tools/cmake
[simgrid.git] / tools / cmake / test_prog / prog_sem_init.c
diff --git a/tools/cmake/test_prog/prog_sem_init.c b/tools/cmake/test_prog/prog_sem_init.c
new file mode 100644 (file)
index 0000000..43540a0
--- /dev/null
@@ -0,0 +1,18 @@
+/* Copyright (c) 2010-2014. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* 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>
+
+int main(void)
+{
+  sem_t s;
+  if (sem_init(&s, 0, 0) != 0) 
+     return 1;
+  return 0;
+}