Static locals (Was: Updated mangling specs)

Jonathan Schilling jls at sco.com
Thu Feb 10 19:22:00 UTC 2000


> From owner-cxx-abi at corp.sgi.com Thu Feb 10 13:41:26 2000
> 
> [...] If compilers want thread-aware initialization of such a variable, a
> simple two-state value does not suffice, as there are at least three
> possible states:
> - variable is uninitialized
> - initialization is in progress (so other threads should block when
>   the reach the variable declaration)
> - variable is fully initialized
> 
> Whether or not thread-safe initialization is part of the ABI or an
> extension is another issue, IMHO; if it was, the mechanism would need
> to be specified (along with the mangling for the mutexes and so on).
> 
> However, I think the ABI should support the three-state approach in
> any case: this will also allow to detect recursive entering of
> initializations (which has undefined behaviour).

Thread-safe initialization is issue G-4 on the open issues list.

It's not clear from what you wrote whether your comments are in response
to the discussion in that issue or not.  I still think this is something 
the ABI should cover.

Jonathan Schilling		SCO, Inc.		jls at sco.com




More information about the cxx-abi-dev mailing list