Index: doc/uC++toCFA/.gitignore
===================================================================
--- doc/uC++toCFA/.gitignore	(revision 0cb34792deaeef8c8e2053b3b0c6d350f4dbad00)
+++ doc/uC++toCFA/.gitignore	(revision 2325b576ab0aedd18a2818de030d95499f29479f)
@@ -3,2 +3,4 @@
 *.pdf
 *.ps
+*.cc
+*.cfa
Index: doc/uC++toCFA/uC++toCFA.tex
===================================================================
--- doc/uC++toCFA/uC++toCFA.tex	(revision 0cb34792deaeef8c8e2053b3b0c6d350f4dbad00)
+++ doc/uC++toCFA/uC++toCFA.tex	(revision 2325b576ab0aedd18a2818de030d95499f29479f)
@@ -11,6 +11,6 @@
 %% Created On       : Wed Apr  6 14:53:29 2016
 %% Last Modified By : Peter A. Buhr
-%% Last Modified On : Mon Nov 11 21:51:39 2024
-%% Update Count     : 6144
+%% Last Modified On : Wed Nov 13 18:09:58 2024
+%% Update Count     : 6207
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -540,4 +540,37 @@
 
 
+\section{Thread}
+
+\begin{cquote}
+\begin{tabular}{@{}l|ll@{}}
+\begin{uC++}
+
+@_Task@ T {
+	// private task fields
+	void main() {
+		... @_Resume E( ... ) _At partner@;
+		... @uThisTask();@ ...
+	}
+  public:
+};
+\end{uC++}
+&
+\begin{cfa}
+#include <$thread$.hfa>
+@thread@ T {
+	// private task fields
+
+};
+void main( @T & t@ ) {
+	... @resumeAt( partner, ExceptionInst( E, ... )@ );
+	... @active_thread();@ ...
+}
+\end{cfa}
+\\
+\multicolumn{2}{@{}l@{}}{\lstinline{T t; // start thread in main routine}}
+\end{tabular}
+\end{cquote}
+
+
 \section{\lstinline{COBEGIN}/\lstinline{COFOR}}
 
@@ -658,37 +691,4 @@
 
 
-\section{Thread}
-
-\begin{cquote}
-\begin{tabular}{@{}l|ll@{}}
-\begin{uC++}
-
-@_Task@ T {
-	// private task fields
-	void main() {
-		... _Resume E( ... ) _At partner;
-		... uThisTask(); ...
-	}
-  public:
-};
-\end{uC++}
-&
-\begin{cfa}
-#include <$thread$.hfa>
-@thread@ T {
-	// private task fields
-
-};
-void main( @T & t@ ) {
-	... resumeAt( partner, ExceptionInst( E, ... ) );
-	... active_thread(); ...
-}
-\end{cfa}
-\\
-\multicolumn{2}{@{}l@{}}{\lstinline{T t; // start thread in main routine}}
-\end{tabular}
-\end{cquote}
-
-
 \section{Locks}
 
@@ -721,4 +721,84 @@
 \end{cquote}
 
+
+\section{Barrier}
+
+\begin{cquote}
+\begin{tabular}{@{}l|ll@{}}
+\begin{uC++}
+#include <iostream>
+using namespace std;
+#include <uBarrier.h>
+
+@_Cormonitor@ Barrier
+		: @public uBarrier@ { // inheritance
+	int total;
+  public:
+	Barrier( unsigned int group ) :
+			@uBarrier( group )@ {
+		total = 0;
+	}
+	void @block@( int subtotal ) {
+		total += subtotal;
+		@uBarrier::block();@
+	}
+  private:
+	void @last@() { cout << total << endl; }
+};
+enum { N = 3 };
+Barrier b{ N };
+
+_Task T {
+	void main() {
+		for ( int i = 0; i < 10; i += 1 ) {
+			b.block( 1 );
+		}
+	}
+};
+int main() {
+	uProcessor p[N - 1];
+	T t[N];
+}
+\end{uC++}
+&
+\begin{cfa}
+#include <fstream.hfa>
+#include <$thread$.hfa>
+#include <barrier.hfa>
+#include <mutex_stmt.hfa>
+struct Barrier {
+	@barrier b;@			// containment
+	int total;
+};
+void ?{}( Barrier & B, unsigned int group ) with(B) {
+	@?{}( b, group );@		// initialize barrier
+	total = 0;
+}
+unsigned int block( Barrier & B, int subtotal ) with(B) {
+	@mutex( b )@ {	total += subtotal; } // use barrier's mutual exclusion
+	void @last@() { sout | total; }	// called by Gth arriving thread
+	@block@( b, last ); // wait for barrier trigger
+}
+
+
+enum { N = 3 };
+Barrier b{ N };
+
+thread T {};
+void main( T & ) {
+	for ( 10 ) {
+		block( b, 1 );
+	}
+}
+
+int main() {
+	processor p[N - 1];
+	T t[N];
+}
+\end{cfa}
+\end{tabular}
+\end{cquote}
+
+\newpage
 
 \section{Monitor}
@@ -789,5 +869,5 @@
 \end{cquote}
 
-\newpage
+\enlargethispage{1000pt}
 
 External Scheduling
