aboutsummaryrefslogtreecommitdiff
path: root/gcc/gthr-win32.h
AgeCommit message (Collapse)AuthorFilesLines
2004-09-25c-typeck.c, [...]: Fix comment formatting.Kazu Hirata1-1/+1
* c-typeck.c, defaults.h, dwarf.h, dwarf2out.c, fold-const.c, gthr-dce.h, gthr-posix.h, gthr-solaris.h, gthr-win32.h, lambda-code.c, lambda-mat.c, libgcc2.c, stmt.c, tree-ssa-pre.c, tree-vn.c, tree.h: Fix comment formatting. From-SVN: r88102
2004-09-01gthr-win32.h (__gthread_recursive_mutex_t): Use 'unsigned long', not Windows ↵Wu Yongwei1-4/+17
'DWORD'. * gthr-win32.h (__gthread_recursive_mutex_t): Use 'unsigned long', not Windows 'DWORD'. (__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION): Correct typo. (__GTHREAD_RECURSIVE_MUTEX_INIT_DEFAULT): Likewise. (__gthr_win32_recursive_mutex_init_function): Add prototype for __GTHREAD_HIDE_WIN32API case.. (__gthr_win32_recursive_mutex_lock): Likewise. (__gthr_win32_recursive_mutex_trylock): Likewise. (__gthr_win32_recursive_mutex_unlock): Likewise. (__gthread_recursive_mutex_init_function); Add definition for __GTHREAD_HIDE_WIN32API case. (__gthread_recursive_mutex_lock): Correct call to InterlockedDecrement. * config/i386/grthr-win32.c (__gthread_recursive_mutex_lock): Correct call to InterlockedDecrement. Co-Authored-By: Danny Smith <dannysmith@users.sourceforge.net> From-SVN: r86939
2004-08-27re PR c++/13684 (local static object variable constructed once but ctors and ↵Jason Merrill1-0/+113
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-06-23gthr-win32.h (__GTHREAD_MUTEX_INIT_DEFAULT): Adjust.Wu Yongwei1-7/+30
2004-06-23 Wu Yongwei <adah@sh163.net> * gthr-win32.h (__GTHREAD_MUTEX_INIT_DEFAULT): Adjust. (__gthr_i486_lock_cmp_xchg): New inline assembly function. (__GTHR_W32_InterlockedCompareExchange): New macro to choose a suitable function for interlocked compare-and-exchange. (__gthread_mutex_trylock): Use __GTHR_W32_InterlockedCompareExchange. (__gthread_mutex_init_function, __gthread_mutex_lock, __gthread_mutex_trylock, __gthread_mutex_unlock): Adjust the initial counter value to work correctly under Windows 95. * config/i386/gthr-win32.c: Adjust include order. Define __GTHREAD_I486_INLINE_LOCK_PRIMITIVES before including gthr-win32.h. (__gthr_win32_mutex_init_function, __gthr_win32_mutex_lock, __gthr_win32_mutex_trylock, __gthr_win32_mutex_unlock): Adjust to match inline versions in gthr-win32.h. From-SVN: r83569
2004-04-27gthr-win32.h (__gthread_mutex_t): Change typedef to new structure.Wu Yongwei1-15/+25
2004-04-27 Wu Yongwei <adah@sh163.net> * gthr-win32.h (__gthread_mutex_t): Change typedef to new structure. (__GTHREAD_MUTEX_INIT_DEFAULT): Adjust. (__gthread_mutex_init_function): Replace CreateMutex with initialization of custom mutex using CreateSemaphore. (__gthread_mutex_lock): Use InterlockedIncrement. (__gthread_mutex_trylock): Use InterlockedCompareExchange. (__gthread_mutex_unlock): Use InterlockedDecrement and ReleaseSemaphore to unlock * config/i386/gthr-win32.c (__gthread_mutex_init_function, __gthread_mutex_lock, __gthread_mutex_trylock, __gthread_mutex_unlock): Adjust to match inline versions in gthr-win32.h. From-SVN: r81227
2003-05-21gthr-win32.h (__GTHREAD_HIDE_WIN32API): Test for non-zero value, not just if ↵Danny Smith1-2/+2
defined. * gthr-win32.h (__GTHREAD_HIDE_WIN32API): Test for non-zero value, not just if defined. * libstdc++-v3/config/os/mingw32/os_defines.h (__GTHREAD_HIDE_WIN32API): Define to 1 by defualt. (NOMINMAX): Define. From-SVN: r67069
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg1-16/+0
From-SVN: r60174
2002-11-12* gthr-win32.h: Fix formatting.Kazu Hirata1-51/+51
From-SVN: r59051
2002-09-22dbxout.c: Follow spelling conventions.Kazu Hirata1-1/+1
* dbxout.c: Follow spelling conventions. * defaults.h: Likewise. * df.c: Likewise. * diagnostic.h: Likewise. * doloop.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * flags.h: Likewise. * flow.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * genconfig.c: Likewise. * genrecog.c: Likewise. * ggc-page.c: Likewise. * ggc.h: Likewise. * global.c: Likewise. * gthr-win32.h: Likewise. * integrate.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * langhooks.h: Likewise. * line-map.h: Likewise. * local-alloc.c: Likewise. * longlong.h: Likewise. * loop.c: Likewise. * loop.h: Likewise. From-SVN: r57406
2002-06-11gthr-win32.h: Wrap all functions in extern "C".Danny Smith1-14/+108
* gthr-win32.h: Wrap all functions in extern "C". (__gthread_key_t): Typedef as unsigned long, not win32 DWORD. (__GTHREAD_ONCE_INIT): Use 0, not win32 FALSE. (__gthread_mutex_t): Typedef as void*, not win32 HANDLE. (__gthr_win32_once, __gthr_win32_key_create, __gthr_win32_key_delete, __gthr_win32_getspecific, __gthr_win32_setspecific, __gthr_win32_mutex_init_function, __gthr_win32_mutex_lock,__gthr_win32_mutex_trylock, __gthr_win32_mutex_unlock): Declare. (__gthread_once,__gthread_key_create, __gthread_key_delete, __gthread_getspecific, __gthread_setspecific, __gthread_mutex_init_function, __gthread_mutex_lock,__gthread_mutex_trylock, __gthread_mutex_unlock): Call corresponding __gthr_win32_* extern implementations if #defined __GTHREAD_HIDE_WIN32API. * config/i386/t-mingw32 (LIB2FUNCS_EXTRA): Set to $(srcdir)/config/i386/gthr-win32.c * config/i386/gthr-win32.c: New implementation file. (__gthr_win32_once, __gthr_win32_key_create, __gthr_win32_key_delete, __gthr_win32_getspecific, __gthr_win32_setspecific, __gthr_win32_mutex_init_function, __gthr_win32_mutex_lock,__gthr_win32_mutex_trylock, __gthr_win32_mutex_unlock): New functions, based on static inlines in gthr-win32.h. From-SVN: r54484
2002-06-04gbl-ctors.h: Fix formatting.Kazu Hirata1-26/+26
* gbl-ctors.h: Fix formatting. * gcc.c: Likewise. * gccspec.c: Likewise. * gcov.c: Likewise. * gcov-io.h: Likewise. * gcse.c: Likewise. * ggc-common.c: Likewise. * ggc.h: Likewise. * ggc-page.c: Likewise. * ggc-simple.c: Likewise. * global.c: Likewise. * graph.h: Likewise. * gthr-dce.h: Likewise. * gthr.h: Likewise. * gthr-posix.h: Likewise. * gthr-rtems.h: Likewise. * gthr-solaris.h: Likewise. * gthr-win32.h: Likewise. From-SVN: r54240
2002-03-05gthr-win32.h (__GTHREAD_MUTEX_INIT_DEFAULT): Define.Danny Smith1-0/+1
From-SVN: r50336
2002-02-03gthr-win32.h: Protect against conflicting typedef for BOOL in windows ↵Christopher Faylor1-5/+18
headers and libobjc headers. * gthr-win32.h: Protect against conflicting typedef for BOOL in windows headers and libobjc headers. * gthr-win32.h (__mingwthr_key_dtor): Use extern "C" linkage for C++. (_mingw.h): Remove duplicate include. From-SVN: r49465
2002-01-18bitmap.h: Fix comment formatting.Kazu Hirata1-2/+2
* bitmap.h: Fix comment formatting. * combine.c: Likewise. * cppfiles.c: Likewise. * c-pragma.h: Likewise. * c-typeck.c: Likewise. * df.c: Likewise. * dwarf2out.c: Likewise. * function.c: Likewise. * gcc.c: Likewise. * genattrtab.c: Likewise. * gthr-win32.h: Likewise. * haifa-sched.c: Likewise. * predict.c: Likewise. * rtlanal.c: Likewise. * rtl.h: Likewise. * unwind-dw2-fde.h: Likewise. * unwind-pe.h: Likewise. * vmsdbgout.c: Likewise. From-SVN: r48987
2001-11-19re PR bootstrap/4448 (make bootstrap failed: gthr-win32.h erroneous)Craig Rodrigues1-1/+1
2001-11-18 Craig Rodrigues <rodrigc@gcc.gnu.org> PR c/4448 * gthr-win32.h: (__gthread_objc_thread_exit): Fix variable name __objc_thread_exit_status so that it matches the variable defined in objc/thr.h. From-SVN: r47157
2001-10-12gthr-dce.h: Fix comment formatting.Kazu Hirata1-25/+25
* 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-08-22Makefile.in, [...]: replace "GNU CC" with "GCC".Lars Brinkhoff1-12/+12
* 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-05-25Standardize header guards.Richard Henderson1-3/+3
From-SVN: r42615
2001-01-22gthr-win32.h: Include errno.h to get a declaration for EINVAL and _mingw.h if...Thomas Pfaff1-0/+4
* gthr-win32.h: Include errno.h to get a declaration for EINVAL and _mingw.h if the target is mingw32. From-SVN: r39187
2001-01-12gthr-win32.h (__gthread_objc_thread_get_data): Save and restore Win32 LastError.Thomas Pfaff1-2/+20
* gthr-win32.h (__gthread_objc_thread_get_data): Save and restore Win32 LastError. (__gthread_getspecific): Ditto. From-SVN: r38932
2000-07-20Applied H.J.Lu's patch to not require -lpthread when compiling single ↵H.J. Lu1-2/+245
threaded Objective-C programs. From-SVN: r35141
2000-02-12crtstuff.c (__do_global_ctors_aux, [...]): Add prototype argument.Kaveh R. Ghazi1-2/+2
* 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-01-27gthr-posix.h: Fix typo; compatibily -> compatibility.Fred Fish1-1/+1
* 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-17ggc-common.c: PROTO -> PARAMS.Kaveh R. Ghazi1-1/+1
* ggc-common.c: PROTO -> PARAMS. * ggc-page.c: Likewise. * ggc-simple.c: Likewise. * ggc.h: Likewise. * global.c: Likewise. * graph.c: Likewise. * gthr-win32.h: Likewise. * haifa-sched.c: Likewise. * halfpic.h: Likewise. * integrate.c: Likewise. * integrate.h: Likewise. * jump.c: Likewise. * lcm.c: Likewise. * local-alloc.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. From-SVN: r31458
2000-01-04gthr-win32.h (__gthread_active_p): Support Mingw MT runtime.Mumit Khan1-28/+64
2000-01-04 Mumit Khan <khan@xraylith.wisc.edu> * gthr-win32.h (__gthread_active_p): Support Mingw MT runtime. (__gthread_key_create): Likewise. (__gthread_key_dtor): Likewise. (__gthread_once): Fix logic. (__gthread_key_delete): Cast away constness. * i386/cygwin.h (SUBTARGET_SWITCHES): Add -mthreads option. * invoke.texi: Document. * i386/mingw32.h (CPP_SPEC): Use. (LIBGCC_SPEC): Likewise. * i386/crtdll.h (LIBGCC_SPEC): Likewise. From-SVN: r31215
1999-09-14* gthr-win32.h: New file.Mumit Khan1-0/+195
From-SVN: r29405