dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/libgc/include/private dbg_mlc.h,1.2,1.3


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/libgc/include/private dbg_mlc.h,1.2,1.3 gc_locks.h,1.2,1.3 gc_pmark.h,1.2,1.3 gc_priv.h,1.2,1.3 gcconfig.h,1.4,1.5 solaris_threads.h,1.2,1.3 specific.h,1.2,1.3
Date: Wed, 05 Feb 2003 20:35:49 -0500

Update of /cvsroot/dotgnu-pnet/pnet/libgc/include/private
In directory subversions:/tmp/cvs-serv32390/libgc/include/private

Modified Files:
        dbg_mlc.h gc_locks.h gc_pmark.h gc_priv.h gcconfig.h 
        solaris_threads.h specific.h 
Log Message:


Update the libgc library using gc6.2alpha3 from the libgc ftp site.


Index: dbg_mlc.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/include/private/dbg_mlc.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dbg_mlc.h   8 Apr 2002 23:36:50 -0000       1.2
--- dbg_mlc.h   6 Feb 2003 01:35:46 -0000       1.3
***************
*** 129,132 ****
--- 129,137 ----
  #define SIMPLE_ROUNDED_UP_WORDS(n) BYTES_TO_WORDS((n) + WORDS_TO_BYTES(1) - 1)
  
+ /* ADD_CALL_CHAIN stores a (partial) call chain into an object        */
+ /* header.  It may be called with or without the allocation   */
+ /* lock.                                                      */
+ /* PRINT_CALL_CHAIN prints the call chain stored in an object */
+ /* to stderr.  It requires that we do not hold the lock.      */
  #ifdef SAVE_CALL_CHAIN
  #   define ADD_CALL_CHAIN(base, ra) GC_save_callers(((oh *)(base)) -> oh_ci)

Index: gc_locks.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/include/private/gc_locks.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** gc_locks.h  8 Apr 2002 23:36:50 -0000       1.2
--- gc_locks.h  6 Feb 2003 01:35:46 -0000       1.3
***************
*** 146,162 ****
          inline static int GC_test_and_set(volatile unsigned int *addr) {
            int oldval;
!           int temp = 1; // locked value
  
            __asm__ __volatile__(
!                "1:\tlwarx %0,0,%3\n"   // load and reserve
!                "\tcmpwi %0, 0\n"       // if load is
!                "\tbne 2f\n"            //   non-zero, return already set
!                "\tstwcx. %2,0,%1\n"    // else store conditional
!                "\tbne- 1b\n"           // retry if lost reservation
!                "2:\t\n"                // oldval is zero if we set
                : "=&r"(oldval), "=p"(addr)
                : "r"(temp), "1"(addr)
                : "memory");
!           return (int)oldval;
          }
  #       define GC_TEST_AND_SET_DEFINED
--- 146,162 ----
          inline static int GC_test_and_set(volatile unsigned int *addr) {
            int oldval;
!           int temp = 1; /* locked value */
  
            __asm__ __volatile__(
!                "1:\tlwarx %0,0,%3\n"   /* load and reserve               */
!                "\tcmpwi %0, 0\n"       /* if load is                     */
!                "\tbne 2f\n"            /*   non-zero, return already set */
!                "\tstwcx. %2,0,%1\n"    /* else store conditional         */
!                "\tbne- 1b\n"           /* retry if lost reservation      */
!                "2:\t\n"                /* oldval is zero if we set       */
                : "=&r"(oldval), "=p"(addr)
                : "r"(temp), "1"(addr)
                : "memory");
!           return oldval;
          }
  #       define GC_TEST_AND_SET_DEFINED
***************
*** 192,197 ****
          }
  #       define GC_TEST_AND_SET_DEFINED
!         /* Should probably also define GC_clear, since it needs       */
!         /* a memory barrier ??                                        */
  #    endif /* ALPHA */
  #    ifdef ARM32
--- 192,200 ----
          }
  #       define GC_TEST_AND_SET_DEFINED
