/[cmucl]/src/code/scavhook.lisp
ViewVC logotype

Diff of /src/code/scavhook.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by dtc, Tue Nov 4 15:05:37 1997 UTC revision 1.4.56.1 by rtoy, Thu Feb 25 20:34:51 2010 UTC
# Line 15  Line 15 
15  ;;;  ;;;
16    
17  (in-package "EXT")  (in-package "EXT")
18    (intl:textdomain "cmucl")
19    
20  (export '(scavenger-hook scavenger-hook-p make-scavenger-hook  (export '(scavenger-hook scavenger-hook-p make-scavenger-hook
21            scavenger-hook-value scavenger-hook-function))            scavenger-hook-value scavenger-hook-function))
# Line 23  Line 24 
24  (progn  (progn
25    
26  (defun scavenger-hook-p (object)  (defun scavenger-hook-p (object)
27    "Returns T if OBJECT is a scavenger-hook, and NIL if not."    _N"Returns T if OBJECT is a scavenger-hook, and NIL if not."
28    (scavenger-hook-p object))    (scavenger-hook-p object))
29    
30  (defun make-scavenger-hook (&key value (function (required-argument)))  (defun make-scavenger-hook (&key value (function (required-argument)))
31    "Create a new scavenger-hook with the specified VALUE and FUNCTION.  For    _N"Create a new scavenger-hook with the specified VALUE and FUNCTION.  For
32     as long as the scavenger-hook is alive, the scavenger in the garbage     as long as the scavenger-hook is alive, the scavenger in the garbage
33     collector will note whenever VALUE is moved, and arrange for FUNCTION     collector will note whenever VALUE is moved, and arrange for FUNCTION
34     to be funcalled."     to be funcalled."
# Line 35  Line 36 
36    (c::%make-scavenger-hook value function))    (c::%make-scavenger-hook value function))
37    
38  (defun scavenger-hook-value (scavhook)  (defun scavenger-hook-value (scavhook)
39    "Returns the VALUE being monitored by SCAVHOOK.  Can be setf."    _N"Returns the VALUE being monitored by SCAVHOOK.  Can be setf."
40    (declare (type scavenger-hook scavhook))    (declare (type scavenger-hook scavhook))
41    (scavenger-hook-value scavhook))    (scavenger-hook-value scavhook))
42    
# Line 44  Line 45 
45    (setf (scavenger-hook-value scavhook) value))    (setf (scavenger-hook-value scavhook) value))
46    
47  (defun scavenger-hook-function (scavhook)  (defun scavenger-hook-function (scavhook)
48    "Returns the FUNCTION invoked when the monitored value is moved.  Can be    _N"Returns the FUNCTION invoked when the monitored value is moved.  Can be
49     setf."     setf."
50    (declare (type scavenger-hook scavhook))    (declare (type scavenger-hook scavhook))
51    (scavenger-hook-function scavhook))    (scavenger-hook-function scavhook))

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.4.56.1

  ViewVC Help
Powered by ViewVC 1.1.5