[Gc] Re: GC 6.4 vs Irix w/ threads

Dan Bonachea bonachea at cs.berkeley.edu
Tue Apr 12 02:22:32 PDT 2005


At 12:49 AM 4/12/2005, Dan Bonachea wrote:
>Hi Hans - Thanks for the patch.
>
>32-bit gctest seems to be working now

Seems I spoke too soon concerning 32-bit IRIX gctest - it also crashes with a 
(mostly harmless) assertion failure when GC assertions are enabled.

Patch to fix that particular issue is below - all the other problems reported 
in my previous email remain.

Dan

*** old/include/private/gc_locks.h Tue, 15 Mar 2005 06:29:54 -0800 bonachea
--- new/include/private/gc_locks.h Tue, 12 Apr 2005 02:16:54 -0700 bonachea
***************
*** 635,642 ****
   #    define NO_THREAD (pthread_t)(-1)
   #    define UNSET_LOCK_HOLDER() GC_lock_holder = NO_THREAD
   #    define I_HOLD_LOCK() (pthread_equal(GC_lock_holder, pthread_self()))
! #    define LOCK() { if (GC_test_and_set(&GC_allocate_lock)) GC_lock(); }
! #    define UNLOCK() GC_clear(&GC_allocate_lock);
        extern VOLATILE GC_bool GC_collecting;
   #    define ENTER_GC() \
                 { \
--- 635,649 ----
   #    define NO_THREAD (pthread_t)(-1)
   #    define UNSET_LOCK_HOLDER() GC_lock_holder = NO_THREAD
   #    define I_HOLD_LOCK() (pthread_equal(GC_lock_holder, pthread_self()))
! #    ifdef GC_ASSERTIONS
! #        define LOCK() { if (GC_test_and_set(&GC_allocate_lock)) GC_lock(); 
SET_LOCK_HOLDER(); }
! #        define UNLOCK() \
!               { GC_ASSERT(I_HOLD_LOCK()); UNSET_LOCK_HOLDER(); \
!                 GC_clear(&GC_allocate_lock); }
! #    else /* !GC_ASSERTIONS */
! #        define LOCK() { if (GC_test_and_set(&GC_allocate_lock)) GC_lock(); 
}
! #        define UNLOCK() GC_clear(&GC_allocate_lock);
! #    endif
        extern VOLATILE GC_bool GC_collecting;
   #    define ENTER_GC() \
                 { \



More information about the Gc mailing list