!         inline static void GC_clear(volatile unsigned int *addr) {
!           __asm__ __volatile__("mb" : : : "memory");
!           *(addr) = 0;
!         }
! #       define GC_CLEAR_DEFINED
  #    endif /* ALPHA */
  #    ifdef ARM32
***************
*** 210,217 ****
  #       define GC_TEST_AND_SET_DEFINED
  #    endif /* ARM32 */
  #  endif /* __GNUC__ */
  #  if (defined(ALPHA) && !defined(__GNUC__))
! #    define GC_test_and_set(addr) __cxx_test_and_set_atomic(addr, 1)
  #    define GC_TEST_AND_SET_DEFINED
  #  endif
  #  if defined(MSWIN32)
--- 213,241 ----
  #       define GC_TEST_AND_SET_DEFINED
  #    endif /* ARM32 */
+ #    ifdef S390
+        inline static int GC_test_and_set(volatile unsigned int *addr) {
+          int ret;
+          __asm__ __volatile__ (
+           "     l     %0,0(%2)\n"
+           "0:   cs    %0,%1,0(%2)\n"
+           "     jl    0b"
+           : "=&d" (ret)
+           : "d" (1), "a" (addr)
+           : "cc", "memory");
+          return ret;
+        }
+ #    endif
  #  endif /* __GNUC__ */
  #  if (defined(ALPHA) && !defined(__GNUC__))
! #    ifndef OSF1
!       --> We currently assume that if gcc is not used, we are
!       --> running under Tru64.
! #    endif
! #    include <machine/builtins.h>
! #    include <c_asm.h>
! #    define GC_test_and_set(addr) __ATOMIC_EXCH_LONG(addr, 1)
  #    define GC_TEST_AND_SET_DEFINED
+ #    define GC_clear(addr) { asm("mb"); *(volatile unsigned *)addr = 0; }
+ #    define GC_CLEAR_DEFINED
  #  endif
  #  if defined(MSWIN32)
***************
*** 220,224 ****
  #  endif
  #  ifdef MIPS
! #    if __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) \
        || !defined(_COMPILER_VERSION) || _COMPILER_VERSION < 700
  #      ifdef __GNUC__
--- 244,252 ----
  #  endif
  #  ifdef MIPS
! #    ifdef LINUX
! #      include <sys/tas.h>
! #      define GC_test_and_set(addr) _test_and_set((int *) addr,1)
! #      define GC_TEST_AND_SET_DEFINED
! #    elif __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) \
        || !defined(_COMPILER_VERSION) || _COMPILER_VERSION < 700
  #      ifdef __GNUC__
***************
*** 267,271 ****
  
  #  if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
!       && !defined(GC_IRIX_THREADS)
  #    define NO_THREAD (pthread_t)(-1)
  #    include <pthread.h>
--- 295,299 ----
  
  #  if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
!       && !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS)
  #    define NO_THREAD (pthread_t)(-1)
  #    include <pthread.h>
***************
*** 303,307 ****
           }
  #      endif /* !GENERIC_COMPARE_AND_SWAP */
!        inline static void GC_memory_write_barrier()
         {
         /* We believe the processor ensures at least processor */
--- 331,335 ----
           }
  #      endif /* !GENERIC_COMPARE_AND_SWAP */
