static void file_close (gpointer handle, gpointer data)
{
MONO_REQ_GC_SAFE_MODE; /* FIXME: after mono_w32handle_close is coop-aware, change this to UNSAFE_MODE and switch to SAFE around close() below */
+ MONO_ENTER_GC_UNSAFE;
MonoW32HandleFile *file_handle = (MonoW32HandleFile *)data;
gint fd = file_handle->fd;
if (file_handle->share_info)
file_share_release (file_handle->share_info);
+ MONO_ENTER_GC_SAFE;
close (fd);
+ MONO_EXIT_GC_SAFE;
+ MONO_EXIT_GC_UNSAFE;
}
static void file_details (gpointer data)
static void console_close (gpointer handle, gpointer data)
{
MONO_REQ_GC_SAFE_MODE; /* FIXME: after mono_w32handle_close is coop-aware, change this to UNSAFE_MODE and switch to SAFE around close() below */
+ MONO_ENTER_GC_UNSAFE;
MonoW32HandleFile *console_handle = (MonoW32HandleFile *)data;
gint fd = console_handle->fd;
if (fd > 2) {
if (console_handle->share_info)
file_share_release (console_handle->share_info);
+ MONO_ENTER_GC_SAFE;
close (fd);
+ MONO_EXIT_GC_SAFE;
}
+ MONO_EXIT_GC_UNSAFE;
}
static void console_details (gpointer data)
static void pipe_close (gpointer handle, gpointer data)
{
MONO_REQ_GC_SAFE_MODE; /* FIXME: after mono_w32handle_close is coop-aware, change this to UNSAFE_MODE and switch to SAFE around close() below */
+ MONO_ENTER_GC_UNSAFE;
MonoW32HandleFile *pipe_handle = (MonoW32HandleFile*)data;
gint fd = pipe_handle->fd;
if (pipe_handle->share_info)
file_share_release (pipe_handle->share_info);
+ MONO_ENTER_GC_SAFE;
close (fd);
+ MONO_EXIT_GC_SAFE;
+ MONO_EXIT_GC_UNSAFE;
}
static void pipe_details (gpointer data)