[M3commit] CVS Update: cm3
Jay Krell
jkrell at elego.de
Wed Apr 29 02:21:07 CEST 2009
CVSROOT: /usr/cvs
Changes by: jkrell at birch. 09/04/29 02:21:07
Modified files:
cm3/m3-libs/m3core/src/thread/PTHREAD/: ThreadPThread.m3
Log message:
now that initialization is in better shape, go back to
PushEFrame assumes initialization has already occured, else crashes.
This should save a few cycles off functions that use try or lock.
NEW used in InitActivations
Could now use NEW/DISPOSE for mutexes/conditions also, ref array of char, but not yet
(I just need to lookup syntax)
(Tony prefers all allocations use NEW and not Cstdlib.calloc; calloc
was used here before because NEW used TRY/RAISE, TRY/RAISED used PushEFrame, PushEFrame
used NEW => circularity, fixed previously by having PushEFrame use calloc
instead of NEW, now fixed by having NEW only use TRY/RAISE (just RAISE actually)
in the failure path -- early initialization/allocation is "fragile"
in that if you can't allocate much of anything at all, you'll crash
or infinitely recurse, whereas before, well, we left it derefing NULL
from calloc anyway; note that "startup" isn't "necessarily" early, such
as in a dynamically loaded case -- better might be on Win32 to push
early allocation into DllMain and fail that if low on resources, or try
to somehow propagate the errors whenever they occur -- i.e. raising an exception
should require very little resources, allocated up front with the process or thread).
More information about the M3commit
mailing list