LockWord lw;
lw.sync = mon;
if (lw.lock_word & LOCK_WORD_THIN_HASH) {
- mono_raise_exception (mono_get_exception_synchronization_lock ("Not locked"));
+ mono_set_pending_exception (mono_get_exception_synchronization_lock ("Not locked"));
return;
}
lw.lock_word &= ~LOCK_WORD_BITS_MASK;
}
#endif
if (mon == NULL) {
- mono_raise_exception (mono_get_exception_synchronization_lock ("Not locked"));
+ mono_set_pending_exception (mono_get_exception_synchronization_lock ("Not locked"));
return;
}
if (mon_status_get_owner (mon->status) != mono_thread_info_get_small_id ()) {
- mono_raise_exception (mono_get_exception_synchronization_lock ("Not locked by this thread"));
+ mono_set_pending_exception (mono_get_exception_synchronization_lock ("Not locked by this thread"));
return;
}
LockWord lw;
lw.sync = mon;
if (lw.lock_word & LOCK_WORD_THIN_HASH) {
- mono_raise_exception (mono_get_exception_synchronization_lock ("Not locked"));
+ mono_set_pending_exception (mono_get_exception_synchronization_lock ("Not locked"));
return;
}
lw.lock_word &= ~LOCK_WORD_BITS_MASK;
}
#endif
if (mon == NULL) {
- mono_raise_exception (mono_get_exception_synchronization_lock ("Not locked"));
+ mono_set_pending_exception (mono_get_exception_synchronization_lock ("Not locked"));
return;
}
if (mon_status_get_owner (mon->status) != mono_thread_info_get_small_id ()) {
- mono_raise_exception (mono_get_exception_synchronization_lock ("Not locked by this thread"));
+ mono_set_pending_exception (mono_get_exception_synchronization_lock ("Not locked by this thread"));
return;
}
LockWord lw;
lw.sync = mon;
if (lw.lock_word & LOCK_WORD_THIN_HASH) {
- mono_raise_exception (mono_get_exception_synchronization_lock ("Not locked"));
+ mono_set_pending_exception (mono_get_exception_synchronization_lock ("Not locked"));
return FALSE;
}
lw.lock_word &= ~LOCK_WORD_BITS_MASK;
}
#endif
if (mon == NULL) {
- mono_raise_exception (mono_get_exception_synchronization_lock ("Not locked"));
+ mono_set_pending_exception (mono_get_exception_synchronization_lock ("Not locked"));
return FALSE;
}
if (mon_status_get_owner (mon->status) != mono_thread_info_get_small_id ()) {
- mono_raise_exception (mono_get_exception_synchronization_lock ("Not locked by this thread"));
+ mono_set_pending_exception (mono_get_exception_synchronization_lock ("Not locked by this thread"));
return FALSE;
}
event = CreateEvent (NULL, FALSE, FALSE, NULL);
if (event == NULL) {
- mono_raise_exception (mono_get_exception_synchronization_lock ("Failed to set up wait event"));
+ mono_set_pending_exception (mono_get_exception_synchronization_lock ("Failed to set up wait event"));
return FALSE;
}
* SynchronizationLockException
*/
CloseHandle (event);
- mono_raise_exception (mono_get_exception_synchronization_lock ("Failed to regain lock"));
+ mono_set_pending_exception (mono_get_exception_synchronization_lock ("Failed to regain lock"));
return FALSE;
}