r129239 - in /branches/incremental-compiler/gcc...

tromey@gcc.gnu.org tromey@gcc.gnu.org
Thu Oct 11 20:34:00 GMT 2007


Author: tromey
Date: Thu Oct 11 20:34:33 2007
New Revision: 129239

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129239
Log:
	* Makefile.in (LIBS): Add -lpthread.
	* system.h (GCC_THREAD): New define.
	* ggc-page.c (ggc_alloc_stat): Lock.
	(ggc_get_size): Lock.
	(ggc_free): Lock.
	(ggc_collect): Call ggc_thread_pause, ggc_collection_completed.
	* ggc-zone.c (ggc_alloc_zone_stat): Lock.
	(ggc_free): Lock.
	(ggc_get_size): Lock.
	(new_ggc_zone): Lock.
	(destroy_ggc_zone): Lock.
	(ggc_collect): Call ggc_thread_pause, ggc_collection_completed.
	* ggc-common.c (global_root_list): New global.
	(ggc_mark_roots): Mark thread-local roots.
	(roots, ggc_n_threads, ggc_gc_lock, gc_condition,
	ggc_n_waiting_threads, collection_generation): New globals.
	(ggc_thread_init): New function.
	(ggc_thread_start): Likewise.
	(ggc_thread_clean_up): Likewise.
	(ggc_thread_pause): Likewise.
	(ggc_collection_completed): Likewise.
	(ggc_thread_ignore_me): Likewise.
	* ggc.h: Include host-thread.h.
	(struct ggc_thread_roots): New.
	(struct ggc_thread_root_list): New.
	(ggc_thread_registration_function): New typedef.
	(gt_ggc_thread_funcs): Declare.
	(ggc_gc_lock): Likewise.
	(ggc_thread_init, ggc_thread_start, ggc_thread_clean_up,
	ggc_thread_ignore_me, ggc_thread_pause, ggc_collection_completed):
	Declare.
	* gengtype-parse.c (extern_or_static): Handle GCC_THREAD.
	* gengtype-lex.l: Recognize "GGC_THREAD".
	* toplev.c (general_init): Call ggc_thread_init.
	* host-thread.h: New file.
	* gengtype.h (THREAD): New value.
	(note_variable): Update.
	* gengtype.c (struct pair) <thread_local>: New field.
	(do_typedef): Initialize it.
	(note_variable): Added 'thread_local' argument.
	(create_field_all): Initialize new field.
	(struct flist) <item_count, saved_offset>: New fields.
	(finish_thread_registration): New function.
	(write_thread_lang_registration): Likewise.
	(start_root_field): Likewise.
	(end_root_field): Likewise.
	(write_root): Handle thread-local variables.
	(start_thread_local_table): New function.
	(write_roots): Added 'thread_local' argument.  Write thread
	registration functions.
	(main): Call write_roots twice.

Added:
    branches/incremental-compiler/gcc/host-thread.h
Modified:
    branches/incremental-compiler/gcc/ChangeLog
    branches/incremental-compiler/gcc/Makefile.in
    branches/incremental-compiler/gcc/gengtype-lex.l
    branches/incremental-compiler/gcc/gengtype-parse.c
    branches/incremental-compiler/gcc/gengtype.c
    branches/incremental-compiler/gcc/gengtype.h
    branches/incremental-compiler/gcc/ggc-common.c
    branches/incremental-compiler/gcc/ggc-page.c
    branches/incremental-compiler/gcc/ggc-zone.c
    branches/incremental-compiler/gcc/ggc.h
    branches/incremental-compiler/gcc/system.h
    branches/incremental-compiler/gcc/toplev.c



More information about the Gcc-cvs mailing list