!        inline static void GC_memory_barrier()
         {
         /* We believe the processor ensures at least processor */
***************
*** 325,329 ****
  #      if 0
        /* Shouldn't be needed; we use volatile stores instead. */
!         inline static void GC_memory_write_barrier()
          {
            __asm__ __volatile__("mf" : : : "memory");
--- 353,357 ----
  #      if 0
        /* Shouldn't be needed; we use volatile stores instead. */
!         inline static void GC_memory_barrier()
          {
            __asm__ __volatile__("mf" : : : "memory");
***************
*** 331,334 ****
--- 359,423 ----
  #      endif /* 0 */
  #     endif /* IA64 */
+ #     if defined(ALPHA)
+ #      if !defined(GENERIC_COMPARE_AND_SWAP)
+ #        if defined(__GNUC__)
+            inline static GC_bool GC_compare_and_exchange(volatile GC_word 
*addr,
+                                                        GC_word old, GC_word 
new_val) 
+          {
+            unsigned long was_equal;
+              unsigned long temp;
+ 
+              __asm__ __volatile__(
+                              "1:     ldq_l %0,%1\n"
+                              "       cmpeq %0,%4,%2\n"
+                            "       mov %3,%0\n"
+                              "       beq %2,2f\n"
+                              "       stq_c %0,%1\n"
+                              "       beq %0,1b\n"
+                              "2:\n"
+                              "       mb\n"
+                              :"=&r" (temp), "=m" (*addr), "=&r" (was_equal)
+                              : "r" (new_val), "Ir" (old)
+                            :"memory");
+              return was_equal;
+            }
+ #        else /* !__GNUC__ */
+            inline static GC_bool GC_compare_and_exchange(volatile GC_word 
*addr,
+                                                        GC_word old, GC_word 
new_val) 
+         {
+           return __CMP_STORE_QUAD(addr, old, new_val, addr);
+           }
+ #        endif /* !__GNUC__ */
+ #      endif /* !GENERIC_COMPARE_AND_SWAP */
+ #      ifdef __GNUC__
+          inline static void GC_memory_barrier()
+          {
+            __asm__ __volatile__("mb" : : : "memory");
+          }
+ #      else
+ #      define GC_memory_barrier() asm("mb")
+ #      endif /* !__GNUC__ */
+ #     endif /* ALPHA */
+ #     if defined(S390)
+ #      if !defined(GENERIC_COMPARE_AND_SWAP)
+          inline static GC_bool GC_compare_and_exchange(volatile C_word *addr,
+                                          GC_word old, GC_word new_val)
+          {
+            int retval;
+            __asm__ __volatile__ (
+ #            ifndef __s390x__
+                "     cs  %1,%2,0(%3)\n"
+ #            else
+                "     csg %1,%2,0(%3)\n"
+ #            endif
+              "     ipm %0\n"
+              "     srl %0,28\n"
+              : "=&d" (retval), "+d" (old)
+              : "d" (new_val), "a" (addr)
+              : "cc", "memory");
+            return retval == 0;
+          }
+ #      endif
+ #     endif
  #     if !defined(GENERIC_COMPARE_AND_SWAP)
          /* Returns the original value of *addr.       */
***************
*** 436,440 ****
  #    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, 1)) GC_lock(); }
  #    define UNLOCK() GC_clear(&GC_allocate_lock);
       extern VOLATILE GC_bool GC_collecting;
--- 525,529 ----
  #    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;
***************
*** 445,453 ****
  #    define EXIT_GC() GC_collecting = 0;
  #  endif /* GC_IRIX_THREADS */
! #  ifdef GC_WIN32_THREADS
! #    include <windows.h>
!      GC_API CRITICAL_SECTION GC_allocate_ml;
! #    define LOCK() EnterCriticalSection(&GC_allocate_ml);
! #    define UNLOCK() LeaveCriticalSection(&GC_allocate_ml);
  #  endif
  #  ifndef SET_LOCK_HOLDER
--- 534,549 ----
  #    define EXIT_GC() GC_collecting = 0;
  #  endif /* GC_IRIX_THREADS */
! #  if defined(GC_WIN32_THREADS)
! #    if defined(GC_PTHREADS)
! #      include <pthread.h>
!        extern pthread_mutex_t GC_allocate_ml;
! #      define LOCK()   pthread_mutex_lock(&GC_allocate_ml)
! #      define UNLOCK() pthread_mutex_unlock(&GC_allocate_ml)
! #    else
! #      include <windows.h>
!        GC_API CRITICAL_SECTION GC_allocate_ml;
! #      define LOCK() EnterCriticalSection(&GC_allocate_ml);
! #      define UNLOCK() LeaveCriticalSection(&GC_allocate_ml);
! #    endif
  #  endif
  #  ifndef SET_LOCK_HOLDER

Index: gc_pmark.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/include/private/gc_pmark.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** gc_pmark.h  8 Apr 2002 23:36:50 -0000       1.2
--- gc_pmark.h  6 Feb 2003 01:35:46 -0000       1.3
***************
*** 282,294 ****
  /*
   * Push a single value onto mark stack. Mark from the object pointed to by p.
   * P is considered valid even if it is an interior pointer.
   * Previously marked objects are not pushed.  Hence we make progress even
   * if the mark stack overflows.
   */
! # define GC_PUSH_ONE_STACK(p, source) \
!     if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr     \
         && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
         PUSH_ONE_CHECKED_STACK(p, source);     \
!     }
  
  /*
--- 282,311 ----
  /*
   * Push a single value onto mark stack. Mark from the object pointed to by p.
+  * Invoke FIXUP_POINTER(p) before any further processing.
   * P is considered valid even if it is an interior pointer.
   * Previously marked objects are not pushed.  Hence we make progress even
   * if the mark stack overflows.
   */
! 
! # if NEED_FIXUP_POINTER
!     /* Try both the raw version and the fixed up one. */
! #   define GC_PUSH_ONE_STACK(p, source) \
!       if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr   \
!        && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
!        PUSH_ONE_CHECKED_STACK(p, source);     \
!       } \
!       FIXUP_POINTER(p); \
!       if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr   \
         && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
         PUSH_ONE_CHECKED_STACK(p, source);     \
!       }
! # else /* !NEED_FIXUP_POINTER */
! #   define GC_PUSH_ONE_STACK(p, source) \
!       if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr   \
!        && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
!        PUSH_ONE_CHECKED_STACK(p, source);     \
!       }
! # endif
! 
  
  /*
***************
*** 297,300 ****
--- 314,318 ----
   */
  # define GC_PUSH_ONE_HEAP(p,source) \
