#include <mono/utils/mono-memory-model.h>
#include <mono/utils/mono-threads.h>
#include <mono/metadata/w32handle.h>
+#include <mono/io-layer/io-layer.h>
#ifdef HOST_WIN32
#include <direct.h>
#endif
#include <mono/utils/mono-threads.h>
#include "attach.h"
+#include <mono/io-layer/io-layer.h>
+
/*
* This module enables other processes to attach to a running mono process and
* load agent assemblies.
#include <mono/metadata/mempool.h>
#include <mono/metadata/metadata-internals.h>
#include <mono/metadata/property-bag.h>
-#include <mono/io-layer/io-layer.h>
#include "mono/utils/mono-compiler.h"
#include "mono/utils/mono-error.h"
#include "mono/sgen/gc-internal-agnostic.h"
#include "mono/utils/atomic.h"
#include "mono/utils/mono-error.h"
#include "mono/utils/mono-error-internals.h"
+#include "mono/io-layer/io-layer.h"
#include <string.h>
#include <errno.h>
#include <glib.h>
#include <mono/metadata/object.h>
-#include <mono/io-layer/io-layer.h>
#include <mono/utils/mono-compiler.h>
G_BEGIN_DECLS
void mono_console_init (void);
void mono_console_handle_async_ops (void);
-MonoBoolean ves_icall_System_ConsoleDriver_Isatty (HANDLE handle);
+MonoBoolean ves_icall_System_ConsoleDriver_Isatty (gpointer handle);
gint32 ves_icall_System_ConsoleDriver_InternalKeyAvailable (gint32 timeout);
MonoBoolean ves_icall_System_ConsoleDriver_SetEcho (MonoBoolean echo);
MonoBoolean ves_icall_System_ConsoleDriver_SetBreak (MonoBoolean want_break);
#include <mono/metadata/threadpool-ms.h>
#include <mono/utils/mono-signal-handler.h>
#include <mono/utils/mono-proclib.h>
+#include <mono/io-layer/io-layer.h>
/* On solaris, curses.h must come before both termios.h and term.h */
#ifdef HAVE_CURSES_H
#include <mono/metadata/mono-hash.h>
#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-internal-hash.h>
-#include <mono/io-layer/io-layer.h>
#include <mono/metadata/mempool-internals.h>
/*
#include <metadata/threads.h>
#include <metadata/profiler-private.h>
#include <mono/metadata/coree.h>
+#include <mono/io-layer/io-layer.h>
//#define DEBUG_DOMAIN_UNLOAD 1
#include <glib.h>
#include <mono/metadata/object-internals.h>
-#include <mono/io-layer/io-layer.h>
#include <mono/utils/mono-compiler.h>
G_BEGIN_DECLS
gint mask, gint attrs,
gint32 *error);
-extern HANDLE
+extern gpointer
ves_icall_System_IO_MonoIO_FindFirstFile (MonoString *path_with_pattern,
MonoString **file_name,
gint32 *file_attr,
gint32 *ioerror);
extern MonoBoolean
-ves_icall_System_IO_MonoIO_FindNextFile (HANDLE hnd,
+ves_icall_System_IO_MonoIO_FindNextFile (gpointer hnd,
MonoString **file_name,
gint32 *file_attr,
gint32 *ioerror);
extern MonoBoolean
-ves_icall_System_IO_MonoIO_FindCloseFile (HANDLE hnd);
+ves_icall_System_IO_MonoIO_FindCloseFile (gpointer hnd);
extern MonoString *
ves_icall_System_IO_MonoIO_FindFirst (MonoString *path,
gint32 *error);
extern gint32
-ves_icall_System_IO_MonoIO_GetFileType (HANDLE handle, gint32 *error);
+ves_icall_System_IO_MonoIO_GetFileType (gpointer handle, gint32 *error);
extern MonoBoolean
ves_icall_System_IO_MonoIO_GetFileStat (MonoString *path, MonoIOStat *stat,
gint32 *error);
-extern HANDLE
+extern gpointer
ves_icall_System_IO_MonoIO_Open (MonoString *filename, gint32 mode,
gint32 access_mode, gint32 share, gint32 options,
gint32 *error);
extern MonoBoolean
-ves_icall_System_IO_MonoIO_Close (HANDLE handle, gint32 *error);
+ves_icall_System_IO_MonoIO_Close (gpointer handle, gint32 *error);
extern gint32
-ves_icall_System_IO_MonoIO_Read (HANDLE handle, MonoArray *dest,
+ves_icall_System_IO_MonoIO_Read (gpointer handle, MonoArray *dest,
gint32 dest_offset, gint32 count,
gint32 *error);
extern gint32
-ves_icall_System_IO_MonoIO_Write (HANDLE handle, MonoArray *src,
+ves_icall_System_IO_MonoIO_Write (gpointer handle, MonoArray *src,
gint32 src_offset, gint32 count,
gint32 *error);
extern gint64
-ves_icall_System_IO_MonoIO_Seek (HANDLE handle, gint64 offset, gint32 origin,
+ves_icall_System_IO_MonoIO_Seek (gpointer handle, gint64 offset, gint32 origin,
gint32 *error);
extern MonoBoolean
-ves_icall_System_IO_MonoIO_Flush (HANDLE handle, gint32 *error);
+ves_icall_System_IO_MonoIO_Flush (gpointer handle, gint32 *error);
extern gint64
-ves_icall_System_IO_MonoIO_GetLength (HANDLE handle, gint32 *error);
+ves_icall_System_IO_MonoIO_GetLength (gpointer handle, gint32 *error);
extern MonoBoolean
-ves_icall_System_IO_MonoIO_SetLength (HANDLE handle, gint64 length,
+ves_icall_System_IO_MonoIO_SetLength (gpointer handle, gint64 length,
gint32 *error);
extern MonoBoolean
-ves_icall_System_IO_MonoIO_SetFileTime (HANDLE handle, gint64 creation_time,
+ves_icall_System_IO_MonoIO_SetFileTime (gpointer handle, gint64 creation_time,
gint64 last_access_time,
gint64 last_write_time, gint32 *error);
-extern HANDLE
+extern gpointer
ves_icall_System_IO_MonoIO_get_ConsoleOutput (void);
-extern HANDLE
+extern gpointer
ves_icall_System_IO_MonoIO_get_ConsoleInput (void);
-extern HANDLE
+extern gpointer
ves_icall_System_IO_MonoIO_get_ConsoleError (void);
extern MonoBoolean
-ves_icall_System_IO_MonoIO_CreatePipe (HANDLE *read_handle, HANDLE *write_handle, gint32 *error);
+ves_icall_System_IO_MonoIO_CreatePipe (gpointer *read_handle, gpointer *write_handle, gint32 *error);
extern MonoBoolean
-ves_icall_System_IO_MonoIO_DuplicateHandle (HANDLE source_process_handle, HANDLE source_handle,
- HANDLE target_process_handle, HANDLE *target_handle, gint32 access, gint32 inherit, gint32 options, gint32 *error);
+ves_icall_System_IO_MonoIO_DuplicateHandle (gpointer source_process_handle, gpointer source_handle,
+ gpointer target_process_handle, gpointer *target_handle, gint32 access, gint32 inherit, gint32 options, gint32 *error);
extern gunichar2
ves_icall_System_IO_MonoIO_get_VolumeSeparatorChar (void);
extern MonoArray *
ves_icall_System_IO_MonoIO_get_InvalidPathChars (void);
-extern void ves_icall_System_IO_MonoIO_Lock (HANDLE handle, gint64 position,
+extern void ves_icall_System_IO_MonoIO_Lock (gpointer handle, gint64 position,
gint64 length, gint32 *error);
-extern void ves_icall_System_IO_MonoIO_Unlock (HANDLE handle, gint64 position,
+extern void ves_icall_System_IO_MonoIO_Unlock (gpointer handle, gint64 position,
gint64 length, gint32 *error);
extern MonoBoolean
#include <glib.h>
#include <mono/metadata/object-internals.h>
-#include <mono/io-layer/io-layer.h>
#include <mono/utils/mono-compiler.h>
extern void mono_mmap_close (void *mmap_handle);
#include <mono/metadata/marshal.h>
#include <mono/utils/mono-dl.h>
#include <mono/utils/mono-io-portability.h>
+#include <mono/io-layer/io-layer.h>
+
#ifdef HOST_WIN32
/*
#define _MONO_METADATA_FILEWATCHER_H
#include <mono/metadata/object.h>
-#include <mono/io-layer/io-layer.h>
#include "mono/utils/mono-compiler.h"
#include <glib.h>
#include <glib.h>
#include <mono/metadata/object.h>
-#include <mono/io-layer/io-layer.h>
#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-coop-semaphore.h>
#include <mono/metadata/class-internals.h>
#include <mono/metadata/threads-types.h>
#include <mono/metadata/handle.h>
-#include <mono/io-layer/io-layer.h>
#include "mono/utils/mono-compiler.h"
#include "mono/utils/mono-error.h"
#include "mono/utils/mono-error-internals.h"
MonoObject obj;
volatile int lock_thread_id; /* to be used as the pre-shifted thread id in thin locks. Used for appdomain_ref push/pop */
MonoThreadHandle *handle;
- HANDLE native_handle;
+ gpointer native_handle;
MonoArray *cached_culture_info;
gunichar2 *name;
guint32 name_len;
/* remoting and async support */
MonoAsyncResult *
-mono_async_result_new (MonoDomain *domain, HANDLE handle,
+mono_async_result_new (MonoDomain *domain, gpointer handle,
MonoObject *state, gpointer data, MonoObject *object_data, MonoError *error);
MonoObject *
ves_icall_System_Runtime_Remoting_Messaging_AsyncResult_Invoke (MonoAsyncResult *ares);
MonoWaitHandle *
-mono_wait_handle_new (MonoDomain *domain, HANDLE handle, MonoError *error);
+mono_wait_handle_new (MonoDomain *domain, gpointer handle, MonoError *error);
-HANDLE
+gpointer
mono_wait_handle_get_handle (MonoWaitHandle *handle);
gboolean
MonoProperty *prop;
} CattrNamedArg;
-gboolean mono_image_create_pefile (MonoReflectionModuleBuilder *module, HANDLE file, MonoError *error);
+gboolean mono_image_create_pefile (MonoReflectionModuleBuilder *module, gpointer file, MonoError *error);
guint32 mono_image_insert_string (MonoReflectionModuleBuilder *module, MonoString *str);
guint32 mono_image_create_token (MonoDynamicImage *assembly, MonoObject *obj, gboolean create_methodspec, gboolean register_token, MonoError *error);
guint32 mono_image_create_method_token (MonoDynamicImage *assembly, MonoObject *obj, MonoArray *opt_param_types, MonoError *error);
MonoArray *opt_param_types);
void
-ves_icall_ModuleBuilder_WriteToFile (MonoReflectionModuleBuilder *mb, HANDLE file);
+ves_icall_ModuleBuilder_WriteToFile (MonoReflectionModuleBuilder *mb, gpointer file);
void
ves_icall_ModuleBuilder_build_metadata (MonoReflectionModuleBuilder *mb);
#include <mono/utils/mono-threads.h>
#include <mono/utils/mono-threads-coop.h>
#include "cominterop.h"
+#include <mono/io-layer/io-layer.h>
static void
get_default_field_value (MonoDomain* domain, MonoClassField *field, void *value, MonoError *error);
#include "mono/utils/mono-digest.h"
#include "mono/utils/mono-error-internals.h"
+#include "mono/io-layer/io-layer.h"
+
#define TEXT_OFFSET 512
#define CLI_H_SIZE 136
#define FILE_ALIGN 512
#include "mono/metadata/tokentype.h"
#include "mono/utils/checked-build.h"
#include "mono/utils/mono-digest.h"
+#include "mono/io-layer/io-layer.h"
static GENERATE_GET_CLASS_WITH_CACHE (marshal_as_attribute, System.Runtime.InteropServices, MarshalAsAttribute);
static GENERATE_GET_CLASS_WITH_CACHE (module_builder, System.Reflection.Emit, ModuleBuilder);
#include <mono/utils/mono-threads.h>
#include <mono/utils/mono-time.h>
#include <mono/utils/mono-rand.h>
+#include <mono/io-layer/io-layer.h>
#define CPU_USAGE_LOW 80
#define CPU_USAGE_HIGH 95
#include <glib.h>
-#include <mono/io-layer/io-layer.h>
#include <mono/metadata/object.h>
#include "mono/utils/mono-compiler.h"
#include "mono/utils/mono-membar.h"
void mono_threads_install_cleanup (MonoThreadCleanupFunc func);
void ves_icall_System_Threading_Thread_ConstructInternalThread (MonoThread *this_obj);
-HANDLE ves_icall_System_Threading_Thread_Thread_internal(MonoThread *this_obj, MonoObject *start);
+gpointer ves_icall_System_Threading_Thread_Thread_internal(MonoThread *this_obj, MonoObject *start);
void ves_icall_System_Threading_InternalThread_Thread_free_internal(MonoInternalThread *this_obj);
void ves_icall_System_Threading_Thread_Sleep_internal(gint32 ms);
gboolean ves_icall_System_Threading_Thread_Join_internal(MonoThread *this_obj, int ms);
gint32 ves_icall_System_Threading_WaitHandle_WaitAll_internal(MonoArray *mono_handles, gint32 ms);
gint32 ves_icall_System_Threading_WaitHandle_WaitAny_internal(MonoArray *mono_handles, gint32 ms);
-gint32 ves_icall_System_Threading_WaitHandle_WaitOne_internal(HANDLE handle, gint32 ms);
-gint32 ves_icall_System_Threading_WaitHandle_SignalAndWait_Internal (HANDLE toSignal, HANDLE toWait, gint32 ms);
+gint32 ves_icall_System_Threading_WaitHandle_WaitOne_internal(gpointer handle, gint32 ms);
+gint32 ves_icall_System_Threading_WaitHandle_SignalAndWait_Internal (gpointer toSignal, gpointer toWait, gint32 ms);
MonoArray* ves_icall_System_Threading_Thread_ByteArrayToRootDomain (MonoArray *arr);
MonoArray* ves_icall_System_Threading_Thread_ByteArrayToCurrentDomain (MonoArray *arr);
MonoW32HandleType type;
if (!mono_w32handle_lookup_data (handle, &handle_data)) {
- return(WAIT_FAILED);
+ return MONO_W32HANDLE_WAIT_RET_FAILED;
}
type = handle_data->type;
handle_ops[type]->special_wait != NULL) {
return(handle_ops[type]->special_wait (handle, timeout, alerted));
} else {
- return(WAIT_FAILED);
+ return MONO_W32HANDLE_WAIT_RET_FAILED;
}
}
#include "class-internals.h"
#include "image.h"
#include "utils/mono-proclib.h"
+#include "io-layer/io-layer.h"
#define LOGDEBUG(...)
/* define LOGDEBUG(...) g_message(__VA_ARGS__) */
#include <mono/utils/mono-rand.h>
#include <mono/utils/json.h>
#include <mono/utils/mono-threads-coop.h>
+#include <mono/io-layer/io-layer.h>
#include "aot-compiler.h"
#include "seq-points.h"
#include "debugger-agent.h"
#include "mini.h"
#include "seq-points.h"
+#include <mono/io-layer/io-layer.h>
/*
* On iOS we can't use System.Environment.Exit () as it will do the wrong
#include <mono/utils/mono-threads-debug.h>
#include <mono/utils/os-event.h>
+#include <mono/io-layer/io-layer.h>
+
#include <errno.h>
#if defined(__MACH__)
#include <mono/utils/os-event.h>
#include <mono/utils/refcount.h>
-#include <mono/io-layer/io-layer.h>
-
#include <glib.h>
#include <config.h>
#ifdef HOST_WIN32