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) |
|
The Thread---the Essential Component |
|
|
45 | (28) |
|
|
45 | (1) |
|
|
45 | (2) |
|
Summary of Thread Services |
|
|
47 | (1) |
|
|
48 | (6) |
|
|
54 | (1) |
|
|
55 | (1) |
|
|
55 | (1) |
|
Preemption-Threshold Change |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
58 | (1) |
|
|
58 | (1) |
|
|
59 | (1) |
|
|
59 | (1) |
|
Terminate Application Thread |
|
|
59 | (1) |
|
|
60 | (1) |
|
|
61 | (1) |
|
Thread Notification Services |
|
|
61 | (1) |
|
|
61 | (2) |
|
|
63 | (1) |
|
|
64 | (3) |
|
|
67 | (2) |
|
|
69 | (1) |
|
|
69 | (1) |
|
|
70 | (3) |
|
Mutual Exclusion Challenges and Considerations |
|
|
73 | (28) |
|
|
73 | (1) |
|
Protecting a Critical Section |
|
|
73 | (1) |
|
Providing Exclusive Access to Shared Resources |
|
|
74 | (1) |
|
|
75 | (1) |
|
Summary of Mutex Services |
|
|
75 | (1) |
|
|
76 | (1) |
|
|
77 | (1) |
|
Obtaining Ownership of a Mutex |
|
|
78 | (1) |
|
Retrieving Mutex Information |
|
|
79 | (1) |
|
Prioritizing the Mutex Suspension List |
|
|
79 | (2) |
|
Releasing Ownership of a Mutex |
|
|
81 | (1) |
|
Avoiding the Deadly Embrace |
|
|
81 | (2) |
|
Sample System Using a Mutex to Protect Critical Sections |
|
|
83 | (4) |
|
Output Produced by Sample System |
|
|
87 | (3) |
|
Listing for 06_sample_system.c |
|
|
90 | (6) |
|
|
96 | (1) |
|
|
97 | (1) |
|
|
98 | (1) |
|
|
98 | (3) |
|
Memory Management: Byte Pools And Block Pools |
|
|
101 | (26) |
|
|
101 | (1) |
|
Summary of Memory Byte Pools |
|
|
102 | (1) |
|
Memory Byte Pool Control Block |
|
|
103 | (1) |
|
Pitfalls of Memory Byte Pools |
|
|
103 | (1) |
|
Summary of Memory Byte Pool Services |
|
|
104 | (1) |
|
Creating a Memory Byte Pool |
|
|
105 | (1) |
|
Allocating from a Memory Byte Pool |
|
|
105 | (2) |
|
Deleting a Memory Byte Pool |
|
|
107 | (1) |
|
Retrieving Memory Byte Pool Information |
|
|
107 | (1) |
|
Prioritizing a Memory Byte Pool Suspension List |
|
|
108 | (1) |
|
Releasing Memory to a Byte Pool |
|
|
109 | (1) |
|
Memory Byte Pool Example---Allocating Thread Stacks |
|
|
110 | (1) |
|
Memory Byte Pool Internals |
|
|
111 | (1) |
|
Summary of Memory Block Pools |
|
|
112 | (2) |
|
Memory Block Pool Control Block |
|
|
114 | (1) |
|
Summary of Memory Block Pool Services |
|
|
115 | (1) |
|
Creating a Memory Block Pool |
|
|
116 | (1) |
|
Allocating a Memory Block Pool |
|
|
117 | (1) |
|
Deleting a Memory Block Pool |
|
|
118 | (1) |
|
Retrieving Memory Block Pool Information |
|
|
119 | (1) |
|
Prioritizing a Memory Block Pool Suspension List |
|
|
119 | (1) |
|
|
120 | (1) |
|
Memory Block Pool Example---Allocating Thread Stacks |
|
|
121 | (1) |
|
Memory Block Pool Internals |
|
|
122 | (1) |
|
|
123 | (1) |
|
|
124 | (1) |
|
|
124 | (3) |
|
Internal System Clock and Application Timers |
|
|
127 | (24) |
|
|
127 | (1) |
|
Internal System Clock Services |
|
|
128 | (2) |
|
Application Timer Control Block |
|
|
130 | (1) |
|
Summary of Application Timer Services |
|
|
130 | (1) |
|
Creating an Application Timer |
|
|
131 | (2) |
|
Activating an Application Timer |
|
|
133 | (1) |
|
Changing an Application Timer |
|
|
133 | (1) |
|
Deactivating an Application Timer |
|
|
134 | (1) |
|
Deleting an Application Timer |
|
|
135 | (1) |
|
Retrieving Application Timer Information |
|
|
135 | (1) |
|
Sample System Using Timers to Measure Thread Performance |
|
|
136 | (4) |
|
Listing for 8_sample_system.c |
|
|
140 | (6) |
|
Application Timer Internals |
|
|
146 | (1) |
|
|
147 | (1) |
|
|
148 | (1) |
|
|
148 | (3) |
|
Event Notification and Synchronization With Counting Semaphores |
|
|
151 | (32) |
|
|
151 | (2) |
|
Counting Semaphore Control Block |
|
|
153 | (1) |
|
|
154 | (1) |
|
Avoiding Priority Inversion |
|
|
154 | (1) |
|
Summary of Counting Semaphore Services |
|
|
154 | (1) |
|
Creating a Counting Semaphore |
|
|
154 | (1) |
|
Deleting a Counting Semaphore |
|
|
155 | (1) |
|
Getting an Instance of a Counting Semaphore |
|
|
156 | (1) |
|
Retrieving Information About Counting Semaphores |
|
|
157 | (1) |
|
Prioritizing a Counting Semaphore Suspension List |
|
|
158 | (1) |
|
Placing an Instance in a Counting Semaphore |
|
|
158 | (1) |
|
Placing an Instance in a Semaphore Using a Ceiling |
|
|
159 | (1) |
|
Semaphore Notification and Event-Chaining |
|
|
160 | (1) |
|
Comparing a Counting Semaphore with a Mutex |
|
|
160 | (1) |
|
Sample System Using a Binary Semaphore in Place of a Mutex |
|
|
161 | (3) |
|
Listing for 9a_sample_system.c |
|
|
164 | (6) |
|
Sample System Using a Counting Semaphore in a Producer-Consumer Application |
|
|
170 | (3) |
|
Listing for 9b_sample_system.c |
|
|
173 | (6) |
|
Counting Semaphore Internals |
|
|
179 | (1) |
|
|
180 | (1) |
|
|
180 | (1) |
|
|
181 | (2) |
|
Synchronization of Threads Using Event Flags Groups |
|
|
183 | (26) |
|
|
183 | (1) |
|
Event Flags Group Control Block |
|
|
184 | (1) |
|
Summary of Event Flags Group Control Services |
|
|
185 | (1) |
|
Creating an Event Flags Group |
|
|
185 | (2) |
|
Deleting an Event Flags Group |
|
|
187 | (1) |
|
Getting Event Flags from an Event Flags Group |
|
|
187 | (4) |
|
Retrieving Information about an Event Flags Group |
|
|
191 | (1) |
|
Setting Event Flags in an Event Flags Group |
|
|
192 | (2) |
|
Event Flags Group Notification and Event-Chaining |
|
|
194 | (1) |
|
Sample System Using an Event Flags Group to Synchronize Two Threads |
|
|
194 | (4) |
|
Listing for 10_sample_system.c |
|
|
198 | (6) |
|
Event Flags Group Internals |
|
|
204 | (1) |
|
|
205 | (1) |
|
|
206 | (1) |
|
|
206 | (3) |
|
Thread Communication With Message Queues |
|
|
209 | (24) |
|
|
209 | (2) |
|
Message Queue Control Block |
|
|
211 | (1) |
|
Summary of Message Queue Services |
|
|
212 | (1) |
|
|
212 | (1) |
|
Sending a Message to a Message Queue |
|
|
213 | (1) |
|
Receiving a Message from a Message Queue |
|
|
214 | (1) |
|
|
215 | (1) |
|
Flushing the Contents of a Message Queue |
|
|
216 | (1) |
|
Sending a Message to the Front of a Message Queue |
|
|
216 | (1) |
|
Retrieving Message Queue Information |
|
|
217 | (1) |
|
Prioritizing a Message Queue Suspension List |
|
|
218 | (1) |
|
Message Queue Notification and Event-Chaining |
|
|
219 | (1) |
|
Sample System Using a Message Queue for Interthread Communication |
|
|
219 | (3) |
|
Listing for 11_sample_system.c |
|
|
222 | (7) |
|
|
229 | (1) |
|
|
229 | (1) |
|
|
230 | (1) |
|
|
231 | (2) |
|
|
233 | (28) |
|
|
233 | (1) |
|
|
233 | (4) |
|
Sample System Using Event-Chaining |
|
|
237 | (3) |
|
Listing for 12_sample_system.c |
|
|
240 | (7) |
|
Run-Time Performance Metrics |
|
|
247 | (12) |
|
|
259 | (2) |
|
Case Study: Designing A Multithreaded System |
|
|
261 | |
|
|
261 | (2) |
|
|
263 | (3) |
|
|
266 | (2) |
|
|
268 | (5) |
|
|
273 | (16) |
|
|
289 | (11) |
|
|
300 | |
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) |
Appendix K: ThreadX API |
|
1 | (1) |
Appendix L: ThreadX and the ARM Microprocessor |
|
1 | (1) |
Appendix M: ThreadX and the ColdFire Microprocessor |
|
1 | (1) |
Appendix N: ThreadX and the MIPS Microprocessor |
|
1 | (1) |
Appendix O: ThreadX and the PowerPC Microprocessor |
|
1 | (1) |
Index |
|
1 | |