Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'condvar'
[simgrid.git] / include / smpi / smpi.h
index a06de05..0b73451 100644 (file)
@@ -9,6 +9,9 @@
 
 #include <unistd.h>
 #include <sys/time.h>
+#if _POSIX_TIMERS
+#include <time.h>
+#endif
 
 #include <stddef.h>
 #include <xbt/misc.h>
@@ -803,6 +806,10 @@ XBT_PUBLIC(int)  smpi_get_host_pstate(void);
 XBT_PUBLIC(double) smpi_get_host_consumed_energy(void);
 
 XBT_PUBLIC(int) smpi_usleep(useconds_t usecs);
+#if _POSIX_TIMERS > 0
+XBT_PUBLIC(int) smpi_nanosleep(const struct timespec *tp, struct timespec * t);
+XBT_PUBLIC(int) smpi_clock_gettime(clockid_t clk_id, struct timespec *tp);
+#endif
 XBT_PUBLIC(unsigned int) smpi_sleep(unsigned int secs);
 XBT_PUBLIC(int) smpi_gettimeofday(struct timeval *tv, void* tz);
 XBT_PUBLIC(unsigned long long) smpi_rastro_resolution (void);
@@ -897,6 +904,10 @@ static void __attribute__((destructor)) __postfini_##name(void) { \
 
 #define SMPI_VARGET_GLOBAL(name) name[smpi_process_index()]
 
+/** 
+ * This is used for the old privatization method, i.e., on old
+ * machines that do not yet support privatization via mmap
+ */
 #define SMPI_VARINIT_STATIC(name,type)                      \
 static type *name = NULL;                                   \
 if(!name) {                                                 \