[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] Feedback needed, especially non-Linux

From: David Fang
Subject: Re: [Gnucap-devel] Feedback needed, especially non-Linux
Date: Thu, 22 Feb 2007 17:23:43 -0500 (EST)

> I'm not well-versed in the source, but are you depending on ordering of
> static globals somehow?

        Ok, it didn't take long to find various comments about link
ordering: src/,, etc... :)
        Link-ordering and global initialization ordering between
translation units are not related; you cannot depend on link ordering to
influence the other.  When it happens to work, consider yourself lucky!
        I'd advise wrapping access to global variables/structures through
some init-once interface, like a function, rather than relying on
ordering.  If you need to be precise about global object lifetime,
consider using a reference-count pointer to manage orderly destruction.
Does this help?

David Fang
Computer Systems Laboratory
Electrical & Computer Engineering
Cornell University
        -- (2400 baud? Netscape 3.0?? lynx??? No problem!)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]