Ignore:
Timestamp:
Sep 11, 2023, 12:55:43 PM (13 months ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
c8ec58e
Parents:
3ee8853
Message:

Incorporated changes in response to Trevor's comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/colby_parsons_MMAth/text/CFA_concurrency.tex

    r3ee8853 r9509d67a  
    1212\VRef[Listing]{l:cfa_thd_init} shows a typical examples of creating a \CFA user-thread type, and then as declaring processor ($N$) and thread objects ($M$).
    1313\begin{cfa}[caption={Example of \CFA user thread and processor creation},label={l:cfa_thd_init}]
    14 @thread@ my_thread {                            $\C{// user thread type (like structure}$
     14@thread@ my_thread {                            $\C{// user thread type (like structure)}$
    1515        ... // arbitrary number of field declarations
    1616};
     
    2121        @processor@ p[2];                               $\C{// add 2 processors = 3 total with starting processor}$
    2222        {
    23                 @my_thread@ t[2], * t3 = new(); $\C{// create 3 user threads, running in routine main}$
     23                @my_thread@ t[2], * t3 = new(); $\C{// create 2 stack allocated, 1 dynamic allocated user threads}$
    2424                ... // execute concurrently
    25                 delete( t3 );                           $\C{// wait for thread to end and deallocate}$
    26         } // wait for threads to end and deallocate
     25                delete( t3 );                           $\C{// wait for t3 to end and deallocate}$
     26    } // wait for threads t[0] and t[1] to end and deallocate
    2727} // deallocate additional kernel threads
    2828\end{cfa}
Note: See TracChangeset for help on using the changeset viewer.