From c3010940504e924be95485ac61366d2e4f0a97b2 Mon Sep 17 00:00:00 2001 From: Alastair Bridgewater Date: Wed, 4 Aug 2010 18:04:21 +0000 Subject: [PATCH] 1.0.41.7: threads: Document BARRIER macro and implicit barriers. * Not much to say, new manual subsection under Threading. * Also added a NEWS entry for barriers. --- NEWS | 2 ++ doc/manual/threading.texinfo | 31 +++++++++++++++++++++++++++++++ version.lisp-expr | 2 +- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 4cdd5ea..d8deb5c 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ changes relative to sbcl-1.0.41 * optimization: the default implementation of COMPUTE-DISCRIMINATING-FUNCTION does much less wasted work. + * enhancement: Explicit memory barrier operations are now available for use + by multithreaded code. See documentation for details. changes in sbcl-1.0.41 relative to sbcl-1.0.40: * optimization: validity of observed keyword initargs to MAKE-INSTANCE is diff --git a/doc/manual/threading.texinfo b/doc/manual/threading.texinfo index 3fc374a..56a73e7 100644 --- a/doc/manual/threading.texinfo +++ b/doc/manual/threading.texinfo @@ -23,6 +23,7 @@ directions. * Mutex Support:: * Semaphores:: * Waitqueue/condition variables:: +* Barriers:: * Sessions/Debugging:: * Foreign threads:: * Implementation (Linux x86/x86-64):: @@ -245,6 +246,36 @@ it. @include fun-sb-thread-condition-notify.texinfo @include fun-sb-thread-condition-broadcast.texinfo +@node Barriers +@comment node-name, next, previous, up +@section Barriers + +These are based on the Linux kernel barrier design, which is in turn +based on the Alpha CPU memory model. They are presently implemented for +x86, x86-64, and PPC systems, and behave as compiler barriers on all +other CPUs. + +In addition to explicit use of the @code{sb-thread:barrier} macro, the +following functions and macros also serve as @code{:memory} barriers: + +@itemize +@item +@code{sb-ext:atomic-decf} and @code{sb-ext:atomic-incf}. +@item +@code{sb-ext:compare-and-swap}. +@item +@code{sb-thread:get-mutex}, @code{sb-thread:release-mutex}, +@code{sb-thread:with-mutex} and @code{sb-thread:with-recursive-lock}. +@item +@code{sb-thread:signal-semaphore}, @code{sb-thread:try-semaphore} and +@code{sb-thread:wait-on-semaphore}. +@item +@code{sb-thread:condition-wait}, @code{sb-thread:condition-notify} and +@code{sb-thread:condition-broadcast}. +@end itemize + +@include macro-sb-thread-barrier.texinfo + @node Sessions/Debugging @comment node-name, next, previous, up @section Sessions/Debugging diff --git a/version.lisp-expr b/version.lisp-expr index fda02a9..432bb89 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.41.6" +"1.0.41.7" -- 1.7.10.4