From 2276d513a3fef164eda1327a4d0bc463cbfb25ad Mon Sep 17 00:00:00 2001 From: hboehm Date: Wed, 6 Dec 2006 19:16:14 +0000 Subject: [PATCH] 2006-12-06 Hans Boehm and Peter Wang * include/private/thread_local_alloc.h, include/new_gc_alloc.h: Fix __GNUC__ spelling. * include/gc.h (GC_general_register_disappearing_link): Add comments. --- doc/README.changes | 6 ++++++ include/gc.h | 9 +++++++++ include/new_gc_alloc.h | 2 +- include/private/thread_local_alloc.h | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/README.changes b/doc/README.changes index 6e4b8e04..7d437bb0 100644 --- a/doc/README.changes +++ b/doc/README.changes @@ -2290,6 +2290,7 @@ Since gc6.7: Since gc6.8: - Fix typo in PREFETCH implementation for X86_64. (Thanks to Peter Wang.) - Fix M68K LINUX port. (Thanks to Debian packagers.) + - __GNUC__ was misspelled as __GNUC in new_gc_alloc.h. (Thanks to Peter Wang.) Since gc6.9: - Remove GC_PROTO, VOLATILE, GC_PTR, and GC_CONST. Assume ANSI C compiler @@ -2538,6 +2539,11 @@ Since first gc7.0alpha8 version: [ Some gc6.9 changes ] - Change FindTopOfStack decl in darwin_stop_world.c. - Move some static tests from misc.c to gcconfig.h. Use #error. + - Add GC_print_free_list() function. (Thanks to Bruce Hoult.) + - Add GC_GNU_THREADS support on HURD. (Thanks to Aleksey Demakov, + Barry DeFreese, and possibly other Debian maintainers.) + - __GNUC__ was misspelled as __GNUC in thread_local_alloc.h. + (Thanks to Peter Wang.) To do: - REDIRECT_MALLOC and threads combination should work on more platforms, diff --git a/include/gc.h b/include/gc.h index b15224e3..b3f3b9e7 100644 --- a/include/gc.h +++ b/include/gc.h @@ -724,6 +724,15 @@ GC_API int GC_general_register_disappearing_link (void * * link, void * obj); /* the object containing link. Explicitly deallocating */ /* obj may or may not cause link to eventually be */ /* cleared. */ + /* This can be used to implement certain types of */ + /* weak pointers. Note however that this generally */ + /* requires that thje allocation lock is held (see */ + /* GC_call_with_allock_lock() below) when the disguised */ + /* pointer is accessed. Otherwise a strong pointer */ + /* could be recreated between the time the collector */ + /* decides to reclaim the object and the link is */ + /* cleared. */ + GC_API int GC_unregister_disappearing_link (void * * link); /* Returns 0 if link was not actually registered. */ /* Undoes a registration by either of the above two */ diff --git a/include/new_gc_alloc.h b/include/new_gc_alloc.h index 7668e49e..b4906af5 100644 --- a/include/new_gc_alloc.h +++ b/include/new_gc_alloc.h @@ -67,7 +67,7 @@ /* A hack to deal with gcc 3.1. If you are using gcc3.1 and later, */ /* you should probably really use gc_allocator.h instead. */ #if defined (__GNUC__) && \ - (__GNUC > 3 || (__GNUC__ == 3 && (__GNUC_MINOR__ >= 1))) + (__GNUC__ > 3 || (__GNUC__ == 3 && (__GNUC_MINOR__ >= 1))) # define simple_alloc __simple_alloc #endif diff --git a/include/private/thread_local_alloc.h b/include/private/thread_local_alloc.h index dfe9d756..2b11a1c7 100644 --- a/include/private/thread_local_alloc.h +++ b/include/private/thread_local_alloc.h @@ -40,7 +40,7 @@ # define USE_WIN32_COMPILER_TLS # endif /* !GNU */ # elif defined(LINUX) && \ - (__GNUC__ > 3 || (__GNUC == 3 && __GNUC_MINOR__ >=3)) + (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >=3)) # define USE_COMPILER_TLS # elif (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \ defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)) || \ -- 2.49.0