source: rtems/doc/itron3.0/gen_section @ e67c585

4.104.114.84.95
Last change on this file since e67c585 was e67c585, checked in by Joel Sherrill <joel.sherrill@…>, on 05/26/99 at 16:06:52

Replaced error code section.

  • Property mode set to 100644
File size: 4.0 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  *)
97    echo "Unknown chapter name"
98    exit 1
99    ;;
100esac
101
102if [ "x${CHAPTER_CAPS}" = "x" -o "x${CHAPTER_LOWER}" = "x" \
103     -o "x${ROUTINES}" = "x" ] ; then
104  echo "initialization problem"
105  exit 1
106fi
107
108echo "@c"
109echo "@c  This is the chapter from the RTEMS ITRON User's Guide that"
110echo "@c  documents the services provided by the ${CHAPTER_LOWER}"
111echo "@c  manager."
112echo "@c"
113echo "@c  \$Id\$"
114echo "@c"
115echo ""
116echo "@chapter ${CHAPTER_CAPS}" Manager
117echo ""
118echo "@section Introduction"
119echo ""
120echo "The "
121echo "${CHAPTER_LOWER} manager is ..."
122echo ""
123echo "The services provided by the ${CHAPTER_LOWER} manager are:"
124echo ""
125echo "@itemize @bullet"
126
127for routine in ${ROUTINES}
128do
129  echo "@item @code{${routine}} - "
130done
131echo "@end itemize"
132
133echo ""
134echo "@section Background"
135echo ""
136echo "@section Operations"
137echo ""
138echo "@section Directives"
139echo ""
140echo "This section details the ${CHAPTER_LOWER} manager's services."
141echo "A subsection is dedicated to each of this manager's services"
142echo "and describes the calling sequence, related constants, usage,"
143echo "and status codes."
144echo ""
145
146for routine in ${ROUTINES}
147do
148  echo ""
149  echo "@c"
150  echo "@c  ${routine}"
151  echo "@c"
152  echo ""
153  echo "@page"
154  echo "@subsection ${routine} - "
155  echo ""
156  echo "@subheading CALLING SEQUENCE:"
157  echo ""
158  echo "@ifset is-C"
159  echo "@example"
160  echo "int ${routine}("
161  echo ");"
162  echo "@end example"
163  echo "@end ifset"
164  echo ""
165  echo "@ifset is-Ada"
166  echo "@end ifset"
167  echo ""
168  echo "@subheading STATUS CODES:"
169  echo ""
170  echo "@code{EXXX} - "
171  echo ""
172  echo "@end table"
173  echo ""
174  echo "@subheading DESCRIPTION:"
175  echo ""
176  echo "@subheading NOTES:"
177  echo ""
178done
179
Note: See TracBrowser for help on using the repository browser.