#include <mono/metadata/image.h>
#include <mono/metadata/cil-coff.h>
#include <mono/metadata/exception.h>
+#include <mono/metadata/threadpool-ms-io.h>
#include <mono/utils/strenc.h>
#include <mono/utils/mono-proclib.h>
#include <mono/io-layer/io-layer.h>
return mono_process_current_pid ();
}
-void ves_icall_System_Diagnostics_Process_Process_free_internal (MonoObject *this,
+void ves_icall_System_Diagnostics_Process_Process_free_internal (MonoObject *this_obj,
HANDLE process)
{
#ifdef THREAD_DEBUG
- g_message ("%s: Closing process %p, handle %p", __func__, this, process);
+ g_message ("%s: Closing process %p, handle %p", __func__, this_obj, process);
#endif
#if defined(TARGET_WIN32) || defined(HOST_WIN32)
#endif
}
-#define STASH_SYS_ASS(this) \
+#define STASH_SYS_ASS(this_obj) \
if(system_assembly == NULL) { \
- system_assembly=this->vtable->klass->image; \
+ system_assembly=this_obj->vtable->klass->image; \
}
static MonoImage *system_assembly=NULL;
}
/* Returns an array of System.Diagnostics.ProcessModule */
-MonoArray *ves_icall_System_Diagnostics_Process_GetModules_internal (MonoObject *this, HANDLE process)
+MonoArray *ves_icall_System_Diagnostics_Process_GetModules_internal (MonoObject *this_obj, HANDLE process)
{
MonoArray *temp_arr = NULL;
MonoArray *arr;
current_process = ves_icall_System_Diagnostics_Process_GetProcess_internal (pid);
}
- STASH_SYS_ASS (this);
+ STASH_SYS_ASS (this_obj);
if (process == current_process) {
assemblies = get_domain_assemblies (mono_domain_get ());
return arr;
}
-void ves_icall_System_Diagnostics_FileVersionInfo_GetVersionInfo_internal (MonoObject *this, MonoString *filename)
+void ves_icall_System_Diagnostics_FileVersionInfo_GetVersionInfo_internal (MonoObject *this_obj, MonoString *filename)
{
- STASH_SYS_ASS (this);
+ STASH_SYS_ASS (this_obj);
- process_get_fileversion (this, mono_string_chars (filename));
- process_set_field_string (this, "filename",
+ process_get_fileversion (this_obj, mono_string_chars (filename));
+ process_set_field_string (this_obj, "filename",
mono_string_chars (filename),
mono_string_length (filename));
}
} else {
process_info->process_handle = shellex.hProcess;
process_info->thread_handle = NULL;
- /* It appears that there's no way to get the pid from a
- * process handle before windows xp. Really.
- */
-#if defined(HAVE_GETPROCESSID) && !defined(MONO_CROSS_COMPILE)
+#if !defined(MONO_CROSS_COMPILE)
process_info->pid = GetProcessId (shellex.hProcess);
#else
process_info->pid = 0;
return(ret);
}
-MonoBoolean ves_icall_System_Diagnostics_Process_WaitForExit_internal (MonoObject *this, HANDLE process, gint32 ms)
+MonoBoolean ves_icall_System_Diagnostics_Process_WaitForExit_internal (MonoObject *this_obj, HANDLE process, gint32 ms)
{
guint32 ret;
}
}
-MonoBoolean ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal (MonoObject *this, HANDLE process, gint32 ms)
+MonoBoolean ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal (MonoObject *this_obj, HANDLE process, gint32 ms)
{
guint32 ret;
return res;
}
+void
+ves_icall_System_Diagnostics_Process_ProcessAsyncReader_RemoveFromIOThreadPool (HANDLE handle)
+{
+ mono_threadpool_ms_io_remove_socket (GPOINTER_TO_INT (handle));
+}
+