diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /web/yacco2/diagrams/threading_defs.mp |
Initial commit
Diffstat (limited to 'web/yacco2/diagrams/threading_defs.mp')
-rw-r--r-- | web/yacco2/diagrams/threading_defs.mp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/web/yacco2/diagrams/threading_defs.mp b/web/yacco2/diagrams/threading_defs.mp new file mode 100644 index 0000000000..6fef81e9fa --- /dev/null +++ b/web/yacco2/diagrams/threading_defs.mp @@ -0,0 +1,49 @@ +% file: threading_defs.mp +input boxes +pair sw,se,ne,nw; +pair zx,zy; +beginfig(1); +u=1cc; +% stbl +sw:=(1u,0); +se:=(2u,0); +ne:=(2u,4u); +nw:=(1u,4u); +draw sw--se--ne--nw--cycle; +%outline the tab;e +for i=1 upto 3: + zx:=(1u,i*u); + zy:=(2u,i*u); + if i = 3: + draw zx{dir 45} .. .5[zx,zy] {dir -45} .. zy; + else: + draw zx--zy; + fi +endfor + +% label subscripts +defaultscale:=.6; +for i=0 upto 3: + zy:=(2u,i*u); + string a; + if i=3: + a := "no threads ids-1"; + label.rt(a,zy); + else: + a:=decimal(i); + label.rt(a,zy); + fi +endfor +defaultscale:=1; +label.bot(btex $Parallel\_thread\_table[thd $\#$].thread\_list$ etex,(1u,0u)); + + +%outline table_entry +label.rt(btex $thread\_list:$ etex,(5u,6u)); + label.rt(btex $\bullet\ $list$<$worker$\_$thread$\_$blk$\uparrow >$ etex,(6u,5u)); + label.rt(btex $\bullet\ $parser\ $\uparrow$ --- grammar containing worker$\_$thread$\_$blk etex,(8u,4u)); + label.rt(btex $\bullet\ $status\ --- idle, working, or exiting etex,(8u,3u)); + label.rt(btex $\bullet\ $run cnt\ --- stats on how many times thread executed etex,(8u,2u)); + label.rt(btex $\bullet\ $thd id\ --- thread id number etex,(8u,1u)); +endfig; +end; |