[M3devel] up-front initialization of mutex/conditionvariable?

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Tue Dec 15 15:08:46 CET 2009


On Mon, Dec 14, 2009 at 11:39:08PM -0500, Tony Hosking wrote:
> So, the basic scenario is as follows.  Briefly... We should ditch 
> signals as a mechanism for stopping threads.  The compiler should 
> inject a "safe-point" at each procedure call and backward branch.  At 
> safe-points, the thread polls a thread-local to see if the run-time 
> system needs it to step out-of-line for some reason.

...
...
> 
> The point is that uncontended locks should cost almost nothing.

Nothing?  All those safe-points cost time, don't they, even when no 
locks are being used at all?

Is this analogous to charging everyone for the overhead involved in 
recursion, even when no recursion is being used?

-- hendrik



More information about the M3devel mailing list