]> granicus.if.org Git - gc/commitdiff
* linux_threads.c (GC_init_parallel): Do not declare as a static
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Oct 2001 00:28:56 +0000 (00:28 +0000)
committerguest <ivmai@mail.ru>
Fri, 29 Jul 2011 06:54:20 +0000 (10:54 +0400)
constructor.
* include/gc.h (GC_init): Declare here. Add description.
* include/private/gc_priv.h (GC_init): Remove declaration.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46420 138bc75d-0d04-0410-961f-82ee72b054a4

ChangeLog
include/gc.h
include/private/gc_priv.h
linux_threads.c

index 58c5f39071ec7615706c928874efe3100357dc5b..2d67f75489a2fafaf4a58aca7b155c392fb003fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-10-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
+
+       * linux_threads.c (GC_init_parallel): Do not declare as a static
+       constructor.
+       * include/gc.h (GC_init): Declare here. Add description.
+       * include/private/gc_priv.h (GC_init): Remove declaration.
+
 2001-10-16  Loren J. Rittle  <ljrittle@acm.org>
 
        * include/gc_pthread_redirects.h: Generalize test to use GC_PTHREADS.
index 8ac709b9b5de370d1e205936b5bffe909bf55e3c..c73ecc0ae7a580f468f7888ee304a44c0a2f9150 100644 (file)
@@ -297,6 +297,14 @@ GC_API int GC_dont_precollect;  /* Don't collect as part of                */
                                /* Wizards only.                        */
 
 /* Public procedures */
+
+/* Initialize the collector.  This is only required when using thread-local
+ * allocation, since unlike the regular allocation routines, GC_local_malloc
+ * is not self-initializing.  If you use GC_local_malloc you should arrange
+ * to call this somehow (e.g. from a constructor) before doing any allocation.
+ */
+GC_API void GC_init GC_PROTO((void));
+
 /*
  * general purpose allocation routines, with roughly malloc calling conv.
  * The atomic versions promise that no relevant pointers are contained
index ad204e99267bfb30f7ab66c1092381659734837b..92067d24e707091981f2974bb3ae3c7dac7dadc4 100644 (file)
@@ -1629,7 +1629,6 @@ GC_bool GC_collect_or_expand GC_PROTO(( \
                                /* blocks available.  Should be called  */
                                /* until the blocks are available or    */
                                /* until it fails by returning FALSE.   */
-GC_API void GC_init GC_PROTO((void)); /* Initialize collector.         */
 
 #if defined(MSWIN32) || defined(MSWINCE)
   void GC_deinit GC_PROTO((void));
index ccd7dc65a743fa8919672cf3e9d54b9a50fd728e..b26988cef9e5d5b0158148b4b8149e9d09180c2c 100644 (file)
@@ -204,11 +204,7 @@ GC_thread GC_lookup_thread(pthread_t id);
 
 static GC_bool parallel_initialized = FALSE;
 
-# if defined(__GNUC__)
-    void GC_init_parallel() __attribute__ ((constructor));
-# else
-    void GC_init_parallel();
-# endif
+void GC_init_parallel();
 
 # if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)