Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mono/metadata/icall-def.h
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ ICALL(MONIT_9, "try_enter_with_atomic_var", ves_icall_System_Threading_Monitor_M
ICALL_TYPE(MUTEX, "System.Threading.Mutex", MUTEX_1)
HANDLES(ICALL(MUTEX_1, "CreateMutex_internal(bool,string,bool&)", ves_icall_System_Threading_Mutex_CreateMutex_internal))
HANDLES(ICALL(MUTEX_2, "OpenMutex_internal(string,System.Security.AccessControl.MutexRights,System.IO.MonoIOError&)", ves_icall_System_Threading_Mutex_OpenMutex_internal))
ICALL(MUTEX_3, "ReleaseMutex_internal(intptr)", ves_icall_System_Threading_Mutex_ReleaseMutex_internal)
NOHANDLES(ICALL(MUTEX_3, "ReleaseMutex_internal(intptr)", ves_icall_System_Threading_Mutex_ReleaseMutex_internal))

ICALL_TYPE(NATIVEC, "System.Threading.NativeEventCalls", NATIVEC_1)
ICALL(NATIVEC_1, "CloseEvent_internal", ves_icall_System_Threading_Events_CloseEvent_internal)
Expand Down
2 changes: 0 additions & 2 deletions mono/metadata/w32mutex-unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ ves_icall_System_Threading_Mutex_CreateMutex_internal (MonoBoolean owned, MonoSt
{
gpointer mutex;

error_init (error);
*created = TRUE;

/* Need to blow away any old errors here, because code tests
Expand Down Expand Up @@ -427,7 +426,6 @@ ves_icall_System_Threading_Mutex_ReleaseMutex_internal (gpointer handle)
gpointer
ves_icall_System_Threading_Mutex_OpenMutex_internal (MonoStringHandle name, gint32 rights G_GNUC_UNUSED, gint32 *err, MonoError *error)
{
error_init (error);
gchar *utf8_name = mono_string_handle_to_utf8 (name, error);
return_val_if_nok (error, NULL);
gpointer handle = mono_w32mutex_open (utf8_name, rights, err);
Expand Down
6 changes: 5 additions & 1 deletion mono/metadata/w32mutex-win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ ves_icall_System_Threading_Mutex_CreateMutex_internal (MonoBoolean owned, MonoSt

*created = TRUE;

/* Need to blow away any old errors here, because code tests
* for ERROR_ALREADY_EXISTS on success (!) to see if a mutex
* was freshly created */
SetLastError (ERROR_SUCCESS);

if (MONO_HANDLE_IS_NULL (name)) {
MONO_ENTER_GC_SAFE;
mutex = CreateMutex (NULL, owned, NULL);
Expand Down Expand Up @@ -60,7 +65,6 @@ ves_icall_System_Threading_Mutex_OpenMutex_internal (MonoStringHandle name, gint
{
HANDLE ret;

error_init (error);
*err = ERROR_SUCCESS;

uint32_t gchandle = 0;
Expand Down