+     FIXUP_POINTER(p); \
      if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr     \
         && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \

Index: gc_priv.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/include/private/gc_priv.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** gc_priv.h   8 Apr 2002 23:36:50 -0000       1.2
--- gc_priv.h   6 Feb 2003 01:35:46 -0000       1.3
***************
*** 443,447 ****
  
  /* Print warning message, e.g. almost out of memory.  */
! # define WARN(msg,arg) (*GC_current_warn_proc)(msg, (GC_word)(arg))
  extern GC_warn_proc GC_current_warn_proc;
  
--- 443,447 ----
  
  /* Print warning message, e.g. almost out of memory.  */
! # define WARN(msg,arg) (*GC_current_warn_proc)("GC Warning: " msg, 
(GC_word)(arg))
  extern GC_warn_proc GC_current_warn_proc;
  
***************
*** 590,596 ****
   
  # ifdef LARGE_CONFIG
! #   define LOG_PHT_ENTRIES  19  /* Collisions likely at 512K blocks,  */
!                               /* which is >= 2GB.  Each table takes   */
!                               /* 64KB.                                */
  # else
  #   ifdef SMALL_CONFIG
--- 590,597 ----
   
  # ifdef LARGE_CONFIG
! #   define LOG_PHT_ENTRIES  20  /* Collisions likely at 1M blocks,    */
!                               /* which is >= 4GB.  Each table takes   */
!                               /* 128KB, some of which may never be    */
!                               /* touched.                             */
  # else
  #   ifdef SMALL_CONFIG
***************
*** 600,604 ****
  #   else /* default "medium" configuration */
  #     define LOG_PHT_ENTRIES  16 /* Collisions are likely if heap grows       
*/
!                                /* to more than 16K hblks >= 256MB.    */
                                 /* Each hash table occupies 8K bytes.  */
  #   endif
--- 601,605 ----
  #   else /* default "medium" configuration */
  #     define LOG_PHT_ENTRIES  16 /* Collisions are likely if heap grows       
*/
!                                /* to more than 64K hblks >= 256MB.    */
                                 /* Each hash table occupies 8K bytes.  */
  #   endif
***************
*** 841,844 ****
--- 842,849 ----
        /* Number of explicitly deallocated words of memory     */
        /* since last collection.                               */
