Changeset 442 for trunk/src


Ignore:
Timestamp:
Jul 25, 2003, 3:57:29 PM (22 years ago)
Author:
bird
Message:

One static flag is enough and safer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gcc/gcc/config/i386/emx-ctordtor.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r441 r442  
    66extern void __ctordtorInit1 (int *);
    77extern void __ctordtorTerm1 (int *);
     8
     9/** Exception handler stuff init indicator. 0 means not inited, 1 means inited. */
     10static int inited;
    811extern void __ctordtorInit (void);
    912extern void __ctordtorTerm (void);
    1013
     14/**
     15 * Create static C++ objects.
     16 */
    1117void __ctordtorInit (void)
    1218{
    13   static int done;
    14 
    15   if (!done)
     19  if (!inited)
    1620    {
    17       done = 1;
     21      inited = 1;
    1822      __ctordtorInit1 (&__CTOR_LIST__);
    1923    }
    2024}
    2125
     26/**
     27 * Destroy static C++ objects.
     28 */
    2229void __ctordtorTerm (void)
    2330{
    24   static int done;
    25 
    26   if (!done)
     31  if (inited)
    2732    {
    28       done = 1;
     33      inited = 0;
    2934      __ctordtorTerm1 (&__DTOR_LIST__);
    3035    }
Note: See TracChangeset for help on using the changeset viewer.