X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=doc%2Fmanual%2Fthreading.texinfo;h=b51ba34a902baa9477dd2e5a1e8d661680f06b4b;hb=26d0559df82a00acf85b8ec89541ee8e09bb3e55;hp=3fc374ab7a0e2cc9fc0523ae85b27305f42f9bf4;hpb=4a55b4bda0277716dd3c19bbf57f6060cad078ef;p=sbcl.git diff --git a/doc/manual/threading.texinfo b/doc/manual/threading.texinfo index 3fc374a..b51ba34 100644 --- a/doc/manual/threading.texinfo +++ b/doc/manual/threading.texinfo @@ -12,8 +12,8 @@ SB-THREAD package. Threads are part of the default build on x86[-64] Linux only. They are also experimentally supported on: x86[-64] Darwin (Mac OS X), -x86[-64] FreeBSD, and x86 SunOS (Solaris). On these platforms threads -must be explicitly enabled at build-time, see @file{INSTALL} for +x86[-64] FreeBSD, x86 SunOS (Solaris), and PPC Linux. On these platforms +threads must be explicitly enabled at build-time, see @file{INSTALL} for directions. @menu @@ -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