Log profiler: allow overwriting data files and name them from date and pid.
[mono.git] / mono / profiler / utils.c
index b16e9bfc6aa7474e61a40ec7075fc349eb6a30ea..8bf57a72f7c10e0e68e48ef63215d79e455a1a1c 100644 (file)
@@ -18,6 +18,7 @@
 #include <time.h>
 #include <stdio.h>
 #include <string.h>
+#include <unistd.h>
 #ifdef HOST_WIN32
 #include <windows.h>
 #else
@@ -412,3 +413,13 @@ thread_id (void)
 #endif
 }
 
+uintptr_t
+process_id (void)
+{
+#ifdef HOST_WIN32
+       return 0; /* FIXME */
+#else
+       return (uintptr_t)getpid ();
+#endif
+}
+