Commit Graph

13 Commits

Author SHA1 Message Date
Richard Sandiford ac0d72f6f0 200x-xx-xx Richard Sandiford <richard@codesourcery.com> Phil Edwards <phil@codesourcery.com>
gcc/
200x-xx-xx  Richard Sandiford  <richard@codesourcery.com>
	    Phil Edwards  <phil@codesourcery.com>

	* gthr-vxworks.h: Add an extern "C" wrapper for C++.
	(__gthread_once_t): Remove busy field for RTPs.
	(__GTHREAD_ONCE_INIT): Update accordingly.

Co-Authored-By: Phil Edwards <phil@codesourcery.com>

From-SVN: r122923
2007-03-14 13:58:21 +00:00
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Jason Merrill 40aac94801 re PR c++/13684 (local static object variable constructed once but ctors and dtors called multiple times on same memory when called in multiple threads)
PR c++/13684
        * cp/decl.c (expand_static_init): Use thread-safety API.
        (register_dtor_fn): Return the call, don't expand it.
        * cp/tree.c (add_stmt_to_compound): New fn.
        (stabilize_call): Use it.
        * gimplify.c (gimplify_cleanup_point_expr): Handle CLEANUP_EH_ONLY.
        (gimple_push_cleanup): Add eh_only parm.
        (gimplify_target_expr): Pass it.
        * c.opt (-fno-threadsafe-statics): New option.
        * c-opts.c (c_common_handle_option): Handle it.
        * c-common.h (flag_threadsafe_statics): Declare it.
        * c-common.c (flag_threadsafe_statics): Record it.
        * doc/invoke.texi: Document it.
        * tsystem.h (_GNU_SOURCE): Define.
        * gthr-posix.h (__gthread_recursive_mutex_t): New typedef.
        (__GTHREAD_RECURSIVE_MUTEX_INIT): New macro.
        (__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION): New macro.
        (__gthread_recursive_mutex_init_function): New fn.
        (__gthread_recursive_mutex_lock): New fn.
        (__gthread_recursive_mutex_trylock): New fn.
        (__gthread_recursive_mutex_unlock): New fn.
        * gthr-solaris.h, gthr-single.h, gthr-dce.h: Likewise.
        * gthr-win32.h, gthr-vxworks.h: Likewise.
        * gthr.h: Document.

        * libsupc++/guard.cc (static_mutex): Internal class implementing a
        recursive mutex which controls initialization of local statics.
        (__gnu_cxx::recursive_init): New exception class.
        (__cxa_guard_acquire): Deal with locking and recursion detection.
        (acquire_1, __cxa_guard_abort, __cxa_guard_release): Likewise.

From-SVN: r86687
2004-08-27 22:33:54 -04:00
Zack Weinberg 4977bab6ed Merge basic-improvements-branch to trunk
From-SVN: r60174
2002-12-16 18:23:00 +00:00
Kazu Hirata 57751dd6cb * gthr-vxworks.h: Fix formatting.
From-SVN: r59095
2002-11-14 05:42:37 +00:00
Kazu Hirata 71287280a2 gthr-dce.h: Fix comment formatting.
* gthr-dce.h: Fix comment formatting.
	* gthr-posix.h: Likewise.
	* gthr-single.h: Likewise.
	* gthr-solaris.h: Likewise.
	* gthr-vxworks.h: Likewise.
	* gthr-win32.h: Likewise.

From-SVN: r46229
2001-10-12 13:10:33 +00:00
Lars Brinkhoff 1322177dbd Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
	bitmap.h, builtin-types.def, builtins.c, builtins.def,
	c-aux-info.c, c-common.c, c-common.def, c-common.h,
	c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
	c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
	c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
	caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
	conditions.h, config.gcc, configure.frag, configure.in,
	conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
	cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
	dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
	doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
	dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
	emit-rtl.c, errors.c, errors.h, except.c, except.h,
	exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
	fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
	function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
	gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
	gencheck.c, gencodes.c, genconfig.c, genemit.c,
	genextract.c, genflags.c, gengenrtl.c, genmultilib,
	genopinit.c, genoutput.c, genpeep.c, genrecog.c,
	gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
	ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
	graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
	gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
	gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
	hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
	integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
	libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
	machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
	mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
	mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
	params.h, predict.c, predict.def, predict.h, prefix.c,
	prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
	read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
	regclass.c, regmove.c, regrename.c, regs.h, reload.c,
	reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
	rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
	sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
	sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
	ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
	stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
	tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
	tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
	unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
	unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
	xcoffout.h: replace "GNU CC" with "GCC".

From-SVN: r45105
2001-08-22 14:35:51 +00:00
Richard Henderson 88657302b7 Standardize header guards.
From-SVN: r42615
2001-05-25 18:31:47 -07:00
H.J. Lu 15794a9567 Applied H.J.Lu's patch to not require -lpthread when compiling single threaded Objective-C programs.
From-SVN: r35141
2000-07-20 07:27:26 +00:00
Kaveh R. Ghazi d1e5132060 crtstuff.c (__do_global_ctors_aux, [...]): Add prototype argument.
* crtstuff.c (__do_global_ctors_aux, __reg_frame_ctor,
	__dereg_frame_dtor): Add prototype argument.

	* gthr-dce.h (__gthread_active_p, __gthread_once): Likewise.

	* gthr-posix.h (__gthread_active_p, __gthread_once): Likewise.

	* gthr-solaris.h (__gthread_active_p, __gthread_once): Likewise.

	* gthr-vxworks.h (__gthread_once): Likewise.

	* gthr-win32.h (__gthread_active_p, __gthread_once): Likewise.

From-SVN: r31945
2000-02-12 19:19:01 +00:00
Fred Fish 899905f6d3 gthr-posix.h: Fix typo; compatibily -> compatibility.
* gthr-posix.h: Fix typo; compatibily -> compatibility.
        * gthr-single.h: Likewise.
        * gthr-solaris.h: Likewise.
        * gthr-vxworks.h: Likewise.
        * gthr-win32.h: Likewise.
        * gthr.h: Likewise.

From-SVN: r31646
2000-01-27 10:49:12 -08:00
Mike Stump 0fcff08299 gthr-vxworks.h (__ehdtor): Fix memory leak.
* gthr-vxworks.h (__ehdtor): Fix memory leak.  The delete hook
        runs in the context of the deleter, not the deletee, so we must
        use taskVarGet to find the correct memory to free.
        (__gthread_key_create): Initialize the task
        variable subsystem so that the task variable is still active when
        the delete hook is run.

From-SVN: r24079
1998-12-03 17:28:34 -07:00
Mike Stump 7cc348893e gthr.h: Support systems that don't have weak, but have threads.
* gthr.h: Support systems that don't have weak, but have threads.
        * configure.in (*wrs-vxworks*): Use VxWorks threads by default.
        * gthr-vxworks.h: New file.
        * objc/thr-vxworks.h: Dummy file from thr-single.c for now.

From-SVN: r18971
1998-04-02 16:15:06 -07:00