This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How EGCS with multi-threaded compliance?
- To: Nathan Myers <ncm at cygnus dot com>
- Subject: Re: How EGCS with multi-threaded compliance?
- From: David Lucas <dlucas at checkfree dot com>
- Date: Tue, 14 Apr 1998 09:13:54 -0400
- CC: egcs at cygnus dot com
- Organization: CheckFree, SSD
- References: <199804140327.UAA18022@pern.cygnus.com.>
Nathan Myers wrote:
>
> David Lucas <dlucas@checkfree.com>
> > Just an observastion, but some compilers do not even guarentee that
> > init_lock will be initialized before the use of f_initialize_a, thus a
> > possible uninitialized Mutex object.
>
> On any Real System, the mutex object is correctly initialized
> by the runtime loader before any static constructors are run.
> That is, the zero value is a valid, unlocked mutex.
But if the function using the static object (mutex) is being called from
static space, and not after main starts (which at that point all statics
are guarenteed initialized), then a chicken and egg condition could
occur. =-)
Later,
Dave
--
-----------------------------------------------------------------
David Lucas | mailto:dlucas@checkfree.com
Staff Software Engineer |
Systems Software Development | My opinions are IMHO.
OFX Server Devl 08-126 |
|
CheckFree Corporation | Work# 614.825.3511
8275 High Street | Fax# 614.825.3104
Columbus, OH 43235 | http://www.checkfree.com
-----------------------------------------------------------------