+   word _finalizer_mem_freed;
+       /* Words of memory explicitly deallocated while         */
+       /* finalizers were running.  Used to approximate mem.   */
+       /* explicitly deallocated by finalizers.                */
    ptr_t _scratch_end_ptr;
    ptr_t _scratch_last_end_ptr;
***************
*** 1011,1014 ****
--- 1016,1020 ----
  # define GC_non_gc_bytes_at_gc GC_arrays._non_gc_bytes_at_gc
  # define GC_mem_freed GC_arrays._mem_freed
+ # define GC_finalizer_mem_freed GC_arrays._finalizer_mem_freed
  # define GC_scratch_end_ptr GC_arrays._scratch_end_ptr
  # define GC_scratch_last_end_ptr GC_arrays._scratch_last_end_ptr
***************
*** 1169,1173 ****
  extern GC_bool GC_debugging_started;  /* GC_debug_malloc has been called. */ 
  
!                       
  /* Operations */
  # ifndef abs
--- 1175,1184 ----
  extern GC_bool GC_debugging_started;  /* GC_debug_malloc has been called. */ 
  
! extern long GC_large_alloc_warn_interval;
!       /* Interval between unsuppressed warnings.      */
! 
! extern long GC_large_alloc_warn_suppressed;
!       /* Number of warnings suppressed so far.        */
! 
  /* Operations */
  # ifndef abs
***************
*** 1403,1406 ****
--- 1414,1422 ----
  void GC_register_dynamic_libraries GC_PROTO((void));
                /* Add dynamic library data sections to the root set. */
+ 
+ GC_bool GC_register_main_static_data GC_PROTO((void));
+               /* We need to register the main data segment.  Returns  */
+               /* TRUE unless this is done implicitly as part of       */
+               /* dynamic library registration.                        */
    
  /* Machine dependent startup routines */
***************
*** 1642,1655 ****
  extern void (*GC_check_heap) GC_PROTO((void));
                        /* Check that all objects in the heap with      */
!                       /* debugging info are intact.  Print            */
!                       /* descriptions of any that are not.            */
  extern void (*GC_print_heap_obj) GC_PROTO((ptr_t p));
                        /* If possible print s followed by a more       */
                        /* detailed description of the object           */
                        /* referred to by p.                            */
  
  extern GC_bool GC_print_stats;        /* Produce at least some logging output 
*/
                                /* Set from environment variable.       */
  
  /* Macros used for collector internal allocation.     */
  /* These assume the collector lock is held.           */
--- 1658,1691 ----
  extern void (*GC_check_heap) GC_PROTO((void));
                        /* Check that all objects in the heap with      */
!                       /* debugging info are intact.                   */
!                       /* Add any that are not to GC_smashed list.     */
! extern void (*GC_print_all_smashed) GC_PROTO((void));
!                       /* Print GC_smashed if it's not empty.          */
!                       /* Clear GC_smashed list.                       */
! extern void GC_print_all_errors GC_PROTO((void));
!                       /* Print smashed and leaked objects, if any.    */
!                       /* Clear the lists of such objects.             */
  extern void (*GC_print_heap_obj) GC_PROTO((ptr_t p));
                        /* If possible print s followed by a more       */
                        /* detailed description of the object           */
                        /* referred to by p.                            */
+ #if defined(LINUX) && defined(__ELF__) && !defined(SMALL_CONFIG)
+   void GC_print_address_map GC_PROTO((void));
+                       /* Print an address map of the process.         */
+ #endif
  
+ extern GC_bool GC_have_errors;  /* We saw a smashed or leaked object. */
+                               /* Call error printing routine          */
+                               /* occasionally.                        */
  extern GC_bool GC_print_stats;        /* Produce at least some logging output 
*/
                                /* Set from environment variable.       */
  
+ #ifndef NO_DEBUGGING
+   extern GC_bool GC_dump_regularly;  /* Generate regular debugging dumps. */
+ # define COND_DUMP if (GC_dump_regularly) GC_dump();
+ #else
+ # define COND_DUMP
+ #endif
+ 
  /* Macros used for collector internal allocation.     */
  /* These assume the collector lock is held.           */
