Changeset d96f7c4 for doc/uC++toCFA
- Timestamp:
- Jan 17, 2025, 3:46:34 PM (11 months ago)
- Branches:
- master
- Children:
- df56e25
- Parents:
- 3b340d68
- File:
-
- 1 edited
-
doc/uC++toCFA/uC++toCFA.tex (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/uC++toCFA/uC++toCFA.tex
r3b340d68 rd96f7c4 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Thu Jan 16 11:49:47202514 %% Update Count : 628 113 %% Last Modified On : Fri Jan 17 07:39:09 2025 14 %% Update Count : 6284 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 588 588 589 589 590 \section{Thread}591 592 \begin{cquote}593 \begin{tabular}{@{}l|ll@{}}594 \begin{uC++}595 596 @_Task@ T {597 // private task fields598 void main() {599 ... @_Resume E( ... ) _At partner@;600 ... @uThisTask();@ ...601 }602 public:603 };604 \end{uC++}605 &606 \begin{cfa}607 #include <$thread$.hfa>608 @thread@ T {609 // private task fields610 611 };612 void main( @T & t@ ) {613 ... @resumeAt( partner, ExceptionInst( E, ... )@ );614 ... @active_thread();@ ...615 }616 \end{cfa}617 \\618 \multicolumn{2}{@{}l@{}}{\lstinline{T t; // start thread in main routine}}619 \end{tabular}620 \end{cquote}621 622 623 590 \section{\lstinline{COBEGIN}/\lstinline{COFOR}} 624 591 … … 634 601 BEGIN osacquire( cout ) << "C" << endl; END 635 602 BEGIN osacquire( cout ) << "D" << endl; END 636 BEGIN osacquire( cout ) << "E" << endl; END637 603 @COEND@ 638 604 @COFOR@( i, 1, 10, … … 651 617 corun { mutex( sout ) sout | "C"; } 652 618 corun { mutex( sout ) sout | "D"; } 653 corun { mutex( sout ) sout | "E"; }654 619 } 655 620 @cofor@( i; 10 ) { … … 735 700 } 736 701 \end{cfa} 702 \end{tabular} 703 \end{cquote} 704 705 706 \section{Thread} 707 708 \begin{cquote} 709 \begin{tabular}{@{}l|ll@{}} 710 \begin{uC++} 711 712 @_Task@ T { 713 // private task fields 714 void main() { 715 ... @_Resume E( ... ) _At partner@; 716 ... @uThisTask();@ ... 717 } 718 public: 719 }; 720 \end{uC++} 721 & 722 \begin{cfa} 723 #include <$thread$.hfa> 724 @thread@ T { 725 // private task fields 726 727 }; 728 void main( @T & t@ ) { 729 ... @resumeAt( partner, ExceptionInst( E, ... )@ ); 730 ... @active_thread();@ ... 731 } 732 \end{cfa} 733 \\ 734 \multicolumn{2}{@{}l@{}}{\lstinline{T t; // start thread in main routine}} 737 735 \end{tabular} 738 736 \end{cquote}
Note:
See TracChangeset
for help on using the changeset viewer.