PATCH: gthr-win32 issues with Windows 95
Danny Smith
dannysmith@clear.net.nz
Wed Jun 23 02:52:00 GMT 2004
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
|
More information about the Gcc-patches
mailing list