[runtime] Fix DISABLE_REFLECTION_EMIT build.
[mono.git] / mono / utils / mono-proclib.h
index 139bb6e070e00b315b49ae313467b99278469f1c..356a1ab7e0b2916e2d97507d2a93bcfbc41892bd 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_PROC_LIB_H__
 #define __MONO_PROC_LIB_H__
 /*
@@ -6,6 +10,7 @@
 
 #include <glib.h>
 #include <mono/utils/mono-compiler.h>
+#include <mono/utils/mono-publib.h>
 
 /* never remove or reorder these enums values: they are used in corlib/System */
 
@@ -41,8 +46,25 @@ typedef enum {
        MONO_PROCESS_ERROR_OTHER
 } MonoProcessError;
 
+typedef struct _MonoCpuUsageState MonoCpuUsageState;
+#ifndef HOST_WIN32
+struct _MonoCpuUsageState {
+       gint64 kernel_time;
+       gint64 user_time;
+       gint64 current_time;
+};
+#else
+struct _MonoCpuUsageState {
+       guint64 kernel_time;
+       guint64 user_time;
+       guint64 idle_time;
+};
+#endif
+
 gpointer* mono_process_list     (int *size);
 
+void      mono_process_get_times (gpointer pid, gint64 *start_time, gint64 *user_time, gint64 *kernel_time);
+
 char*     mono_process_get_name (gpointer pid, char *buf, int len);
 
 gint64    mono_process_get_data (gpointer pid, MonoProcessData data);
@@ -50,8 +72,9 @@ gint64    mono_process_get_data_with_error (gpointer pid, MonoProcessData data,
 
 int       mono_process_current_pid (void);
 
-int       mono_cpu_count    (void);
+MONO_API int       mono_cpu_count    (void);
 gint64    mono_cpu_get_data (int cpu_id, MonoCpuData data, MonoProcessError *error);
+gint32    mono_cpu_usage (MonoCpuUsageState *prev);
 
 int       mono_atexit (void (*func)(void));