* thread.cc (__cygwin_lock_lock): Delete racy optimisation.
(__cygwin_lock_unlock): Likewise.
This commit is contained in:
parent
f95df56a61
commit
b650c255ab
|
@ -1,3 +1,9 @@
|
||||||
|
2009-06-04 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||||
|
|
||||||
|
* thread.cc (__cygwin_lock_lock): Delete racy optimisation.
|
||||||
|
(__cygwin_lock_unlock): Likewise.
|
||||||
|
|
||||||
|
|
||||||
2009-06-03 IWAMURO Motnori <deenheart@gmail.com>
|
2009-06-03 IWAMURO Motnori <deenheart@gmail.com>
|
||||||
|
|
||||||
* strfuncs.cc (sys_cp_mbstowcs): Fix condition.
|
* strfuncs.cc (sys_cp_mbstowcs): Fix condition.
|
||||||
|
|
|
@ -76,13 +76,8 @@ __cygwin_lock_fini (_LOCK_T *lock)
|
||||||
extern "C" void
|
extern "C" void
|
||||||
__cygwin_lock_lock (_LOCK_T *lock)
|
__cygwin_lock_lock (_LOCK_T *lock)
|
||||||
{
|
{
|
||||||
if (MT_INTERFACE->threadcount <= 1)
|
paranoid_printf ("threadcount %d. locking", MT_INTERFACE->threadcount);
|
||||||
paranoid_printf ("threadcount %d. not locking", MT_INTERFACE->threadcount);
|
pthread_mutex_lock ((pthread_mutex_t*) lock);
|
||||||
else
|
|
||||||
{
|
|
||||||
paranoid_printf ("threadcount %d. locking", MT_INTERFACE->threadcount);
|
|
||||||
pthread_mutex_lock ((pthread_mutex_t*) lock);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
|
@ -95,13 +90,8 @@ __cygwin_lock_trylock (_LOCK_T *lock)
|
||||||
extern "C" void
|
extern "C" void
|
||||||
__cygwin_lock_unlock (_LOCK_T *lock)
|
__cygwin_lock_unlock (_LOCK_T *lock)
|
||||||
{
|
{
|
||||||
if (MT_INTERFACE->threadcount <= 1)
|
pthread_mutex_unlock ((pthread_mutex_t*) lock);
|
||||||
paranoid_printf ("threadcount %d. not unlocking", MT_INTERFACE->threadcount);
|
paranoid_printf ("threadcount %d. unlocked", MT_INTERFACE->threadcount);
|
||||||
else
|
|
||||||
{
|
|
||||||
pthread_mutex_unlock ((pthread_mutex_t*) lock);
|
|
||||||
paranoid_printf ("threadcount %d. unlocked", MT_INTERFACE->threadcount);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline verifyable_object_state
|
static inline verifyable_object_state
|
||||||
|
|
Loading…
Reference in New Issue