2004-06-23 Wu Yongwei <adah@sh163.net>
authordannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Jun 2004 23:57:27 +0000 (23:57 +0000)
committerdannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Jun 2004 23:57:27 +0000 (23:57 +0000)
commit8e1da35ce1172ce9590cd41c37b9aede01700357
tree71286fc768d32129b2b42546dd5ec76ecaa760bc
parent449c2146f7259aa7259812fc9d5bc6b612c90f36
2004-06-23  Wu Yongwei  <adah@sh163.net>

* gthr-win32.h (__GTHREAD_MUTEX_INIT_DEFAULT): Adjust.
(__gthr_i486_lock_cmp_xchg): New inline assembly function.
(__GTHR_W32_InterlockedCompareExchange): New macro to choose a
suitable function for interlocked compare-and-exchange.
(__gthread_mutex_trylock): Use
__GTHR_W32_InterlockedCompareExchange.
(__gthread_mutex_init_function, __gthread_mutex_lock,
__gthread_mutex_trylock, __gthread_mutex_unlock): Adjust the
initial counter value to work correctly under Windows 95.
* config/i386/gthr-win32.c: Adjust include order.
Define __GTHREAD_I486_INLINE_LOCK_PRIMITIVES before including
gthr-win32.h.
(__gthr_win32_mutex_init_function, __gthr_win32_mutex_lock,
__gthr_win32_mutex_trylock, __gthr_win32_mutex_unlock): Adjust
to match inline versions in gthr-win32.h.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83569 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/i386/gthr-win32.c
gcc/gthr-win32.h