Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
Update of /cvsroot/sbcl/sbcl/contrib/sb-concurrency
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv10004/contrib/sb-concurrency
22.214.171.124: make SB-CONCURRENCY more GC friendly
* Patch by "3b", lp#628098.
* Break chains of detached nodes, so conservativism won't kill us.
RCS file: /cvsroot/sbcl/sbcl/contrib/sb-concurrency/queue.lisp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- queue.lisp 4 Aug 2010 18:03:35 -0000 1.2
+++ queue.lisp 1 Sep 2010 16:57:12 -0000 1.3
@@ -80,11 +80,19 @@
(when (eq head (sb-ext:compare-and-swap (queue-head queue)
- ;; This assignment is not present in the paper, but is
- ;; equivalent to the free(head.ptr) call there: it unlinks
- ;; the HEAD from the queue -- the code in the paper leaves
- ;; the dangling pointer in place.
- (setf (node-next first-node-prev) nil)
+ ;; These assignment is not present in the paper, but are
+ ;; equivalent to the free(head.ptr) call there.
+ ;; First we unlink the HEAD from the queue -- the code in
+ ;; the paper leaves the dangling pointer in place.
+ ;; Then we NIL out the slots in HEAD to help the GC,
+ ;; otherwise conservativism might lead to massive chains of
+ ;; nodes being retained.
+ (setf (node-next first-node-prev) nil
+ (node-prev head) nil
+ (node-next head) nil
+ (node-value head) nil)
(return-from dequeue (values val t))))
((eq tail head)
(return-from dequeue (values nil nil)))