GCCallBack.mesa
Copyright Ó 1990, 1991 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, June 1, 1990 12:26 pm PDT
GCCallBack: CEDAR DEFINITIONS
~ BEGIN
Registers procedures which will be called just before and just after any garbage collection which stops the world.
These routines are used to declare the stop-the-world phase; clients must not assume knowledge of the internal garbage collector state. In fact, a completely parallel garbage collector might never call any of these registered procedures.
These routines are not for casual use: they may be called inside the GC monitor lock, and so must not allocate any storage.
If multiple procedures are registered, they are called in unspecified order.
Clients must not make any assumption on which thread the registered procedures are called.
The registered procedures must be global and must not cause start traps.
RegisterBefore: PROC [proc: PROC [REF], clientData: REF ¬ NIL];
proc will be called just before any garbage collection which stops the world.
clientData will be passed to proc.
RegisterAfter: PROC [proc: PROC [REF], clientData: REF ¬ NIL];
proc will be called just after any garbage collection which stops the world.
clientData will be passed to proc.
END.