Preface |
|
xv | |
|
Embedded and Real-time Systems |
|
|
1 | (8) |
|
|
1 | (1) |
|
What is an Embedded System? |
|
|
1 | (1) |
|
Characteristics of Embedded Systems |
|
|
2 | (1) |
|
|
2 | (1) |
|
Real-time Operating Systems and Real-time Kernels |
|
|
3 | (1) |
|
Processes, Tasks, and Threads |
|
|
4 | (1) |
|
Architecture of Real-time Systems |
|
|
5 | (2) |
|
Embedded Systems Development |
|
|
7 | (1) |
|
|
8 | (1) |
|
First Look at a System Using an RTOS |
|
|
9 | (12) |
|
|
9 | (1) |
|
Installation of the ThreadX Demonstration System |
|
|
9 | (1) |
|
Sample System with Two Threads |
|
|
9 | (3) |
|
Creating the ThreadX Objects |
|
|
12 | (2) |
|
Compiling and Executing the Sample System |
|
|
14 | (1) |
|
Analysis of the System and the Resulting Output |
|
|
14 | (1) |
|
Listing of 02_sample_system.c |
|
|
14 | (5) |
|
|
19 | (1) |
|
|
20 | (1) |
|
RTOS Concepts and Definitions |
|
|
21 | (10) |
|
|
21 | (1) |
|
|
21 | (1) |
|
Ready Threads and Suspended Threads |
|
|
22 | (1) |
|
Preemptive, Priority-Based Scheduling |
|
|
23 | (1) |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
26 | (1) |
|
|
26 | (1) |
|
|
26 | (1) |
|
|
26 | (1) |
|
|
27 | (1) |
|
|
27 | (1) |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
29 | (1) |
|
|
30 | (1) |
|
|
30 | (1) |
|
RTOS Building Blocks for System Development |
|
|
31 | (14) |
|
|
31 | (1) |
|
Defining Public Resources |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
32 | (2) |
|
|
34 | (2) |
|
|
36 | (1) |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
39 | (1) |
|
|
40 | (1) |
|
Summary of Thread Synchronization and Communication Components |
|
|
41 | (1) |
|
|
42 | (1) |
|
|
43 | (2) |
|
Introduction to the MIPS Microprocessor |
|
|
45 | (10) |
|
|
45 | (1) |
|
|
45 | (1) |
|
|
46 | (7) |
|
MIPS Power Saving Support |
|
|
53 | (1) |
|
|
54 | (1) |
|
|
55 | (16) |
|
|
55 | (1) |
|
ThreadX Implementation of MIPS Exception Handling |
|
|
56 | (13) |
|
|
69 | (2) |
|
The Thread---The Essential Component |
|
|
71 | (28) |
|
|
71 | (1) |
|
|
71 | (2) |
|
Summary of Thread Services |
|
|
73 | (1) |
|
|
74 | (6) |
|
|
80 | (1) |
|
|
81 | (1) |
|
|
81 | (1) |
|
Preemption-Threshold Change |
|
|
82 | (1) |
|
|
83 | (1) |
|
|
84 | (1) |
|
|
84 | (1) |
|
|
85 | (1) |
|
|
85 | (1) |
|
Terminate Application Thread |
|
|
85 | (1) |
|
|
86 | (1) |
|
|
87 | (1) |
|
Thread Notification Services |
|
|
87 | (1) |
|
|
87 | (2) |
|
|
89 | (1) |
|
|
90 | (3) |
|
|
93 | (2) |
|
|
95 | (1) |
|
|
95 | (1) |
|
|
96 | (3) |
|
Mutual Exclusion Challenges and Considerations |
|
|
99 | (28) |
|
|
99 | (1) |
|
Protecting a Critical Section |
|
|
99 | (1) |
|
Providing Exclusive Access to Shared Resources |
|
|
100 | (1) |
|
|
101 | (1) |
|
Summary of Mutex Services |
|
|
101 | (1) |
|
|
102 | (1) |
|
|
103 | (1) |
|
Obtaining Ownership of a Mutex |
|
|
104 | (1) |
|
Retrieving Mutex Information |
|
|
105 | (1) |
|
Prioritizing the Mutex Suspension List |
|
|
105 | (2) |
|
Releasing Ownership of a Mutex |
|
|
107 | (1) |
|
Avoiding the Deadly Embrace |
|
|
107 | (2) |
|
Sample System Using a Mutex to Protect Critical Sections |
|
|
109 | (4) |
|
Output Produced by Sample System |
|
|
113 | (3) |
|
Listing for 08_sample_system.c |
|
|
116 | (6) |
|
|
122 | (1) |
|
|
123 | (1) |
|
|
124 | (1) |
|
|
124 | (3) |
|
Memory Management: Byte Pools and Block Pools |
|
|
127 | (26) |
|
|
127 | (1) |
|
Summary of Memory Byte Pools |
|
|
128 | (1) |
|
Memory Byte Pool Control Block |
|
|
129 | (1) |
|
Pitfalls of Memory Byte Pools |
|
|
129 | (1) |
|
Summary of Memory Byte Pool Services |
|
|
130 | (1) |
|
Creating a Memory Byte Pool |
|
|
131 | (1) |
|
Allocating from a Memory Byte Pool |
|
|
131 | (2) |
|
Deleting a Memory Byte Pool |
|
|
133 | (1) |
|
Retrieving Memory Byte Pool Information |
|
|
133 | (1) |
|
Prioritizing a Memory Byte Pool Suspension List |
|
|
134 | (1) |
|
Releasing Memory to a Byte Pool |
|
|
135 | (1) |
|
Memory Byte Pool Example---Allocating Thread Stacks |
|
|
136 | (1) |
|
Memory Byte Pool Internals |
|
|
137 | (1) |
|
Summary of Memory Block Pools |
|
|
138 | (2) |
|
Memory Block Pool Control Block |
|
|
140 | (1) |
|
Summary of Memory Block Pool Services |
|
|
141 | (1) |
|
Creating a Memory Block Pool |
|
|
142 | (1) |
|
Allocating a Memory Block Pool |
|
|
143 | (1) |
|
Deleting a Memory Block Pool |
|
|
144 | (1) |
|
Retrieving Memory Block Pool Information |
|
|
145 | (1) |
|
Prioritizing a Memory Block Pool Suspension List |
|
|
145 | (1) |
|
|
146 | (1) |
|
Memory Block Pool Example---Allocating Thread Stacks |
|
|
147 | (1) |
|
Memory Block Pool Internals |
|
|
148 | (1) |
|
|
149 | (1) |
|
|
150 | (1) |
|
|
150 | (3) |
|
Internal System Clock and Application Timers |
|
|
153 | (24) |
|
|
153 | (1) |
|
Internal System Clock Services |
|
|
154 | (2) |
|
Application Timer Control Block |
|
|
156 | (1) |
|
Summary of Application Timer Services |
|
|
156 | (1) |
|
Creating an Application Timer |
|
|
157 | (2) |
|
Activating an Application Timer |
|
|
159 | (1) |
|
Changing an Application Timer |
|
|
159 | (1) |
|
Deactivating an Application Timer |
|
|
160 | (1) |
|
Deleting an Application Timer |
|
|
161 | (1) |
|
Retrieving Application Timer Information |
|
|
161 | (1) |
|
Sample System Using Timers to Measure Thread Performance |
|
|
162 | (4) |
|
Listing for 10_sample_system.c |
|
|
166 | (6) |
|
Application Timer Internals |
|
|
172 | (1) |
|
|
173 | (1) |
|
|
174 | (1) |
|
|
174 | (3) |
|
Event Notification and Synchronization with Counting Semaphores |
|
|
177 | (32) |
|
|
177 | (2) |
|
Counting Semaphore Control Block |
|
|
179 | (1) |
|
|
180 | (1) |
|
Avoiding Priority Inversion |
|
|
180 | (1) |
|
Summary of Counting Semaphore Services |
|
|
180 | (1) |
|
Creating a Counting Semaphore |
|
|
180 | (1) |
|
Deleting a Counting Semaphore |
|
|
181 | (1) |
|
Getting an Instance of a Counting Semaphore |
|
|
182 | (1) |
|
Retrieving Information about Counting Semaphores |
|
|
183 | (1) |
|
Prioritizing a Counting Semaphore Suspension List |
|
|
184 | (1) |
|
Placing an Instance in a Counting Semaphore |
|
|
184 | (1) |
|
Placing an Instance in a Semaphore Using a Ceiling |
|
|
185 | (1) |
|
Semaphore Notification and Event-Chaining |
|
|
186 | (1) |
|
Comparing a Counting Semaphore with a Mutex |
|
|
186 | (1) |
|
Sample System Using a Binary Semaphore in Place of a Mutex |
|
|
187 | (3) |
|
Listing for 11a_sample_system.c |
|
|
190 | (6) |
|
Sample System Using a Counting Semaphore in a Producer-Consumer Application |
|
|
196 | (3) |
|
Listing for 11b_sample_system.c |
|
|
199 | (6) |
|
Counting Semaphore Internals |
|
|
205 | (1) |
|
|
206 | (1) |
|
|
206 | (1) |
|
|
207 | (2) |
|
Synchronization of Threads Using Event Flags Groups |
|
|
209 | (26) |
|
|
209 | (1) |
|
Event Flags Group Control Block |
|
|
210 | (1) |
|
Summary of Event Flags Group Control Services |
|
|
211 | (1) |
|
Creating an Event Flags Group |
|
|
211 | (2) |
|
Deleting an Event Flags Group |
|
|
213 | (1) |
|
Getting Event Flags from an Event Flags Group |
|
|
213 | (4) |
|
Retrieving Information about an Event Flags Group |
|
|
217 | (1) |
|
Setting Event Flags in an Event Flags Group |
|
|
218 | (2) |
|
Event Flags Group Notification and Event-Chaining |
|
|
220 | (1) |
|
Sample System Using an Event Flags Group to Synchronize Two Threads |
|
|
220 | (4) |
|
Listing for 12_sample_system.c |
|
|
224 | (6) |
|
Event Flags Group Internals |
|
|
230 | (1) |
|
|
231 | (1) |
|
|
232 | (1) |
|
|
232 | (3) |
|
Thread Communication with Message Queues |
|
|
235 | (24) |
|
|
235 | (2) |
|
Message Queue Control Block |
|
|
237 | (1) |
|
Summary of Message Queue Services |
|
|
238 | (1) |
|
|
238 | (1) |
|
Sending a Message to a Message Queue |
|
|
239 | (1) |
|
Receiving a Message from a Message Queue |
|
|
240 | (1) |
|
|
241 | (1) |
|
Flushing the Contents of a Message Queue |
|
|
242 | (1) |
|
Sending a Message to the Front of a Message Queue |
|
|
242 | (1) |
|
Retrieving Message Queue Information |
|
|
243 | (1) |
|
Prioritizing a Message Queue Suspension List |
|
|
244 | (1) |
|
Message Queue Notification and Event-Chaining |
|
|
245 | (1) |
|
Sample System Using a Message Queue for Interthread Communication |
|
|
245 | (3) |
|
Listing for 13_sample_system.c |
|
|
248 | (7) |
|
|
255 | (1) |
|
|
255 | (1) |
|
|
256 | (1) |
|
|
257 | (2) |
|
Case Study: Designing a Multithreaded System |
|
|
259 | (42) |
|
|
259 | (2) |
|
|
261 | (3) |
|
|
264 | (2) |
|
|
266 | (5) |
|
|
271 | (16) |
|
|
287 | (11) |
|
|
298 | (3) |
|
|
301 | |
|
Appendix A: Memory Block Pool Services |
|
|
1 | (1) |
|
Appendix B: Memory Byte Pool Services |
|
|
1 | (1) |
|
Appendix C: Event Flags Group Services |
|
|
1 | (1) |
|
Appendix D: Interrupt Control Service |
|
|
1 | (1) |
|
Appendix E: Mutex Services |
|
|
1 | (1) |
|
Appendix F: Message Queue Services |
|
|
1 | (1) |
|
Appendix G: Counting Semaphore Services |
|
|
1 | (1) |
|
Appendix H: Thread Services |
|
|
1 | (1) |
|
Appendix I: Internal System Clock Services |
|
|
1 | (1) |
|
Appendix J: Application Timer Services |
|
|
1 | (1) |
|
|
1 | (1) |
Index |
|
1 | |