Changeset 14553
- Timestamp:
- Jan 4, 2011, 9:41:56 AM (14 years ago)
- Location:
- trunk/source/level-1
- Files:
-
- 2 edited
-
l1-aprims.lisp (modified) (1 diff)
-
l1-utils.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/level-1/l1-aprims.lisp
r14548 r14553 55 55 56 56 (def-standard-initial-binding *package*) 57 (def-standard-initial-binding *gensym-counter* 0)58 57 (def-standard-initial-binding *random-state* (initial-random-state)) 59 58 (def-standard-initial-binding *whostate* "Reset") -
trunk/source/level-1/l1-utils.lisp
r13647 r14553 755 755 ;;;;;;;;; VALUE BINDING Functions 756 756 757 ;; Lock used only to make sure calls to GENSYM don't step on each other. Users who 758 ;; modify *gensym-counter* in multi-threaded apps will need to do their own locking. 759 (defparameter *gensym-lock* (make-lock)) 760 757 761 (defun gensym (&optional (string-or-integer nil string-or-integer-p)) 758 762 "Creates a new uninterned symbol whose name is a prefix string (defaults … … 769 773 (string (setq prefix (ensure-simple-string string-or-integer))))) 770 774 (unless counter 771 (setq *gensym-counter* (1+ (setq counter *gensym-counter*)))) 775 (with-lock-grabbed (*gensym-lock*) 776 (setq *gensym-counter* (1+ (setq counter *gensym-counter*))))) 772 777 (make-symbol (%str-cat prefix (%integer-to-string counter))))) 773 778
Note:
See TracChangeset
for help on using the changeset viewer.
