This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: gthr-win32 issues with Windows 95
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Wu Yongwei <adah at netstd dot com>
- Cc: Christopher Faylor <cgf at alum dot bu dot edu>
- Date: Wed, 23 Jun 2004 01:43:19 +0100
- Subject: Re: PATCH: gthr-win32 issues with Windows 95
- References: <1087801034.1023.32.camel@wuyw.netstd.com>
- Reply-to: Danny Smith <dannysmith at users dot sourceforge dot net>
From: "Wu Yongwei" | ChangeLog:
|
| 2004-05-27 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.
|
This is fine by me but I think it could be improved by the addition of a
comment to gthr-win32.h, explaining why
__GTHREAD_I486_INLINE_LOCK_PRIMITIVES
will have to be defined for apps targetting Win95. Even though
mutex_try_lock (and hence __GTHR_W32_InterlockedCompareExchange) is not
currently used, one day it might be.
Chris, Is this okay with you for trunk.
Danny
| Best regards,
|
| Wu Yongwei
|