source: rtems/doc/itron3.0/gen_section @ 090ab6eb

4.104.114.84.95
Last change on this file since 090ab6eb was c25e00ca, checked in by Joel Sherrill <joel.sherrill@…>, on 01/04/00 at 23:33:04

Added timer manager.

  • Property mode set to 100644
File size: 4.6 KB
Line 
1#
2#  This shell script generates the starting template for a manager chapter.
3#
4
5
6# Set this based on which chapter you want to generate a template for.
7chapter=$1
8
9case ${chapter} in
10  task)
11    CHAPTER_CAPS="Task"
12    CHAPTER_LOWER="task"
13    ROUTINES=" cre_tsk del_tsk sta_tsk ext_tsk exd_tsk ter_tsk \
14      dis_dsp ena_dsp chg_pri rot_rdq rel_wai get_tid ref_tsk"
15    ;;
16
17  tasksync)
18    CHAPTER_CAPS="Task-Dependent Synchronization"
19    CHAPTER_LOWER="task-dependent synchronization"
20    ROUTINES=" sus_tsk rsm_tsk frsm_tsk \
21      slp_tsk tslp_tsk wup_tsk can_wup"
22    ;;
23
24  semaphore)
25    CHAPTER_CAPS="Semaphore"
26    CHAPTER_LOWER="semaphore"
27    ROUTINES="cre_sem del_sem sig_sem wai_sem preq_sem twai_sem ref_sem "
28    ;;
29
30  eventflags)
31    CHAPTER_CAPS="Eventflags"
32    CHAPTER_LOWER="eventflags"
33    ROUTINES=" cre_flg del_flg set_flg clr_flg wai_flg pol_flg \
34       twai_flg ref_flg "
35    ;;
36
37  mailbox)
38    CHAPTER_CAPS="Mailbox"
39    CHAPTER_LOWER="mailbox"
40    ROUTINES="cre_mbx del_mbx snd_msg rcv_msg prcv_msg trcv_msg ref_mbx"
41    ;;
42
43  msgbuffer)
44    CHAPTER_CAPS="Message Buffer"
45    CHAPTER_LOWER="message buffer"
46    ROUTINES=" cre_mbf del_mbf snd_mbf psnd_mbf tsnd_mbf rcv_mbf prcv_mbf \
47      trcv_mbf ref_mbf "
48    ;;
49
50  rendezvous)
51    CHAPTER_CAPS="Rendezvous"
52    CHAPTER_LOWER="rendezvous"
53    ROUTINES=" cre_por del_por cal_por pcal_por tcal_por acp_por pacp_por \
54      tacp_por fwd_por rpl_rdv ref_por"
55    ;;
56
57  interrupt)
58    CHAPTER_CAPS="Interrupt"
59    CHAPTER_LOWER="interrupt"
60    ROUTINES=" def_int ret_int ret_wup loc_cpu unl_cpu dis_int ena_int
61      chg_iXX ref_iXX"
62    ;;
63
64  memorypool)
65    CHAPTER_CAPS="Memory Pool"
66    CHAPTER_LOWER="memory pool"
67    ROUTINES=" cre_mpl del_mpl get_blk pget_blk tget_blk rel_blk ref_mpl"
68    ;;
69
70  fixedblock)
71    CHAPTER_CAPS="Fixed Block"
72    CHAPTER_LOWER="fixed block"
73    ROUTINES=" cre_mpf del_mpf get_blf pget_blf tget_blf rel_blf ref_mpf"
74    ;;
75
76
77  time)
78    CHAPTER_CAPS="Time"
79    CHAPTER_LOWER="time"
80    ROUTINES=" get_tim set_tim dly_tsk \
81       def_cyc act_cyc ref_cyc \
82       def_alm ref_alm ret_tmr"
83    ;;
84
85  config) 
86    CHAPTER_CAPS="System"
87    CHAPTER_LOWER="system"
88    ROUTINES=" get_ver ref_sys ref_cfg def_svc def_exc"
89    ;;
90
91  network)
92    CHAPTER_CAPS="Network Support"
93    CHAPTER_LOWER="network support"
94    ROUTINES=" nrea_dat nwri_dat nget_nod nget_ver"
95    ;;
96  psxtimer)
97    CHAPTER_CAPS="Timer"
98    CHAPTER_LOWER="timer"
99    ROUTINES="timer_create timer_delete timer_settime timer_gettime timer_getoverrun"
100    ;;
101  *)
102    echo "Unknown chapter name"
103    exit 1
104    ;;
105esac
106
107if [ "x${CHAPTER_CAPS}" = "x" -o "x${CHAPTER_LOWER}" = "x" \
108     -o "x${ROUTINES}" = "x" ] ; then
109  echo "initialization problem"
110  exit 1
111fi
112
113echo "@c"
114echo "@c  This is the chapter from the RTEMS ITRON User's Guide that"
115echo "@c  documents the services provided by the ${CHAPTER_LOWER}"
116echo "@c  manager."
117echo "@c"
118echo "@c  \$Id\$"
119echo "@c"
120echo ""
121echo "@chapter ${CHAPTER_CAPS}" Manager
122echo ""
123echo "@section Introduction"
124echo ""
125echo "The "
126echo "${CHAPTER_LOWER} manager is ..."
127echo ""
128echo "The services provided by the ${CHAPTER_LOWER} manager are:"
129echo ""
130echo "@itemize @bullet"
131
132for routine in ${ROUTINES}
133do
134  description=`grep " ${routine} " ../../itron_spec/itron3-1.txt | grep "]" | cut -d']' -f2 `
135  description=`echo ${description}`
136  echo "@item @code{${routine}} - ${description}"
137done
138echo "@end itemize"
139
140echo ""
141echo "@section Background"
142echo ""
143echo "@section Operations"
144echo ""
145echo "@section System Calls"
146echo ""
147echo "This section details the ${CHAPTER_LOWER} manager's services."
148echo "A subsection is dedicated to each of this manager's services"
149echo "and describes the calling sequence, related constants, usage,"
150echo "and status codes."
151echo ""
152
153for routine in ${ROUTINES}
154do
155  description=`grep ${routine} ../../itron_spec/itron3-1.txt | grep "]" | cut -d']' -f2`
156  description=`echo -n ${description}`
157  echo ""
158  echo "@c"
159  echo "@c  ${routine}"
160  echo "@c"
161  echo ""
162  echo "@page"
163  echo "@subsection ${routine} - " ${description}
164  echo ""
165  echo "@subheading CALLING SEQUENCE:"
166  echo ""
167  echo "@ifset is-C"
168  echo "@example"
169  proto=`grep "${routine} (" ../../itron_spec/itron3-6.txt | sed -e 's/ercd = //'`   # | sed -e 's/ \\(/(/'`
170 
171  echo `echo -n ${proto} | cut -d'(' -f1`"("
172  echo ${proto} | cut -d'(' -f2 | sed -e 's/ .;//'
173  echo ");"
174  # echo "int ${routine}("
175  # echo ");"
176  echo "@end example"
177  echo "@end ifset"
178  echo ""
179  echo "@ifset is-Ada"
180  echo "@end ifset"
181  echo ""
182  echo "@subheading STATUS CODES:"
183  echo ""
184  echo "@code{EXXX} - "
185  echo ""
186  echo "@subheading DESCRIPTION:"
187  echo ""
188  echo "@subheading NOTES:"
189  echo ""
190done
191
Note: See TracBrowser for help on using the repository browser.