***************
*** 1723,1726 ****
--- 1759,1763 ----
  void GC_print_heap_sects GC_PROTO((void));
  void GC_print_static_roots GC_PROTO((void));
+ void GC_print_finalization_stats GC_PROTO((void));
  void GC_dump GC_PROTO((void));
  
***************
*** 1859,1863 ****
  #    endif
  #   else  /* !GC_LINUX_THREADS */
! #    define SIG_SUSPEND _SIGRTMIN + 6
  #   endif
  #  endif /* !SIG_SUSPEND */
--- 1896,1904 ----
  #    endif
  #   else  /* !GC_LINUX_THREADS */
! #     if defined(_SIGRTMIN)
! #       define SIG_SUSPEND _SIGRTMIN + 6
! #     else
! #       define SIG_SUSPEND SIGRTMIN + 6
! #     endif       
  #   endif
  #  endif /* !SIG_SUSPEND */

Index: gcconfig.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/include/private/gcconfig.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** gcconfig.h  29 Jan 2003 04:56:58 -0000      1.4
--- gcconfig.h  6 Feb 2003 01:35:46 -0000       1.5
***************
*** 14,17 ****
--- 14,25 ----
   * modified is included with the above copyright notice.
   */
+ 
+ /*
+  * This header is private to the gc.  It is almost always included from
+  * gc_priv.h.  However it is possible to include it by itself if just the
+  * configuration macros are needed.  In that
+  * case, a few declarations relying on types declared in gc_priv.h will be
+  * omitted.
[...1732 lines suppressed...]
!                               NewPtrClear(bytes + GC_page_size) + 
GC_page_size-1)
  #         endif
  #       else
  #         ifdef MSWINCE
! #           ifdef GC_PRIVATE_H
!               extern ptr_t GC_wince_get_mem();
! #           endif
  #           define GET_MEM(bytes) (struct hblk *)GC_wince_get_mem(bytes)
  #         else
  #           if defined(AMIGA) && defined(GC_AMIGA_FASTALLOC)
!                       extern void *GC_amiga_get_mem(size_t size);
!                       define GET_MEM(bytes) HBLKPTR((size_t) \
!                         GC_amiga_get_mem((size_t)bytes + GC_page_size) \
!                         + GC_page_size-1)
  #           else
! #             ifdef GC_PRIVATE_H
!                 extern ptr_t GC_unix_get_mem();
! #             endif
  #               define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes)
  #           endif

Index: solaris_threads.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/include/private/solaris_threads.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** solaris_threads.h   8 Apr 2002 23:36:50 -0000       1.2
--- solaris_threads.h   6 Feb 2003 01:35:46 -0000       1.3
***************
*** 17,21 ****
  #      define CLIENT_OWNS_STACK        4
                                 /* Stack was supplied by client.        */
! #      define SUSPENDED 8      /* Currently suspended. */
      ptr_t stack;
      size_t stack_size;
--- 17,22 ----
  #      define CLIENT_OWNS_STACK        4
                                 /* Stack was supplied by client.        */
! #      define SUSPNDED 8       /* Currently suspended.                        
*/
!                              /* SUSPENDED is used insystem header.    */
      ptr_t stack;
      size_t stack_size;

Index: specific.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/include/private/specific.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** specific.h  8 Apr 2002 23:36:50 -0000       1.2
--- specific.h  6 Feb 2003 01:35:46 -0000       1.3
***************
*** 86,90 ****
      tse * volatile * entry_ptr = key -> cache + hash_val;
      tse * entry = *entry_ptr;   /* Must be loaded only once.  */
!     if (entry -> qtid == qtid) {
        GC_ASSERT(entry -> thread == pthread_self());
        return entry -> value;
--- 86,90 ----
      tse * volatile * entry_ptr = key -> cache + hash_val;
      tse * entry = *entry_ptr;   /* Must be loaded only once.  */
!     if (EXPECT(entry -> qtid == qtid, 1)) {
        GC_ASSERT(entry -> thread == pthread_self());
        return entry -> value;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]