Changeset d389819 in rtems-docs
- Timestamp:
-
01/18/16 05:37:40
(8 years ago)
- Author:
- Amar Takhar <amar@…>
- Branches:
- 4.11, 5, master
- Children:
- f916fca
- Parents:
- 11e1a6f
- git-author:
- Amar Takhar <amar@…> (01/18/16 05:37:40)
- git-committer:
- Amar Takhar <verm@…> (05/03/16 00:51:24)
- Message:
-
Convert all Unicode to ASCII(128)
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
-
r11e1a6f
|
rd389819
|
|
72 | 72 | ========================== |
73 | 73 | |
74 | | At system initialization, the analog driverâs initialization entry point |
| 74 | At system initialization, the analog driver's initialization entry point |
75 | 75 | will be invoked. As part of initialization, the driver will perform |
76 | 76 | whatever board initialization is required and then set all |
-
r11e1a6f
|
rd389819
|
|
102 | 102 | ATA driver supports separate ATA requests queues for each IDE |
103 | 103 | controller (one queue per controller). The following structure contains |
104 | | information about controllerâs queue and devices attached to the controller: |
| 104 | information about controller's queue and devices attached to the controller: |
105 | 105 | .. code:: c |
106 | 106 | |
… |
… |
|
154 | 154 | ATA request which is appended to the appropriate controller queue depending |
155 | 155 | on ATA device the request belongs to. If appended request is single request in |
156 | | the controllerâs queue then ATA driver event is generated. |
| 156 | the controller's queue then ATA driver event is generated. |
157 | 157 | |
158 | 158 | ATA driver task which manages queue of ATA driver events is core of ATA |
-
r11e1a6f
|
rd389819
|
|
9 | 9 | |
10 | 10 | - A steady time basis to the kernel, so that the RTEMS primitives that need |
11 | | a clock tick work properly. See the *Clock Manager* chapter of the*RTEMS Application C Userâs Guide* for more details. |
| 11 | a clock tick work properly. See the *Clock Manager* chapter of the*RTEMS Application C User's Guide* for more details. |
12 | 12 | |
13 | 13 | - An optional time counter to generate timestamps of the uptime and wall |
-
r11e1a6f
|
rd389819
|
|
37 | 37 | Having RTEMS support for Termios is beneficial because: |
38 | 38 | |
39 | | - from the userâs side because it provides standard primitive operations |
| 39 | - from the user's side because it provides standard primitive operations |
40 | 40 | to access the terminal and change configuration settings. These operations |
41 | 41 | are the same under UNIX and RTEMS. |
42 | 42 | |
43 | | - from the BSP developerâs side because it frees the |
| 43 | - from the BSP developer's side because it frees the |
44 | 44 | developer from dealing with buffer states and mutual exclusions on them. |
45 | 45 | Early RTEMS console device drivers also did their own special |
-
r11e1a6f
|
rd389819
|
|
77 | 77 | is an array of the values that should be written to each output |
78 | 78 | word on the board during initialization. This allows the driver |
79 | | to start with the boardâs output in a known state. |
| 79 | to start with the board's output in a known state. |
80 | 80 | |
81 | 81 | Initialize a Discrete I/O Board |
82 | 82 | =============================== |
83 | 83 | |
84 | | At system initialization, the discrete I/O driverâs initialization entry point |
| 84 | At system initialization, the discrete I/O driver's initialization entry point |
85 | 85 | will be invoked. As part of initialization, the driver will perform |
86 | 86 | whatever board initializatin is required and then set all |
-
r11e1a6f
|
rd389819
|
|
3 | 3 | ======================================= |
4 | 4 | |
5 | | COPYRIGHT © 1988 - 2015. |
| 5 | COPYRIGHT (c) 1988 - 2015. |
6 | 6 | |
7 | 7 | On-Line Applications Research Corporation (OAR). |
-
r11e1a6f
|
rd389819
|
|
5 | 5 | ============ |
6 | 6 | |
7 | | The initialization code is the first piece of code executed when thereâs a |
| 7 | The initialization code is the first piece of code executed when there's a |
8 | 8 | reset/reboot. Its purpose is to initialize the board for the application. |
9 | 9 | This chapter contains a narrative description of the initialization |
… |
… |
|
179 | 179 | entered, any C++ Global Constructors will be invoked. |
180 | 180 | |
181 | | Thatâs it. We just went through the entire sequence. |
| 181 | That's it. We just went through the entire sequence. |
182 | 182 | |
183 | 183 | bsp_work_area_initialize() - BSP Specific Work Area Initialization |
… |
… |
|
228 | 228 | defines device drivers entry points (initialization, open, close, read, |
229 | 229 | write, and control). For more information about this table, please |
230 | | refer to the *Configuring a System* chapter in the*RTEMS Application C Userâs Guide*. |
| 230 | refer to the *Configuring a System* chapter in the*RTEMS Application C User's Guide*. |
231 | 231 | |
232 | 232 | The RTEMS initialization procedure calls the initialization function for |
… |
… |
|
290 | 290 | At ``__uhoh`` label is the default interrupt handler routine. This |
291 | 291 | routine is only called when an unexpected interrupts is raised. One can |
292 | | add their own routine there (in that case thereâs a call to a routine - |
| 292 | add their own routine there (in that case there's a call to a routine - |
293 | 293 | $BSP_ROOT/startup/dumpanic.c - that prints which address caused the |
294 | 294 | interrupt and the contents of the registers, stack, etc.), but this should |
… |
… |
|
326 | 326 | with multiple peripherals on the CPU itself. For these devices, |
327 | 327 | there are always some specific integrated processor registers |
328 | | that must be initialized. Refer to the processorsâ manuals for |
| 328 | that must be initialized. Refer to the processors' manuals for |
329 | 329 | details on these registers and be VERY careful programming them. |
330 | 330 | |
… |
… |
|
349 | 349 | The RTEMS configuration table contains the maximum number of objects RTEMS |
350 | 350 | can handle during the application (e.g. maximum number of tasks, |
351 | | semaphores, etc.). Itâs used to allocate the size for the RTEMS inner data |
| 351 | semaphores, etc.). It's used to allocate the size for the RTEMS inner data |
352 | 352 | structures. |
353 | 353 | |
… |
… |
|
368 | 368 | information generated by ``<rtems/confdefs.h>`` constant and read only. |
369 | 369 | |
370 | | For more information on the RTEMS Configuration Table, refer to the*RTEMS Application C Userâs Guide*. |
| 370 | For more information on the RTEMS Configuration Table, refer to the*RTEMS Application C User's Guide*. |
371 | 371 | |
372 | 372 | .. COMMENT: COPYRIGHT (c) 1988-2008. |
-
r11e1a6f
|
rd389819
|
|
35 | 35 | |
36 | 36 | Even though RAM and ROM can be found in every personal computer, |
37 | | one generally doesnât care about them. In a personal computer, |
| 37 | one generally doesn't care about them. In a personal computer, |
38 | 38 | a program is nearly always stored on disk and executed in RAM. Things |
39 | 39 | are a bit different for embedded targets: the target will execute the |
… |
… |
|
50 | 50 | |
51 | 51 | - *code (``.text``) section*: |
52 | | is the programâs code and it should not be modified. |
| 52 | is the program's code and it should not be modified. |
53 | 53 | This section may be placed in ROM. |
54 | 54 | |
… |
… |
|
58 | 58 | - *initialized data (``.data``) section*: |
59 | 59 | holds the initialized program data which may be modified during the |
60 | | programâs life. This means they have to be in RAM. |
| 60 | program's life. This means they have to be in RAM. |
61 | 61 | On the other hand, these variables must be set to predefined values, and |
62 | 62 | those predefined values have to be stored in ROM. |
… |
… |
|
301 | 301 | ================ |
302 | 302 | |
303 | | Now thereâs a problem with the initialized data: the ``.data`` section |
| 303 | Now there's a problem with the initialized data: the ``.data`` section |
304 | 304 | has to be in RAM as this data may be modified during the program execution. |
305 | 305 | But how will the values be initialized at boot time? |
… |
… |
|
355 | 355 | |
356 | 356 | Step 3 shows the final executable image as it logically appears in |
357 | | the targetâs non-volatile program memory. The board initialization |
| 357 | the target's non-volatile program memory. The board initialization |
358 | 358 | code will copy the ""copy of ``.data`` section" (which are stored in |
359 | 359 | ROM) to their reserved location in RAM. |
-
r11e1a6f
|
rd389819
|
|
148 | 148 | configuration file is ``make/custom/BSP.cfg``. |
149 | 149 | |
150 | | The configuration file is taken into account when building oneâs |
| 150 | The configuration file is taken into account when building one's |
151 | 151 | application using the RTEMS template Makefiles (``make/templates``). |
152 | 152 | These application template Makefiles have been included with the |
153 | | RTEMS source distribution since the early 1990âs. However there is |
| 153 | RTEMS source distribution since the early 1990's. However there is |
154 | 154 | a desire in the RTEMS user community to move all provided examples to |
155 | 155 | GNU autoconf. They are included in the 4.9 release series and used for |
-
r11e1a6f
|
rd389819
|
|
115 | 115 | All members of the Timing Test Suite are designed to run *WITHOUT* |
116 | 116 | the Clock Device Driver installed. This increases the predictability |
117 | | of the testsâ execution as well as avoids occassionally including the |
| 117 | of the tests' execution as well as avoids occassionally including the |
118 | 118 | overhead of a clock tick interrupt in the time reported. Because of |
119 | 119 | this it is sometimes possible to use the clock tick interrupt source |
-
r11e1a6f
|
rd389819
|
|
7 | 7 | This chapter is intended to provide an introduction to the |
8 | 8 | procedure for writing RTEMS network device drivers. |
9 | | The example code is taken from the âGeneric 68360â network device |
| 9 | The example code is taken from the 'Generic 68360' network device |
10 | 10 | driver. The source code for this driver is located in the``c/src/lib/libbsp/m68k/gen68360/network`` directory in the RTEMS |
11 | 11 | source code distribution. Having a copy of this driver at |
… |
… |
|
16 | 16 | |
17 | 17 | Before starting to write the network driver become completely |
18 | | familiar with the programmerâs view of the device. |
| 18 | familiar with the programmer's view of the device. |
19 | 19 | The following points list some of the details of the |
20 | 20 | device that must be understood before a driver can be written. |
… |
… |
|
71 | 71 | execute only when they hold the network semaphore (``rtems_bsdnet_semaphore``). |
72 | 72 | The transmit and receive tasks must abide by this protocol. Be very |
73 | | careful to avoid âdeadly embracesâ with the other network tasks. |
| 73 | careful to avoid 'deadly embraces' with the other network tasks. |
74 | 74 | A number of routines are provided to make it easier for the network |
75 | 75 | driver code to conform to the network task scheduling conventions. |
… |
… |
|
162 | 162 | ``ifp->if_unit`` |
163 | 163 | The device number. The network stack uses this number and the |
164 | | device name for device name lookups. For example, if``ifp->if_name`` is â``scc``â and ``ifp->if_unit`` is â``1``â, |
165 | | the full device name would be â``scc1``â. The unit number should be |
166 | | obtained from the ânameâ entry in the configuration structure. |
| 164 | device name for device name lookups. For example, if``ifp->if_name`` is '``scc``' and ``ifp->if_unit`` is '``1``', |
| 165 | the full device name would be '``scc1``'. The unit number should be |
| 166 | obtained from the 'name' entry in the configuration structure. |
167 | 167 | |
168 | 168 | ``ifp->if_mtu`` |
… |
… |
|
213 | 213 | calling ``if_attach``. Ethernet devices should then |
214 | 214 | call ``ether_ifattach``. Both functions take a pointer to the |
215 | | deviceâs ``ifnet`` structure as their only argument. |
| 215 | device's ``ifnet`` structure as their only argument. |
216 | 216 | |
217 | 217 | The attach function should return a non-zero value to indicate that |
… |
… |
|
223 | 223 | This function is called each time the network stack wants to start the |
224 | 224 | transmitter. This occures whenever the network stack adds a packet |
225 | | to a deviceâs send queue and the ``IFF_OACTIVE`` bit in the |
226 | | deviceâs ``if_flags`` is not set. |
| 225 | to a device's send queue and the ``IFF_OACTIVE`` bit in the |
| 226 | device's ``if_flags`` is not set. |
227 | 227 | |
228 | 228 | For many devices this function need only set the ``IFF_OACTIVE`` bit in the``if_flags`` and send an event to the transmit task |
-
r11e1a6f
|
rd389819
|
|
128 | 128 | ========================================= |
129 | 129 | |
130 | | At system initialization, the non-volatile memory driverâs |
| 130 | At system initialization, the non-volatile memory driver's |
131 | 131 | initialization entry point will be invoked. As part of |
132 | 132 | initialization, the driver will perform |
… |
… |
|
141 | 141 | =============================== |
142 | 142 | |
143 | | Depending on the targetâs non-volatile memory configuration, it may be |
| 143 | Depending on the target's non-volatile memory configuration, it may be |
144 | 144 | possible to write to a status register and make the memory area completely |
145 | 145 | inaccessible. This is target dependent and beyond the standard capabilities |
-
r11e1a6f
|
rd389819
|
|
34 | 34 | of real-time clock is on a particular board. This would be useful for |
35 | 35 | a BSP supporting multiple board models. The relevant ports of |
36 | | the DMV177âs ``RTC_Table`` configuration table is below: |
| 36 | the DMV177's ``RTC_Table`` configuration table is below: |
37 | 37 | .. code:: c |
38 | 38 | |
… |
… |
|
105 | 105 | This configuration scheme allows one to support multiple versions |
106 | 106 | of the same board with a single BSP. For example, if the first |
107 | | generation of a board had Vendor Aâs RTC chip and the second |
108 | | generation had Vendor Bâs RTC chip, RTC_Table could contain |
| 107 | generation of a board had Vendor A's RTC chip and the second |
| 108 | generation had Vendor B's RTC chip, RTC_Table could contain |
109 | 109 | information for both. The ``deviceProbe`` configured |
110 | | for Vendor Aâs RTC chip would need to return TRUE if the |
| 110 | for Vendor A's RTC chip would need to return TRUE if the |
111 | 111 | board was a first generation one. The ``deviceProbe`` |
112 | 112 | routines are very board dependent and must be provided by |
-
r11e1a6f
|
rd389819
|
|
12 | 12 | information on RTEMS multiprocessing capabilities and the |
13 | 13 | MPCI, refer to the *Multiprocessing Manager* chapter |
14 | | of the *RTEMS Application C Userâs Guide*. |
| 14 | of the *RTEMS Application C User's Guide*. |
15 | 15 | |
16 | 16 | Shared Memory Configuration Table |
… |
… |
|
96 | 96 | window onto the shared memory. For example, some VMEbus boards have |
97 | 97 | special address windows to access addresses that are normally reserved |
98 | | in the CPUâs address space. |
| 98 | in the CPU's address space. |
99 | 99 | .. code:: c |
100 | 100 | |
-
r11e1a6f
|
rd389819
|
|
32 | 32 | The source code found in the ``cpukit/score/cpu`` is required to |
33 | 33 | only depend upon the CPU model variations that GCC distinguishes |
34 | | for the purposes of multilibâing. Multilib is the term the GNU |
| 34 | for the purposes of multilib'ing. Multilib is the term the GNU |
35 | 35 | community uses to refer to building a single library source multiple |
36 | 36 | times with different compiler options so the binary code generated |
37 | | is compatible. As an example, from GCCâs perspective, many PowerPC |
| 37 | is compatible. As an example, from GCC's perspective, many PowerPC |
38 | 38 | CPU models are just a PPC603e. Remember that GCC only cares about |
39 | 39 | the CPU code itself and need not be aware of any peripherals. In |
… |
… |
|
87 | 87 | - Does a BSP for a similar board exists? |
88 | 88 | |
89 | | - Is the boardâs CPU supported? |
| 89 | - Is the board's CPU supported? |
90 | 90 | |
91 | 91 | If there is already a BSP for the board, then things may already be ready |
… |
… |
|
93 | 93 | that the existing BSP provides device drivers for all the peripherals |
94 | 94 | on the board that the application will be using. For example, the application |
95 | | in question may require that the boardâs Ethernet controller be used and |
| 95 | in question may require that the board's Ethernet controller be used and |
96 | 96 | the existing BSP may not support this. |
97 | 97 | |
98 | | If the BSP does not exist and the boardâs CPU model is supported, then |
| 98 | If the BSP does not exist and the board's CPU model is supported, then |
99 | 99 | examine the reusable chip library and existing BSPs for a close match. |
100 | 100 | Other BSPs and libchip provide starting points for the development |
… |
… |
|
104 | 104 | This will help reduce the development effort required. |
105 | 105 | |
106 | | If the boardâs CPU family is supported but the particular CPU model on |
| 106 | If the board's CPU family is supported but the particular CPU model on |
107 | 107 | that board is not, then the RTEMS port to that CPU family will have to |
108 | 108 | be augmented. After this is done, development of the new BSP can proceed. |
… |
… |
|
180 | 180 | |
181 | 181 | - *clock*: |
182 | | support for the clock tick â a regular time basis to the kernel. |
| 182 | support for the clock tick - a regular time basis to the kernel. |
183 | 183 | |
184 | 184 | - *timer*: |
-
r11e1a6f
|
rd389819
|
|
84 | 84 | input FIFO full mode (FIFO means First In First Out and roughly means |
85 | 85 | buffer). This mode consists in the UART raising an interrupt when n |
86 | | characters have been received (*n* is the UARTâs FIFO length). It results |
| 86 | characters have been received (*n* is the UART's FIFO length). It results |
87 | 87 | in a lower interrupt processing time, but the problem is that a scanf |
88 | 88 | primitive will block on a receipt of less than *n* characters. The solution |
89 | 89 | is to set a timer that will check whether there are some characters |
90 | | waiting in the UARTâs input FIFO. The delay time has to be set carefully |
| 90 | waiting in the UART's input FIFO. The delay time has to be set carefully |
91 | 91 | otherwise high rates will be broken: |
92 | 92 | |
-
r11e1a6f
|
rd389819
|
|
127 | 127 | |
128 | 128 | When the task does wait to acquire the barrier, then it |
129 | | is placed in the barrierâs task wait queue in FIFO order. |
| 129 | is placed in the barrier's task wait queue in FIFO order. |
130 | 130 | All tasks waiting on a barrier are returned an error |
131 | 131 | code when the barrier is deleted. |
… |
… |
|
144 | 144 | The ``rtems_barrier_delete`` directive removes a barrier |
145 | 145 | from the system and frees its control block. A barrier can be |
146 | | deleted by any local task that knows the barrierâs ID. As a |
| 146 | deleted by any local task that knows the barrier's ID. As a |
147 | 147 | result of this directive, all tasks blocked waiting for the |
148 | 148 | barrier to be released, will be readied and returned a status code which |
149 | 149 | indicates that the barrier was deleted. Any subsequent |
150 | | references to the barrierâs name and ID are invalid. |
| 150 | references to the barrier's name and ID are invalid. |
151 | 151 | |
152 | 152 | Directives |
153 | 153 | ========== |
154 | 154 | |
155 | | This section details the barrier managerâs |
156 | | directives. A subsection is dedicated to each of this managerâs |
| 155 | This section details the barrier manager's |
| 156 | directives. A subsection is dedicated to each of this manager's |
157 | 157 | directives and describes the calling sequence, related |
158 | 158 | constants, usage, and status codes. |
… |
… |
|
180 | 180 | ``RTEMS_INVALID_NAME`` - invalid barrier name |
181 | 181 | ``RTEMS_INVALID_ADDRESS`` - ``id`` is NULL |
182 | | ``RTEMS_TOO_MANY`` - too many barriers created |
| 182 | ``RTEMS_TOO_MANY`` - too many barriers created |
183 | 183 | |
184 | 184 | **DESCRIPTION:** |
… |
… |
|
269 | 269 | |
270 | 270 | ``RTEMS_SUCCESSFUL`` - barrier deleted successfully |
271 | | ``RTEMS_INVALID_ID`` - invalid barrier id |
| 271 | ``RTEMS_INVALID_ID`` -c invalid barrier id |
272 | 272 | |
273 | 273 | **DESCRIPTION:** |
… |
… |
|
282 | 282 | |
283 | 283 | The calling task will be preempted if it is enabled |
284 | | by the taskâs execution mode and a higher priority local task is |
| 284 | by the task's execution mode and a higher priority local task is |
285 | 285 | waiting on the deleted barrier. The calling task will NOT be |
286 | 286 | preempted if all of the tasks that are waiting on the barrier |
… |
… |
|
379 | 379 | This directive releases the barrier specified by id. |
380 | 380 | All tasks waiting at the barrier will be unblocked. |
381 | | If the running taskâs preemption mode is enabled and one of |
| 381 | If the running task's preemption mode is enabled and one of |
382 | 382 | the unblocked tasks has a higher priority than the running task. |
383 | 383 | |
-
r11e1a6f
|
rd389819
|
|
41 | 41 | not involve calls to RTEMS directives. |
42 | 42 | |
43 | | The processorâs Interrupt Vector Table which will be used by the |
| 43 | The processor's Interrupt Vector Table which will be used by the |
44 | 44 | application may need to be set to the required value by the reset |
45 | 45 | application initialization code. Because interrupts are enabled |
46 | 46 | automatically by RTEMS as part of the context switch to the first task, |
47 | 47 | the Interrupt Vector Table MUST be set before this directive is invoked |
48 | | to ensure correct interrupt vectoring. The processorâs Interrupt Vector |
| 48 | to ensure correct interrupt vectoring. The processor's Interrupt Vector |
49 | 49 | Table must be accessible by RTEMS as it will be modified by the when |
50 | 50 | installing user Interrupt Service Routines (ISRs) On some CPUs, RTEMS |
51 | | installs itâs own Interrupt Vector Table as part of initialization and |
| 51 | installs it's own Interrupt Vector Table as part of initialization and |
52 | 52 | thus these requirements are met automatically. The reset code which is |
53 | 53 | executed before the call to any RTEMS initialization routines has the |
… |
… |
|
67 | 67 | that allocated. |
68 | 68 | |
69 | | - Must initialize the processorâs Interrupt Vector Table. |
| 69 | - Must initialize the processor's Interrupt Vector Table. |
70 | 70 | |
71 | 71 | - Must disable all maskable interrupts. |
… |
… |
|
92 | 92 | stack usage must account for the following requirements: |
93 | 93 | |
94 | | - Processorâs interrupt stack frame |
95 | | |
96 | | - Processorâs subroutine call stack frame |
| 94 | - Processor's interrupt stack frame |
| 95 | |
| 96 | - Processor's subroutine call stack frame |
97 | 97 | |
98 | 98 | - RTEMS system calls |
… |
… |
|
116 | 116 | The dedicated interrupt stack for the entire application on some |
117 | 117 | architectures is supplied and initialized by the reset and initialization |
118 | | code of the userâs Board Support Package. Whether allocated and |
| 118 | code of the user's Board Support Package. Whether allocated and |
119 | 119 | initialized by the BSP or RTEMS, since all ISRs use this stack, the |
120 | 120 | stack size must take into account the worst case stack usage by any |
… |
… |
|
125 | 125 | |
126 | 126 | Some processors do not support a separate stack for interrupts. In this |
127 | | case, without special assistance every taskâs stack must include |
128 | | enough space to handle the taskâs worst-case stack usage as well as |
| 127 | case, without special assistance every task's stack must include |
| 128 | enough space to handle the task's worst-case stack usage as well as |
129 | 129 | the worst-case interrupt stack usage. This is necessary because the |
130 | 130 | worst-case interrupt nesting could occur while any task is executing. |
-
r11e1a6f
|
rd389819
|
|
24 | 24 | - ``rtems_chain_is_null_node`` - Is the node NULL ? |
25 | 25 | |
26 | | - ``rtems_chain_head`` - Return the chainâs head |
27 | | |
28 | | - ``rtems_chain_tail`` - Return the chainâs tail |
29 | | |
30 | | - ``rtems_chain_are_nodes_equal`` - Are the nodeâs equal ? |
| 26 | - ``rtems_chain_head`` - Return the chain's head |
| 27 | |
| 28 | - ``rtems_chain_tail`` - Return the chain's tail |
| 29 | |
| 30 | - ``rtems_chain_are_nodes_equal`` - Are the node's equal ? |
31 | 31 | |
32 | 32 | - ``rtems_chain_is_empty`` - Is the chain empty ? |
… |
… |
|
107 | 107 | } |
108 | 108 | |
109 | | The node is placed at the start of the userâs structure to allow the |
110 | | node address on the chain to be easly cast to the userâs structure |
| 109 | The node is placed at the start of the user's structure to allow the |
| 110 | node address on the chain to be easly cast to the user's structure |
111 | 111 | address. |
112 | 112 | |
-
r11e1a6f
|
rd389819
|
|
104 | 104 | is known as the quantum or timeslice. |
105 | 105 | |
106 | | The systemâs timeslice is defined as an integral |
| 106 | The system's timeslice is defined as an integral |
107 | 107 | number of ticks, and is specified in the Configuration Table. |
108 | 108 | The timeslice is defined for the entire system of tasks, but |
… |
… |
|
111 | 111 | The ``rtems_clock_tick`` |
112 | 112 | directive implements timeslicing by |
113 | | decrementing the running taskâs time-remaining counter when both |
114 | | timeslicing and preemption are enabled. If the taskâs timeslice |
| 113 | decrementing the running task's time-remaining counter when both |
| 114 | timeslicing and preemption are enabled. If the task's timeslice |
115 | 115 | has expired, then that task will be preempted if there exists a |
116 | 116 | ready task of equal priority. |
… |
… |
|
144 | 144 | |
145 | 145 | RTEMS provides the ``rtems_clock_tick`` directive which is |
146 | | called from the userâs real-time clock ISR to inform RTEMS that |
| 146 | called from the user's real-time clock ISR to inform RTEMS that |
147 | 147 | a tick has elapsed. The tick frequency value, defined in |
148 | 148 | microseconds, is a configuration parameter found in the |
… |
… |
|
204 | 204 | ========== |
205 | 205 | |
206 | | This section details the clock managerâs directives. |
207 | | A subsection is dedicated to each of this managerâs directives |
| 206 | This section details the clock manager's directives. |
| 207 | A subsection is dedicated to each of this manager's directives |
208 | 208 | and describes the calling sequence, related constants, usage, |
209 | 209 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
104 | 104 | one version of RTEMS and from one target processor to another. |
105 | 105 | Therefore it is safest to use ``<rtems/confdefs.h>`` and specify |
106 | | your applicationâs requirements in terms of the numbers of objects and |
| 106 | your application's requirements in terms of the numbers of objects and |
107 | 107 | multiples of ``RTEMS_MINIMUM_STACK_SIZE``, as far as is possible. The |
108 | 108 | automatic estimates of space required will in general change when: |
… |
… |
|
159 | 159 | |
160 | 160 | - MACRO NAME |
161 | | Should be alphanumeric. Can have â_â (underscore). |
| 161 | Should be alphanumeric. Can have '_' (underscore). |
162 | 162 | |
163 | 163 | - DATA TYPE |
… |
… |
|
168 | 168 | The range depends on the Data Type of the macro. |
169 | 169 | |
170 | | - â If the data type is of type task priority, then its value should |
| 170 | - - If the data type is of type task priority, then its value should |
171 | 171 | be an integer in the range of 1 to 255. |
172 | | - â If the data type is an integer, then it can have numbers, characters |
| 172 | - - If the data type is an integer, then it can have numbers, characters |
173 | 173 | (in case the value is defined using another macro) and arithmetic operations |
174 | 174 | (+, -, \*, /). |
175 | | - â If the data type is a function pointer the first character |
| 175 | - - If the data type is a function pointer the first character |
176 | 176 | should be an alphabet or an underscore. The rest of the string |
177 | 177 | can be alphanumeric. |
178 | | - â If the data type is RTEMS Attributes or RTEMS Mode then |
| 178 | - - If the data type is RTEMS Attributes or RTEMS Mode then |
179 | 179 | the string should be alphanumeric. |
180 | | - â If the data type is RTEMS NAME then the value should be |
181 | | an integer>=0 or RTEMS_BUILD_NAME( âUâ, âIâ, â1â, â â ) |
| 180 | - - If the data type is RTEMS NAME then the value should be |
| 181 | an integer>=0 or RTEMS_BUILD_NAME( 'U', 'I', '1', ' ' ) |
182 | 182 | |
183 | 183 | - DEFAULT VALUE |
184 | 184 | |
185 | 185 | The default value should be in the following formats- |
186 | | Please note that the â.â (full stop) is necessary. |
187 | | |
188 | | - â In case the value is not defined then: |
| 186 | Please note that the '.' (full stop) is necessary. |
| 187 | |
| 188 | - - In case the value is not defined then: |
189 | 189 | This is not defined by default. |
190 | | - â If we know the default value then: |
| 190 | - - If we know the default value then: |
191 | 191 | The default value is XXX. |
192 | | - â If the default value is BSP Specific then: |
| 192 | - - If the default value is BSP Specific then: |
193 | 193 | This option is BSP specific. |
194 | 194 | |
… |
… |
|
2068 | 2068 | --------------------------------------------------------------- |
2069 | 2069 | .. index:: CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE |
2070 | | .. index:: memory for a single message queueâs buffers |
| 2070 | .. index:: memory for a single message queue's buffers |
2071 | 2071 | |
2072 | 2072 | *CONSTANT:* |
… |
… |
|
4345 | 4345 | |
4346 | 4346 | ``CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER`` is defined |
4347 | | if the application wishes to include the BSPâs Frame Buffer Device Driver. |
| 4347 | if the application wishes to include the BSP's Frame Buffer Device Driver. |
4348 | 4348 | |
4349 | 4349 | **NOTES:** |
-
r11e1a6f
|
rd389819
|
|
73 | 73 | .. index:: CBS periodic tasks |
74 | 74 | |
75 | | Each taskâs execution begins with a default background priority |
| 75 | Each task's execution begins with a default background priority |
76 | 76 | (see the chapter Scheduling Concepts to understand the concept of |
77 | 77 | priorities in EDF). Once you decide the tasks should start periodic |
… |
… |
|
147 | 147 | |
148 | 148 | If a task is attached to a server using ``rtems_cbs_attach_thread``, |
149 | | the taskâs computation time per period is limited by the server and |
| 149 | the task's computation time per period is limited by the server and |
150 | 150 | the deadline (period) of task is equal to deadline of the server which |
151 | 151 | means if you conclude a period using ``rate_monotonic_period``, |
152 | | the length of next period is always determined by the serverâs property. |
| 152 | the length of next period is always determined by the server's property. |
153 | 153 | |
154 | 154 | The task has a guaranteed bandwidth given by the server but should not |
… |
… |
|
221 | 221 | ========== |
222 | 222 | |
223 | | This section details the Constant Bandwidth Serverâs directives. |
224 | | A subsection is dedicated to each of this managerâs directives |
| 223 | This section details the Constant Bandwidth Server's directives. |
| 224 | A subsection is dedicated to each of this manager's directives |
225 | 225 | and describes the calling sequence, related constants, usage, |
226 | 226 | and status codes. |
… |
… |
|
309 | 309 | parameters of the server (period and budget). If these are not valid,``RTEMS_CBS_ERROR_INVALID_PARAMETER`` is returned. |
310 | 310 | The ``budget_overrun_callback`` is an optional callback function, which is |
311 | | invoked in case the serverâs budget within one period is exceeded. |
| 311 | invoked in case the server's budget within one period is exceeded. |
312 | 312 | Output parameter ``server_id`` becomes an id of the newly created server. |
313 | 313 | If there is not enough memory, the ``RTEMS_CBS_ERROR_NO_MEMORY`` |
… |
… |
|
584 | 584 | **DESCRIPTION:** |
585 | 585 | |
586 | | This directive returns serverâs approved budget for subsequent periods. |
| 586 | This directive returns server's approved budget for subsequent periods. |
587 | 587 | |
588 | 588 | .. COMMENT: COPYRIGHT (c) 1989-2011. |
-
r11e1a6f
|
rd389819
|
|
84 | 84 | |
85 | 85 | Another thing to keep in mind when looking at idle time, is that |
86 | | many systems â especially during debug â have a task providing |
| 86 | many systems - especially during debug - have a task providing |
87 | 87 | some type of debug interface. It is usually fine to think of the |
88 | 88 | total idle time as being the sum of the IDLE task and a debug |
… |
… |
|
98 | 98 | ========== |
99 | 99 | |
100 | | This section details the CPU usage statistics managerâs directives. |
101 | | A subsection is dedicated to each of this managerâs directives |
| 100 | This section details the CPU usage statistics manager's directives. |
| 101 | A subsection is dedicated to each of this manager's directives |
102 | 102 | and describes the calling sequence, related constants, usage, |
103 | 103 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
95 | 95 | ========== |
96 | 96 | |
97 | | This section details the dual-ported memory managerâs |
98 | | directives. A subsection is dedicated to each of this managerâs |
| 97 | This section details the dual-ported memory manager's |
| 98 | directives. A subsection is dedicated to each of this manager's |
99 | 99 | directives and describes the calling sequence, related |
100 | 100 | constants, usage, and status codes. |
-
r11e1a6f
|
rd389819
|
|
117 | 117 | - Target Task is Blocked Waiting for Events |
118 | 118 | |
119 | | - If the waiting taskâs input event condition is |
| 119 | - If the waiting task's input event condition is |
120 | 120 | satisfied, then the task is made ready for execution. |
121 | 121 | |
122 | | - If the waiting taskâs input event condition is not |
| 122 | - If the waiting task's input event condition is not |
123 | 123 | satisfied, then the event set is posted but left pending and the |
124 | 124 | task remains blocked. |
… |
… |
|
171 | 171 | ========== |
172 | 172 | |
173 | | This section details the event managerâs directives. |
174 | | A subsection is dedicated to each of this managerâs directives |
| 173 | This section details the event manager's directives. |
| 174 | A subsection is dedicated to each of this manager's directives |
175 | 175 | and describes the calling sequence, related constants, usage, |
176 | 176 | and status codes. |
… |
… |
|
199 | 199 | |
200 | 200 | This directive sends an event set, event_in, to the |
201 | | task specified by id. If a blocked taskâs input event condition |
| 201 | task specified by id. If a blocked task's input event condition |
202 | 202 | is satisfied by this directive, then it will be made ready. If |
203 | 203 | its input event condition is not satisfied, then the events |
-
r11e1a6f
|
rd389819
|
|
82 | 82 | of the error and whether or not the error was internally |
83 | 83 | generated by the executive. If the error was generated |
84 | | from an API, then the error code will be of that APIâs |
| 84 | from an API, then the error code will be of that API's |
85 | 85 | error or status codes. The status codes for the RTEMS |
86 | 86 | API are in cpukit/rtems/include/rtems/rtems/status.h. Those |
… |
… |
|
107 | 107 | ========== |
108 | 108 | |
109 | | This section details the fatal error managerâs |
110 | | directives. A subsection is dedicated to each of this managerâs |
| 109 | This section details the fatal error manager's |
| 110 | directives. A subsection is dedicated to each of this manager's |
111 | 111 | directives and describes the calling sequence, related |
112 | 112 | constants, usage, and status codes. |
… |
… |
|
138 | 138 | provided FATAL error extension returns, then the RTEMS default |
139 | 139 | error handler is invoked. This directive can be invoked by |
140 | | RTEMS or by the userâs application code including initialization |
| 140 | RTEMS or by the user's application code including initialization |
141 | 141 | tasks, other tasks, and ISRs. |
142 | 142 | |
-
r11e1a6f
|
rd389819
|
|
143 | 143 | |
144 | 144 | :dfn:`directives` |
145 | | RTEMSâ provided routines that provide |
| 145 | RTEMS' provided routines that provide |
146 | 146 | support mechanisms for real-time applications. |
147 | 147 | |
148 | 148 | :dfn:`dispatch` |
149 | | The act of loading a taskâs context onto |
| 149 | The act of loading a task's context onto |
150 | 150 | the CPU and transferring control of the CPU to that task. |
151 | 151 | |
… |
… |
|
178 | 178 | The address at which a function or task |
179 | 179 | begins to execute. In C, the entry point of a function is the |
180 | | functionâs name. |
| 180 | function's name. |
181 | 181 | |
182 | 182 | :dfn:`events` |
… |
… |
|
340 | 340 | |
341 | 341 | :dfn:`manager` |
342 | | A group of related RTEMSâ directives which |
| 342 | A group of related RTEMS' directives which |
343 | 343 | provide access and control over resources. |
344 | 344 | |
… |
… |
|
369 | 369 | |
370 | 370 | :dfn:`mode` |
371 | | An entry in a taskâs control block that is |
| 371 | An entry in a task's control block that is |
372 | 372 | used to determine if the task allows preemption, timeslicing, |
373 | 373 | processing of signals, and the interrupt disable level used by |
… |
… |
|
436 | 436 | :dfn:`operating system` |
437 | 437 | The software which controls all |
438 | | the computerâs resources and provides the base upon which |
| 438 | the computer's resources and provides the base upon which |
439 | 439 | application programs can be written. |
440 | 440 | |
… |
… |
|
596 | 596 | :dfn:`resume` |
597 | 597 | Removing a task from the suspend state. If |
598 | | the taskâs state is ready following a call to the ``rtems_task_resume`` |
| 598 | the task's state is ready following a call to the ``rtems_task_resume`` |
599 | 599 | directive, then the task is available for scheduling. |
600 | 600 | |
… |
… |
|
672 | 672 | :dfn:`signal set` |
673 | 673 | A thirty-two bit entity which is used to |
674 | | represent a taskâs collection of pending signals and the signals |
| 674 | represent a task's collection of pending signals and the signals |
675 | 675 | sent to a task. |
676 | 676 | |
-
r11e1a6f
|
rd389819
|
|
1 | 1 | ==================== |
2 | | RTEMS C Userâs Guide |
| 2 | RTEMS C User's Guide |
3 | 3 | ==================== |
4 | 4 | |
5 | | COPYRIGHT © 1988 - 2015. |
| 5 | COPYRIGHT (c) 1988 - 2015. |
6 | 6 | |
7 | 7 | On-Line Applications Research Corporation (OAR). |
-
r11e1a6f
|
rd389819
|
|
25 | 25 | |
26 | 26 | Initialization task(s) are the mechanism by which |
27 | | RTEMS transfers initial control to the userâs application. |
| 27 | RTEMS transfers initial control to the user's application. |
28 | 28 | Initialization tasks differ from other application tasks in that |
29 | 29 | they are defined in the User Initialization Tasks Table and |
… |
… |
|
212 | 212 | ========== |
213 | 213 | |
214 | | This section details the Initialization Managerâs |
215 | | directives. A subsection is dedicated to each of this managerâs |
| 214 | This section details the Initialization Manager's |
| 215 | directives. A subsection is dedicated to each of this manager's |
216 | 216 | directives and describes the calling sequence, related |
217 | 217 | constants, usage, and status codes. |
-
r11e1a6f
|
rd389819
|
|
51 | 51 | preserved by the normal C calling convention |
52 | 52 | for the target |
53 | | processor and invokes the userâs ISR. The userâs ISR is |
| 53 | processor and invokes the user's ISR. The user's ISR is |
54 | 54 | responsible for processing the interrupt, clearing the interrupt |
55 | 55 | if necessary, and device specific manipulation... index:: rtems_vector_number |
… |
… |
|
81 | 81 | level interrupts, the ISR should perform the minimum actions |
82 | 82 | required to service the interrupt. Other non-essential actions |
83 | | should be handled by application tasks. Once the userâs ISR has |
| 83 | should be handled by application tasks. Once the user's ISR has |
84 | 84 | completed, it returns control to the RTEMS interrupt manager |
85 | 85 | which will perform task dispatching and restore the registers |
… |
… |
|
120 | 120 | priorities. The exact number of interrupt levels is processor |
121 | 121 | dependent. RTEMS internally supports 256 interrupt levels which |
122 | | are mapped to the processorâs interrupt levels. For specific |
| 122 | are mapped to the processor's interrupt levels. For specific |
123 | 123 | information on the mapping between RTEMS and the target |
124 | | processorâs interrupt levels, refer to the Interrupt Processing |
| 124 | processor's interrupt levels, refer to the Interrupt Processing |
125 | 125 | chapter of the Applications Supplement document for a specific |
126 | 126 | target processor. |
… |
… |
|
158 | 158 | the system. The address of the ISR and its associated CPU |
159 | 159 | vector number are specified to this directive. This directive |
160 | | installs the RTEMS interrupt wrapper in the processorâs |
161 | | Interrupt Vector Table and the address of the userâs ISR in the |
162 | | RTEMSâ Vector Table. This directive returns the previous |
163 | | contents of the specified vector in the RTEMSâ Vector Table. |
| 160 | installs the RTEMS interrupt wrapper in the processor's |
| 161 | Interrupt Vector Table and the address of the user's ISR in the |
| 162 | RTEMS' Vector Table. This directive returns the previous |
| 163 | contents of the specified vector in the RTEMS' Vector Table. |
164 | 164 | |
165 | 165 | Directives Allowed from an ISR |
… |
… |
|
254 | 254 | ========== |
255 | 255 | |
256 | | This section details the interrupt managerâs |
257 | | directives. A subsection is dedicated to each of this managerâs |
| 256 | This section details the interrupt manager's |
| 257 | directives. A subsection is dedicated to each of this manager's |
258 | 258 | directives and describes the calling sequence, related |
259 | 259 | constants, usage, and status codes. |
… |
… |
|
289 | 289 | returned in ``old_isr_handler``. |
290 | 290 | |
291 | | To release an interrupt vector, pass the old handlerâs address obtained |
| 291 | To release an interrupt vector, pass the old handler's address obtained |
292 | 292 | when the vector was first capture. |
293 | 293 | |
-
r11e1a6f
|
rd389819
|
|
42 | 42 | Each application utilizing the RTEMS I/O manager must specify the |
43 | 43 | address of a Device Driver Table in its Configuration Table. This table |
44 | | contains each device driverâs entry points that is to be initialised by |
| 44 | contains each device driver's entry points that is to be initialised by |
45 | 45 | RTEMS during initialization. Each device driver may contain the |
46 | 46 | following entry points: |
… |
… |
|
60 | 60 | If the device driver does not support a particular |
61 | 61 | entry point, then that entry in the Configuration Table should |
62 | | be NULL. RTEMS will return``RTEMS_SUCCESSFUL`` as the executiveâs and |
63 | | zero (0) as the device driverâs return code for these device |
| 62 | be NULL. RTEMS will return``RTEMS_SUCCESSFUL`` as the executive's and |
| 63 | zero (0) as the device driver's return code for these device |
64 | 64 | driver entry points. |
65 | 65 | |
… |
… |
|
76 | 76 | .. index:: minor device number |
77 | 77 | |
78 | | Each call to the I/O manager must provide a deviceâs |
| 78 | Each call to the I/O manager must provide a device's |
79 | 79 | major and minor numbers as arguments. The major number is the |
80 | | index of the requested driverâs entry points in the Device |
| 80 | index of the requested driver's entry points in the Device |
81 | 81 | Driver Table, and is used to select a specific device driver. |
82 | 82 | The exact usage of the minor number is driver specific, but is |
… |
… |
|
225 | 225 | ========== |
226 | 226 | |
227 | | This section details the I/O managerâs directives. A |
228 | | subsection is dedicated to each of this managerâs directives and |
| 227 | This section details the I/O manager's directives. A |
| 228 | subsection is dedicated to each of this manager's directives and |
229 | 229 | describes the calling sequence, related constants, usage, and |
230 | 230 | status codes. |
… |
… |
|
259 | 259 | This directive attempts to add a new device driver to the Device Driver |
260 | 260 | Table. The user can specify a specific major device number via the |
261 | | directiveâs ``major`` parameter, or let the registration routine find |
| 261 | directive's ``major`` parameter, or let the registration routine find |
262 | 262 | the next available major device number by specifing a major number of``0``. The selected major device number is returned via the``registered_major`` directive parameter. The directive automatically |
263 | 263 | allocation major device numbers from the highest value down. |
-
r11e1a6f
|
rd389819
|
|
27 | 27 | by the application and have an RTEMS assigned ID. All objects |
28 | 28 | have a user-assigned name. Although a relationship exists |
29 | | between an objectâs name and its RTEMS assigned ID, the name and |
| 29 | between an object's name and its RTEMS assigned ID, the name and |
30 | 30 | ID are not identical. Object names are completely arbitrary and |
31 | 31 | selected by the user as a meaningful "tag" which may commonly |
32 | | reflect the objectâs use in the application. Conversely, object |
| 32 | reflect the object's use in the application. Conversely, object |
33 | 33 | IDs are designed to facilitate efficient object manipulation by |
34 | 34 | the executive. |
… |
… |
|
150 | 150 | The components of an object ID make it possible |
151 | 151 | to quickly locate any object in even the most complicated |
152 | | multiprocessor system. Object IDâs are associated with an |
| 152 | multiprocessor system. Object ID's are associated with an |
153 | 153 | object by RTEMS when the object is created and the corresponding |
154 | 154 | ID is returned by the appropriate object create directive. The |
… |
… |
|
158 | 158 | |
159 | 159 | The object identification directives can be used to |
160 | | dynamically obtain a particular objectâs ID given its name. |
| 160 | dynamically obtain a particular object's ID given its name. |
161 | 161 | This mapping is accomplished by searching the name table |
162 | 162 | associated with this object type. If the name is non-unique, |
… |
… |
|
191 | 191 | by RTEMS which contains the information necessary to manage a |
192 | 192 | particular object type. For efficiency reasons, the format of |
193 | | each object typeâs control block is different. However, many of |
| 193 | each object type's control block is different. However, many of |
194 | 194 | the fields are similar in function. The number of each type of |
195 | 195 | control block is application dependent and determined by the |
196 | | values specified in the userâs Configuration Table. An object |
| 196 | values specified in the user's Configuration Table. An object |
197 | 197 | control block is allocated at object create time and freed when |
198 | 198 | the object is deleted. With the exception of user extension |
… |
… |
|
221 | 221 | dedicated specifically to communication and synchronization |
222 | 222 | provide well established mechanisms which directly map to the |
223 | | applicationâs varying needs. This level of flexibility allows |
| 223 | application's varying needs. This level of flexibility allows |
224 | 224 | the application designer to match the features of a particular |
225 | 225 | manager with the complexity of communication and synchronization |
… |
… |
|
277 | 277 | real-time scheduling methodology. This methodology provides |
278 | 278 | rules which allows one to guarantee that a set of independent |
279 | | periodic tasks will always meet their deadlines â even under |
| 279 | periodic tasks will always meet their deadlines - even under |
280 | 280 | transient overload conditions. The rate monotonic manager |
281 | | provides directives built upon the Clock Managerâs interval |
| 281 | provides directives built upon the Clock Manager's interval |
282 | 282 | timer support routines. |
283 | 283 | |
… |
… |
|
287 | 287 | date and time. This allows selected time operations to be |
288 | 288 | scheduled at an actual calendar date and time. For example, a |
289 | | task could request to delay until midnight on New Yearâs Eve |
| 289 | task could request to delay until midnight on New Year's Eve |
290 | 290 | before lowering the ball at Times Square. |
291 | 291 | The data type ``rtems_time_of_day`` is used to specify |
… |
… |
|
308 | 308 | translation. Dynamic memory allocation is required by |
309 | 309 | applications whose memory requirements vary through the |
310 | | applicationâs course of execution. Address translation is |
| 310 | application's course of execution. Address translation is |
311 | 311 | needed by applications which share memory with another CPU or an |
312 | 312 | intelligent Input/Output processor. The following RTEMS |
-
r11e1a6f
|
rd389819
|
|
153 | 153 | retrieve a message from the specified message queue. If at |
154 | 154 | least one message is in the queue, then the message is removed |
155 | | from the queue, copied to the callerâs message buffer, and |
| 155 | from the queue, copied to the caller's message buffer, and |
156 | 156 | returned immediately along with the length of the message. When |
157 | 157 | messages are unavailable, one of the following situations |
… |
… |
|
168 | 168 | |
169 | 169 | If the task waits for a message, then it is placed in |
170 | | the message queueâs task wait queue in either FIFO or task |
| 170 | the message queue's task wait queue in either FIFO or task |
171 | 171 | priority order. All tasks waiting on a message queue are |
172 | 172 | returned an error code when the message queue is deleted. |
… |
… |
|
178 | 178 | directives work identically when tasks are waiting to receive a |
179 | 179 | message. A task is removed from the task waiting queue, |
180 | | unblocked, and the message is copied to a waiting taskâs |
| 180 | unblocked, and the message is copied to a waiting task's |
181 | 181 | message buffer. |
182 | 182 | |
… |
… |
|
184 | 184 | message at the rear of the message queue, while``rtems_message_queue_urgent`` places the message at the |
185 | 185 | front of the queue. The message is copied to a message buffer |
186 | | from this message queueâs buffer pool and then placed in the |
| 186 | from this message queue's buffer pool and then placed in the |
187 | 187 | message queue. Neither directive can successfully send a |
188 | 188 | message to a message queue which has a full queue of pending |
… |
… |
|
195 | 195 | message to every task waiting on the specified message queue as |
196 | 196 | an atomic operation. The message is copied to each waiting |
197 | | taskâs message buffer and each task is unblocked. The number of |
| 197 | task's message buffer and each task is unblocked. The number of |
198 | 198 | tasks which were unblocked is returned to the caller. |
199 | 199 | |
… |
… |
|
203 | 203 | The ``rtems_message_queue_delete`` directive removes a message |
204 | 204 | queue from the system and frees its control block as well as the |
205 | | memory associated with this message queueâs message buffer pool. |
| 205 | memory associated with this message queue's message buffer pool. |
206 | 206 | A message queue can be deleted by any local task that knows the |
207 | | message queueâs ID. As a result of this directive, all tasks |
| 207 | message queue's ID. As a result of this directive, all tasks |
208 | 208 | blocked waiting to receive a message from the message queue will |
209 | 209 | be readied and returned a status code which indicates that the |
210 | 210 | message queue was deleted. Any subsequent references to the |
211 | | message queueâs name and ID are invalid. Any messages waiting |
| 211 | message queue's name and ID are invalid. Any messages waiting |
212 | 212 | at the message queue are also deleted and deallocated. |
213 | 213 | |
… |
… |
|
215 | 215 | ========== |
216 | 216 | |
217 | | This section details the message managerâs |
218 | | directives. A subsection is dedicated to each of this managerâs |
| 217 | This section details the message manager's |
| 218 | directives. A subsection is dedicated to each of this manager's |
219 | 219 | directives and describes the calling sequence, related |
220 | 220 | constants, usage, and status codes. |
… |
… |
|
285 | 285 | is to avoid the system overhead incurred by the creation of a |
286 | 286 | global message queue. When a global message queue is created, |
287 | | the message queueâs name and id must be transmitted to every |
| 287 | the message queue's name and id must be transmitted to every |
288 | 288 | node in the system for insertion in the local copy of the global |
289 | 289 | object table. |
… |
… |
|
423 | 423 | ``RTEMS_INVALID_ADDRESS`` - ``buffer`` is NULL |
424 | 424 | ``RTEMS_UNSATISFIED`` - out of message buffers |
425 | | ``RTEMS_TOO_MANY`` - queueâs limit has been reached |
| 425 | ``RTEMS_TOO_MANY`` - queue's limit has been reached |
426 | 426 | |
427 | 427 | **DESCRIPTION:** |
… |
… |
|
429 | 429 | This directive sends the message buffer of size bytes |
430 | 430 | in length to the queue specified by id. If a task is waiting at |
431 | | the queue, then the message is copied to the waiting taskâs |
| 431 | the queue, then the message is copied to the waiting task's |
432 | 432 | buffer and the task is unblocked. If no tasks are waiting at the |
433 | 433 | queue, then the message is copied to a message buffer which is |
434 | | obtained from this message queueâs message buffer pool. The |
| 434 | obtained from this message queue's message buffer pool. The |
435 | 435 | message buffer is then placed at the rear of the queue. |
436 | 436 | |
… |
… |
|
473 | 473 | ``RTEMS_INVALID_ADDRESS`` - ``buffer`` is NULL |
474 | 474 | ``RTEMS_UNSATISFIED`` - out of message buffers |
475 | | ``RTEMS_TOO_MANY`` - queueâs limit has been reached |
| 475 | ``RTEMS_TOO_MANY`` - queue's limit has been reached |
476 | 476 | |
477 | 477 | **DESCRIPTION:** |
… |
… |
|
479 | 479 | This directive sends the message buffer of size bytes |
480 | 480 | in length to the queue specified by id. If a task is waiting on |
481 | | the queue, then the message is copied to the taskâs buffer and |
| 481 | the queue, then the message is copied to the task's buffer and |
482 | 482 | the task is unblocked. If no tasks are waiting on the queue, |
483 | 483 | then the message is copied to a message buffer which is obtained |
484 | | from this message queueâs message buffer pool. The message |
| 484 | from this message queue's message buffer pool. The message |
485 | 485 | buffer is then placed at the front of the queue. |
486 | 486 | |
… |
… |
|
531 | 531 | the queue specified by id to be unblocked and sent the message |
532 | 532 | contained in buffer. Before a task is unblocked, the message |
533 | | buffer of size byes in length is copied to that taskâs message |
| 533 | buffer of size byes in length is copied to that task's message |
534 | 534 | buffer. The number of tasks that were unblocked is returned in |
535 | 535 | count. |
-
r11e1a6f
|
rd389819
|
|
46 | 46 | media or topology of a multiprocessor system. The tasks which |
47 | 47 | compose a particular application can be spread among as many |
48 | | processors as needed to satisfy the applicationâs timing |
| 48 | processors as needed to satisfy the application's timing |
49 | 49 | requirements. The application tasks can interact using a subset |
50 | 50 | of the RTEMS directives as if they were on the same processor. |
… |
… |
|
199 | 199 | remote node and is used to represent a task which must block as |
200 | 200 | part of a remote operation. This action can occur as part of the``rtems_semaphore_obtain`` and``rtems_message_queue_receive`` directives. If the |
201 | | object were local, the taskâs control block would be available |
| 201 | object were local, the task's control block would be available |
202 | 202 | for modification to indicate it was blocking on a message queue |
203 | | or semaphore. However, the taskâs control block resides only on |
| 203 | or semaphore. However, the task's control block resides only on |
204 | 204 | the same node as the task. As a result, the remote node must |
205 | 205 | allocate a proxy to represent the task until it can be readied. |
… |
… |
|
242 | 242 | on the MPCI layer implementation... index:: MPCI entry points |
243 | 243 | |
244 | | The entry points to the routines in the userâs MPCI |
| 244 | The entry points to the routines in the user's MPCI |
245 | 245 | layer should be placed in the Multiprocessor Communications |
246 | 246 | Interface Table. The user must provide entry points for each of |
… |
… |
|
297 | 297 | ); |
298 | 298 | |
299 | | where configuration is the address of the userâs |
| 299 | where configuration is the address of the user's |
300 | 300 | Configuration Table. Operations on global objects cannot be |
301 | 301 | performed until this component is invoked. The INITIALIZATION |
… |
… |
|
456 | 456 | point numbers, bit fields, decimal data, and character strings. |
457 | 457 | In addition, the representation method for negative integers |
458 | | could be oneâs or twoâs complement. These factors combine to |
| 458 | could be one's or two's complement. These factors combine to |
459 | 459 | increase the complexity of designing and manipulating data |
460 | 460 | structures shared between processors. |
… |
… |
|
496 | 496 | This section details the additional directives |
497 | 497 | required to support RTEMS in a multiprocessor configuration. A |
498 | | subsection is dedicated to each of this managerâs directives and |
| 498 | subsection is dedicated to each of this manager's directives and |
499 | 499 | describes the calling sequence, related constants, usage, and |
500 | 500 | status codes. |
-
r11e1a6f
|
rd389819
|
|
271 | 271 | |
272 | 272 | RTEMS utilizes memory for both code and data space. |
273 | | Although RTEMSâ data space must be in RAM, its code space can be |
| 273 | Although RTEMS' data space must be in RAM, its code space can be |
274 | 274 | located in either ROM or RAM. |
275 | 275 | |
… |
… |
|
289 | 289 | find that the use and behavior of the two implementations is |
290 | 290 | very similar. A working knowledge of the target processor is |
291 | | helpful in understanding some of RTEMSâ features. A thorough |
| 291 | helpful in understanding some of RTEMS' features. A thorough |
292 | 292 | understanding of the executive cannot be obtained without |
293 | | studying the entire manual because many of RTEMSâ concepts and |
| 293 | studying the entire manual because many of RTEMS' concepts and |
294 | 294 | features are interrelated. Experienced RTEMS users will find |
295 | 295 | that the manual organization facilitates its use as a reference |
… |
… |
|
451 | 451 | Object Services: presents a collection of helper services useful |
452 | 452 | when manipulating RTEMS objects. These include methods to assist |
453 | | in obtaining an objectâs name in printable form. Additional services |
| 453 | in obtaining an object's name in printable form. Additional services |
454 | 454 | are provided to decompose an object Id and determine which API |
455 | 455 | and object class it belongs to. |
-
r11e1a6f
|
rd389819
|
|
33 | 33 | |
34 | 34 | Partitions are managed and maintained as a list of |
35 | | buffers. Buffers are obtained from the front of the partitionâs |
| 35 | buffers. Buffers are obtained from the front of the partition's |
36 | 36 | free buffer chain and returned to the rear of the same chain. |
37 | 37 | When a buffer is on the free buffer chain, RTEMS uses two |
… |
… |
|
71 | 71 | |
72 | 72 | The ``rtems_partition_create`` directive creates a partition |
73 | | with a user-specified name. The partitionâs name, starting |
| 73 | with a user-specified name. The partition's name, starting |
74 | 74 | address, length and buffer size are all specified to the``rtems_partition_create`` directive. |
75 | 75 | RTEMS allocates a Partition Control |
… |
… |
|
105 | 105 | ------------------ |
106 | 106 | |
107 | | Buffers are returned to a partitionâs free buffer |
| 107 | Buffers are returned to a partition's free buffer |
108 | 108 | chain with the ``rtems_partition_return_buffer`` directive. This |
109 | 109 | directive returns an error status code if the returned buffer |
… |
… |
|
122 | 122 | ========== |
123 | 123 | |
124 | | This section details the partition managerâs |
125 | | directives. A subsection is dedicated to each of this managerâs |
| 124 | This section details the partition manager's |
| 125 | directives. A subsection is dedicated to each of this manager's |
126 | 126 | directives and describes the calling sequence, related |
127 | 127 | constants, usage, and status codes. |
… |
… |
|
200 | 200 | remote tasks must interact with the partition. This is to avoid |
201 | 201 | the overhead incurred by the creation of a global partition. |
202 | | When a global partition is created, the partitionâs name and id |
| 202 | When a global partition is created, the partition's name and id |
203 | 203 | must be transmitted to every node in the system for insertion in |
204 | 204 | the local copy of the global object table. |
-
r11e1a6f
|
rd389819
|
|
241 | 241 | On systems where a peripheral PCI device needs to access other PCI devices than |
242 | 242 | the host the peripheral configuration approach may be handy. Most PCI devices |
243 | | answers on the PCI hostâs requests and start DMA accesses into the Hosts memory, |
| 243 | answers on the PCI host's requests and start DMA accesses into the Hosts memory, |
244 | 244 | however in some complex systems PCI devices may want to access other devices |
245 | 245 | on the same bus or at another PCI bus. |
… |
… |
|
421 | 421 | ----------------- |
422 | 422 | |
423 | | The RTEMS shell has a PCI command âpciâ which makes it possible to read/write |
| 423 | The RTEMS shell has a PCI command 'pci' which makes it possible to read/write |
424 | 424 | configuration space, print the current PCI configuration and print out a |
425 | 425 | configuration C-file for the static or peripheral library. |
-
r11e1a6f
|
rd389819
|
|
46 | 46 | as seen by a real-time application. It does not include the |
47 | 47 | details of how a kernel implements these functions. The |
48 | | standardâs goal is to serve as a complete definition of external |
| 48 | standard's goal is to serve as a complete definition of external |
49 | 49 | interfaces so that application code that conforms to these |
50 | 50 | interfaces will execute properly in all real-time executive |
… |
… |
|
69 | 69 | The acceptance of a standard for real-time executives |
70 | 70 | will produce the same advantages enjoyed from the push for UNIX |
71 | | standardization by AT&Tâs System V Interface Definition and |
72 | | IEEEâs POSIX efforts. A compliant multiprocessing executive |
| 71 | standardization by AT&T's System V Interface Definition and |
| 72 | IEEE's POSIX efforts. A compliant multiprocessing executive |
73 | 73 | will allow close coupling between UNIX systems and real-time |
74 | 74 | executives to provide the many benefits of the UNIX development |
-
r11e1a6f
|
rd389819
|
|
116 | 116 | |
117 | 117 | The information reported can be used to determine the "hot spots" |
118 | | in the application. Given a periodâs id, the user can determine |
| 118 | in the application. Given a period's id, the user can determine |
119 | 119 | the length of that period. From that information and the CPU usage, |
120 | 120 | the user can calculate the percentage of CPU time consumed by that |
121 | 121 | periodic task. For example, a task executing for 20 milliseconds |
122 | | every 200 milliseconds is consuming 10 percent of the processorâs |
| 122 | every 200 milliseconds is consuming 10 percent of the processor's |
123 | 123 | execution time. This is usually enough to make it a good candidate |
124 | 124 | for optimization. |
… |
… |
|
143 | 143 | the processor utilization for that task. Processor utilization |
144 | 144 | is the percentage of processor time used and can be calculated |
145 | | on a per-task or system-wide basis. Typically, the taskâs |
| 145 | on a per-task or system-wide basis. Typically, the task's |
146 | 146 | worst-case execution time will be less than its period. For |
147 | | example, a periodic taskâs requirements may state that it should |
| 147 | example, a periodic task's requirements may state that it should |
148 | 148 | execute for 10 milliseconds every 100 milliseconds. Although |
149 | 149 | the execution time may be the average, worst, or best case, the |
… |
… |
|
179 | 179 | This analysis determines whether a task set is schedulable under |
180 | 180 | worst-case conditions and emphasizes the predictability of the |
181 | | systemâs behavior. It has been proven that: |
| 181 | system's behavior. It has been proven that: |
182 | 182 | |
183 | 183 | - *RMS is an optimal static priority algorithm for |
… |
… |
|
192 | 192 | |
193 | 193 | RMS calls for the static assignment of task |
194 | | priorities based upon their period. The shorter a taskâs |
| 194 | priorities based upon their period. The shorter a task's |
195 | 195 | period, the higher its priority. For example, a task with a 1 |
196 | 196 | millisecond period has higher priority than a task with a 100 |
… |
… |
|
198 | 198 | does not distinguish between the tasks. However, RTEMS |
199 | 199 | specifies that when given tasks of equal priority, the task |
200 | | which has been ready longest will execute first. RMSâs priority |
| 200 | which has been ready longest will execute first. RMS's priority |
201 | 201 | assignment scheme does not provide one with exact numeric values |
202 | 202 | for task priorities. For example, consider the following task |
… |
… |
|
346 | 346 | priority, can be created and started before the initialization |
347 | 347 | deletes itself. This technique ensures that all tasks begin to |
348 | | compete for execution time at the same instant â when the user |
| 348 | compete for execution time at the same instant - when the user |
349 | 349 | initialization task deletes itself. |
350 | 350 | |
… |
… |
|
427 | 427 | contend for resources. This assumption can be relaxed by |
428 | 428 | accounting for the amount of time a task spends waiting to |
429 | | acquire resources. Similarly, each taskâs execution time must |
| 429 | acquire resources. Similarly, each task's execution time must |
430 | 430 | account for any I/O performed and any RTEMS directive calls. |
431 | 431 | |
… |
… |
|
518 | 518 | with a period of ``RTEMS_PERIOD_STATUS`` ticks, the current |
519 | 519 | state of the specified rate monotonic period will be returned. The following |
520 | | table details the relationship between the periodâs status and |
| 520 | table details the relationship between the period's status and |
521 | 521 | the directive status code returned by the``rtems_rate_monotonic_period`` |
522 | 522 | directive: |
… |
… |
|
545 | 545 | a rate monotonic period. If the period is running and has not |
546 | 546 | expired, the period is automatically canceled. The rate |
547 | | monotonic periodâs control block is returned to the PCB free |
| 547 | monotonic period's control block is returned to the PCB free |
548 | 548 | list when it is deleted. A rate monotonic period can be deleted |
549 | 549 | by a task other than the task which created the period. |
… |
… |
|
675 | 675 | ========== |
676 | 676 | |
677 | | This section details the rate monotonic managerâs |
678 | | directives. A subsection is dedicated to each of this managerâs |
| 677 | This section details the rate monotonic manager's |
| 678 | directives. A subsection is dedicated to each of this manager's |
679 | 679 | directives and describes the calling sequence, related |
680 | 680 | constants, usage, and status codes. |
… |
… |
|
900 | 900 | A configure time option can be used to select whether the time information is |
901 | 901 | given in ticks or seconds and nanoseconds. The default is seconds and |
902 | | nanoseconds. If the periodâs state is ``RATE_MONOTONIC_INACTIVE``, both |
| 902 | nanoseconds. If the period's state is ``RATE_MONOTONIC_INACTIVE``, both |
903 | 903 | time values will be set to 0. Otherwise, both time values will contain |
904 | 904 | time information since the last invocation of the``rtems_rate_monotonic_period`` directive. More |
-
r11e1a6f
|
rd389819
|
|
22 | 22 | - ``rtems_rtems_rbtree_initialize_empty`` - initialize the red-black tree as empty |
23 | 23 | |
24 | | - ``rtems_rtems_rbtree_set_off_tree`` - Clear a nodeâs links |
| 24 | - ``rtems_rtems_rbtree_set_off_tree`` - Clear a node's links |
25 | 25 | |
26 | | - ``rtems_rtems_rbtree_root`` - Return the red-black treeâs root node |
| 26 | - ``rtems_rtems_rbtree_root`` - Return the red-black tree's root node |
27 | 27 | |
28 | | - ``rtems_rtems_rbtree_min`` - Return the red-black treeâs minimum node |
| 28 | - ``rtems_rtems_rbtree_min`` - Return the red-black tree's minimum node |
29 | 29 | |
30 | | - ``rtems_rtems_rbtree_max`` - Return the red-black treeâs maximum node |
| 30 | - ``rtems_rtems_rbtree_max`` - Return the red-black tree's maximum node |
31 | 31 | |
32 | | - ``rtems_rtems_rbtree_left`` - Return a nodeâs left child node |
| 32 | - ``rtems_rtems_rbtree_left`` - Return a node's left child node |
33 | 33 | |
34 | | - ``rtems_rtems_rbtree_right`` - Return a nodeâs right child node |
| 34 | - ``rtems_rtems_rbtree_right`` - Return a node's right child node |
35 | 35 | |
36 | | - ``rtems_rtems_rbtree_parent`` - Return a nodeâs parent node |
| 36 | - ``rtems_rtems_rbtree_parent`` - Return a node's parent node |
37 | 37 | |
38 | | - ``rtems_rtems_rbtree_are_nodes_equal`` - Are the nodeâs equal ? |
| 38 | - ``rtems_rtems_rbtree_are_nodes_equal`` - Are the node's equal ? |
39 | 39 | |
40 | 40 | - ``rtems_rtems_rbtree_is_empty`` - Is the red-black tree empty ? |
… |
… |
|
86 | 86 | is designed to be part of a user data structure. To obtain the encapsulating |
87 | 87 | structure users can use the ``RTEMS_CONTAINER_OF`` macro. |
88 | | The node can be placed anywhere within the userâs structure and the macro will |
89 | | calculate the structureâs address from the nodeâs address. |
| 88 | The node can be placed anywhere within the user's structure and the macro will |
| 89 | calculate the structure's address from the node's address. |
90 | 90 | |
91 | 91 | Controls |
-
r11e1a6f
|
rd389819
|
|
48 | 48 | using a first-fit algorithm. If available, the requester |
49 | 49 | receives the number of bytes requested (rounded up to the next |
50 | | page size). RTEMS requires some overhead from the regionâs |
| 50 | page size). RTEMS requires some overhead from the region's |
51 | 51 | memory for each segment that is allocated. Therefore, an |
52 | 52 | application should only modify the memory of a segment that has |
53 | 53 | been obtained from the region. The application should NOT |
54 | 54 | modify the memory outside of any obtained segments and within |
55 | | the regionâs boundaries while the region is currently active in |
| 55 | the region's boundaries while the region is currently active in |
56 | 56 | the system. |
57 | 57 | |
… |
… |
|
179 | 179 | |
180 | 180 | If the task waits for the segment, then it is placed |
181 | | in the regionâs task wait queue in either FIFO or task priority |
| 181 | in the region's task wait queue in either FIFO or task priority |
182 | 182 | order. All tasks waiting on a region are returned an error when |
183 | 183 | the message queue is deleted. |
… |
… |
|
191 | 191 | segment request can now be satisfied. If so, it is given a |
192 | 192 | segment and unblocked. This process is repeated until the first |
193 | | taskâs segment request cannot be satisfied. |
| 193 | task's segment request cannot be satisfied. |
194 | 194 | |
195 | 195 | Obtaining the Size of a Segment |
… |
… |
|
227 | 227 | ========== |
228 | 228 | |
229 | | This section details the region managerâs directives. |
230 | | A subsection is dedicated to each of this managerâs directives |
| 229 | This section details the region manager's directives. |
| 230 | A subsection is dedicated to each of this manager's directives |
231 | 231 | and describes the calling sequence, related constants, usage, |
232 | 232 | and status codes. |
… |
… |
|
449 | 449 | indicating this fact is returned. If the calling task chooses |
450 | 450 | to wait for the segment and a segment large enough is not |
451 | | available, then the calling task is placed on the regionâs |
| 451 | available, then the calling task is placed on the region's |
452 | 452 | segment wait queue and blocked. If the region was created with |
453 | 453 | the ``RTEMS_PRIORITY`` option, then the calling |
… |
… |
|
466 | 466 | The actual length of the allocated segment may be |
467 | 467 | larger than the requested size because a segment size is always |
468 | | a multiple of the regionâs page size. |
| 468 | a multiple of the region's page size. |
469 | 469 | |
470 | 470 | The following segment acquisition option constants |
… |
… |
|
508 | 508 | segment request can now be satisfied. If so, it is given a |
509 | 509 | segment and unblocked. This process is repeated until the first |
510 | | taskâs segment request cannot be satisfied. |
| 510 | task's segment request cannot be satisfied. |
511 | 511 | |
512 | 512 | **NOTES:** |
… |
… |
|
553 | 553 | The actual length of the allocated segment may be |
554 | 554 | larger than the requested size because a segment size is always |
555 | | a multiple of the regionâs page size. |
| 555 | a multiple of the region's page size. |
556 | 556 | |
557 | 557 | REGION_RESIZE_SEGMENT - Change size of a segment |
-
r11e1a6f
|
rd389819
|
|
50 | 50 | ``rtems_context`` is the CPU dependent |
51 | 51 | data structure used to manage the integer and system |
52 | | register portion of each taskâs context. |
| 52 | register portion of each task's context. |
53 | 53 | |
54 | 54 | - .. index:: rtems_context_fp |
… |
… |
|
56 | 56 | ``rtems_context_fp`` is the CPU dependent |
57 | 57 | data structure used to manage the floating point portion of |
58 | | each taskâs context. |
| 58 | each task's context. |
59 | 59 | |
60 | 60 | - .. index:: rtems_device_driver |
-
r11e1a6f
|
rd389819
|
|
13 | 13 | after the occurrence of an event. For example, software embedded in |
14 | 14 | life-support systems used to monitor hospital patients must take instant |
15 | | action if a change in the patientâs status is detected. |
| 15 | action if a change in the patient's status is detected. |
16 | 16 | |
17 | 17 | The component of RTEMS responsible for providing this capability is |
18 | | appropriately called the scheduler. The schedulerâs sole purpose is |
| 18 | appropriately called the scheduler. The scheduler's sole purpose is |
19 | 19 | to allocate the all important resource of processor time to the various |
20 | 20 | tasks competing for attention. |
… |
… |
|
176 | 176 | This is an alternative scheduler in RTEMS for single core applications. |
177 | 177 | The CBS is a budget aware extension of EDF scheduler. The main goal of this |
178 | | scheduler is to ensure temporal isolation of tasks meaning that a taskâs |
| 178 | scheduler is to ensure temporal isolation of tasks meaning that a task's |
179 | 179 | execution in terms of meeting deadlines must not be influenced by other |
180 | 180 | tasks as if they were run on multiple independent processors. |
… |
… |
|
233 | 233 | The most significant task scheduling modification mechanism is the ability |
234 | 234 | for the user to assign a priority level to each individual task when it |
235 | | is created and to alter a taskâs priority at run-time. RTEMS supports |
| 235 | is created and to alter a task's priority at run-time. RTEMS supports |
236 | 236 | up to 255 priority levels. Level 255 is the lowest priority and level |
237 | 237 | 1 is the highest. |
… |
… |
|
261 | 261 | limit the amount of time the task can execute before the processor is |
262 | 262 | allocated to another task. Each tick of the real-time clock reduces |
263 | | the currently running taskâs timeslice. When the execution time equals |
| 263 | the currently running task's timeslice. When the execution time equals |
264 | 264 | the timeslice, RTEMS will dispatch another task of the same priority |
265 | 265 | to execute. If there are no other tasks of the same priority ready to |
… |
… |
|
289 | 289 | dispatcher saves the context of the current task and restores |
290 | 290 | the context of the task which has been allocated to the |
291 | | processor. Saving and restoring a taskâs context is the |
| 291 | processor. Saving and restoring a task's context is the |
292 | 292 | storing/loading of all the essential information about a task to |
293 | 293 | enable it to continue execution without any effects of the |
294 | | interruption. For example, the contents of a taskâs register |
| 294 | interruption. For example, the contents of a task's register |
295 | 295 | set must be the same when it is given the processor as they were |
296 | 296 | when it was taken away. All of the information that must be |
297 | 297 | saved or restored for a context switch is located either in the |
298 | | TCB or on the taskâs stacks. |
| 298 | TCB or on the task's stacks. |
299 | 299 | |
300 | 300 | Tasks that utilize a numeric coprocessor and are created with the``RTEMS_FLOATING_POINT`` attribute require additional |
… |
… |
|
395 | 395 | - The running task issues a ``rtems_region_get_segment`` |
396 | 396 | directive with the wait option and there is not an available segment large |
397 | | enough to satisfy the taskâs request. |
| 397 | enough to satisfy the task's request. |
398 | 398 | |
399 | 399 | A blocked task may also be suspended. Therefore, both the suspension |
… |
… |
|
433 | 433 | directive which releases a segment to the region on which the blocked task |
434 | 434 | is waiting and a resulting segment is large enough to satisfy |
435 | | the taskâs request. |
| 435 | the task's request. |
436 | 436 | |
437 | 437 | - A rate monotonic period expires for a task which blocked |
-
r11e1a6f
|
rd389819
|
|
126 | 126 | the semaphore is increased to that of the blocking task. When |
127 | 127 | the task holding the task completely releases the binary |
128 | | semaphore (i.e. not for a nested release), the holderâs priority |
| 128 | semaphore (i.e. not for a nested release), the holder's priority |
129 | 129 | is restored to the value it had before any higher priority was |
130 | 130 | inherited. |
… |
… |
|
160 | 160 | raised to the ceiling priority. When the task holding the task |
161 | 161 | completely releases the binary semaphore (i.e. not for a nested |
162 | | release), the holderâs priority is restored to the value it had |
| 162 | release), the holder's priority is restored to the value it had |
163 | 163 | before any higher priority was put into effect. |
164 | 164 | |
… |
… |
|
299 | 299 | creating the semaphore is considered the current holder of the |
300 | 300 | semaphore. At create time the method for ordering waiting tasks |
301 | | in the semaphoreâs task wait queue (by FIFO or task priority) is |
| 301 | in the semaphore's task wait queue (by FIFO or task priority) is |
302 | 302 | specified. Additionally, the priority inheritance or priority |
303 | 303 | ceiling algorithm may be selected for local, binary semaphores |
… |
… |
|
347 | 347 | |
348 | 348 | If the task waits to acquire the semaphore, then it |
349 | | is placed in the semaphoreâs task wait queue in either FIFO or |
| 349 | is placed in the semaphore's task wait queue in either FIFO or |
350 | 350 | task priority order. If the task blocked waiting for a binary |
351 | | semaphore using priority inheritance and the taskâs priority is |
| 351 | semaphore using priority inheritance and the task's priority is |
352 | 352 | greater than that of the task currently holding the semaphore, |
353 | 353 | then the holding task will inherit the priority of the blocking |
… |
… |
|
357 | 357 | When a task successfully obtains a semaphore using |
358 | 358 | priority ceiling and the priority ceiling for this semaphore is |
359 | | greater than that of the holder, then the holderâs priority will |
| 359 | greater than that of the holder, then the holder's priority will |
360 | 360 | be elevated. |
361 | 361 | |
… |
… |
|
384 | 384 | The ``rtems_semaphore_delete`` directive removes a semaphore |
385 | 385 | from the system and frees its control block. A semaphore can be |
386 | | deleted by any local task that knows the semaphoreâs ID. As a |
| 386 | deleted by any local task that knows the semaphore's ID. As a |
387 | 387 | result of this directive, all tasks blocked waiting to acquire |
388 | 388 | the semaphore will be readied and returned a status code which |
389 | 389 | indicates that the semaphore was deleted. Any subsequent |
390 | | references to the semaphoreâs name and ID are invalid. |
| 390 | references to the semaphore's name and ID are invalid. |
391 | 391 | |
392 | 392 | Directives |
393 | 393 | ========== |
394 | 394 | |
395 | | This section details the semaphore managerâs |
396 | | directives. A subsection is dedicated to each of this managerâs |
| 395 | This section details the semaphore manager's |
| 396 | directives. A subsection is dedicated to each of this manager's |
397 | 397 | directives and describes the calling sequence, related |
398 | 398 | constants, usage, and status codes. |
… |
… |
|
490 | 490 | tasks must interact with the created semaphore. This is to |
491 | 491 | avoid the system overhead incurred by the creation of a global |
492 | | semaphore. When a global semaphore is created, the semaphoreâs |
| 492 | semaphore. When a global semaphore is created, the semaphore's |
493 | 493 | name and id must be transmitted to every node in the system for |
494 | 494 | insertion in the local copy of the global object table. |
… |
… |
|
585 | 585 | |
586 | 586 | The calling task will be preempted if it is enabled |
587 | | by the taskâs execution mode and a higher priority local task is |
| 587 | by the task's execution mode and a higher priority local task is |
588 | 588 | waiting on the deleted semaphore. The calling task will NOT be |
589 | 589 | preempted if all of the tasks that are waiting on the semaphore |
… |
… |
|
644 | 644 | chooses to wait for a semaphore and the current semaphore count is zero or |
645 | 645 | negative, then it is decremented by one and the calling task is placed on |
646 | | the semaphoreâs wait queue and blocked. If the semaphore was created with |
| 646 | the semaphore's wait queue and blocked. If the semaphore was created with |
647 | 647 | the ``RTEMS_PRIORITY`` attribute, then the calling task is |
648 | 648 | inserted into the queue according to its priority. However, if the |
… |
… |
|
714 | 714 | This directive releases the semaphore specified by |
715 | 715 | id. The semaphore count is incremented by one. If the count is |
716 | | zero or negative, then the first task on this semaphoreâs wait |
| 716 | zero or negative, then the first task on this semaphore's wait |
717 | 717 | queue is removed and unblocked. The unblocked task may preempt |
718 | | the running task if the running taskâs preemption mode is |
| 718 | the running task if the running task's preemption mode is |
719 | 719 | enabled and the unblocked task has a higher priority than the |
720 | 720 | running task. |
… |
… |
|
770 | 770 | |
771 | 771 | This directive unblocks all tasks waiting on the semaphore specified by |
772 | | id. Since there are tasks blocked on the semaphore, the semaphoreâs |
| 772 | id. Since there are tasks blocked on the semaphore, the semaphore's |
773 | 773 | count is not changed by this directive and thus is zero before and |
774 | 774 | after this directive is executed. Tasks which are unblocked as the |
… |
… |
|
778 | 778 | |
779 | 779 | This directive may unblock any number of tasks. Any of the unblocked |
780 | | tasks may preempt the running task if the running taskâs preemption mode is |
| 780 | tasks may preempt the running task if the running task's preemption mode is |
781 | 781 | enabled and an unblocked task has a higher priority than the |
782 | 782 | running task. |
-
r11e1a6f
|
rd389819
|
|
25 | 25 | The signal manager allows a task to optionally define |
26 | 26 | an asynchronous signal routine (ASR). An ASR is to a task what |
27 | | an ISR is to an applicationâs set of tasks. When the processor |
| 27 | an ISR is to an application's set of tasks. When the processor |
28 | 28 | is interrupted, the execution of an application is also |
29 | 29 | interrupted and an ISR is given control. Similarly, when a |
30 | | signal is sent to a task, that taskâs execution path will be |
| 30 | signal is sent to a task, that task's execution path will be |
31 | 31 | "interrupted" by the ASR. Sending a signal to a task has no |
32 | | effect on the receiving taskâs current execution state... index:: rtems_signal_set |
| 32 | effect on the receiving task's current execution state... index:: rtems_signal_set |
33 | 33 | |
34 | 34 | A signal flag is used by a task (or ISR) to inform |
… |
… |
|
41 | 41 | A signal set is posted when it is directed (or sent) to a |
42 | 42 | task. A pending signal is a signal that has been sent to a task |
43 | | with a valid ASR, but has not been processed by that taskâs ASR. |
| 43 | with a valid ASR, but has not been processed by that task's ASR. |
44 | 44 | |
45 | 45 | A Comparison of ASRs and ISRs |
… |
… |
|
86 | 86 | .. index:: ASR mode, building |
87 | 87 | |
88 | | In general, an ASRâs mode is built by a bitwise OR of |
| 88 | In general, an ASR's mode is built by a bitwise OR of |
89 | 89 | the desired mode components. The set of valid mode components |
90 | 90 | is the same as those allowed with the task_create and task_mode |
… |
… |
|
133 | 133 | The ``rtems_signal_catch`` directive establishes an ASR for the |
134 | 134 | calling task. The address of the ASR and its execution mode are |
135 | | specified to this directive. The ASRâs mode is distinct from |
136 | | the taskâs mode. For example, the task may allow preemption, |
137 | | while that taskâs ASR may have preemption disabled. Until a |
| 135 | specified to this directive. The ASR's mode is distinct from |
| 136 | the task's mode. For example, the task may allow preemption, |
| 137 | while that task's ASR may have preemption disabled. Until a |
138 | 138 | task calls ``rtems_signal_catch`` the first time, |
139 | 139 | its ASR is invalid, and no signal sets can be sent to the task. |
… |
… |
|
141 | 141 | A task may invalidate its ASR and discard all pending |
142 | 142 | signals by calling ``rtems_signal_catch`` |
143 | | with a value of NULL for the ASRâs address. When a taskâs |
| 143 | with a value of NULL for the ASR's address. When a task's |
144 | 144 | ASR is invalid, new signal sets sent to this task are discarded. |
145 | 145 | |
146 | 146 | A task may disable ASR processing (``RTEMS_NO_ASR``) via the |
147 | | task_mode directive. When a taskâs ASR is disabled, the signals |
| 147 | task_mode directive. When a task's ASR is disabled, the signals |
148 | 148 | sent to it are left pending to be processed later when the ASR |
149 | 149 | is enabled. |
… |
… |
|
154 | 154 | replaces the previous one. |
155 | 155 | |
156 | | Normally, signal processing is disabled for the ASRâs |
| 156 | Normally, signal processing is disabled for the ASR's |
157 | 157 | execution mode, but if signal processing is enabled for the ASR, |
158 | 158 | the ASR must be reentrant. |
… |
… |
|
166 | 166 | of a signal to a task has no effect on the execution state of |
167 | 167 | that task. If the task is not the currently running task, then |
168 | | the signals are left pending and processed by the taskâs ASR the |
| 168 | the signals are left pending and processed by the task's ASR the |
169 | 169 | next time the task is dispatched to run. The ASR is executed |
170 | 170 | immediately before the task is dispatched. If the currently |
… |
… |
|
210 | 210 | ========== |
211 | 211 | |
212 | | This section details the signal managerâs directives. |
213 | | A subsection is dedicated to each of this managerâs directives |
| 212 | This section details the signal manager's directives. |
| 213 | A subsection is dedicated to each of this manager's directives |
214 | 214 | and describes the calling sequence, related constants, usage, |
215 | 215 | and status codes. |
… |
… |
|
243 | 243 | signals are cleared. Any signals sent to a task with an invalid |
244 | 244 | ASR are discarded. The mode parameter specifies the execution |
245 | | mode for the ASR. This execution mode supersedes the taskâs |
| 245 | mode for the ASR. This execution mode supersedes the task's |
246 | 246 | execution mode while the ASR is executing. |
247 | 247 | |
… |
… |
|
309 | 309 | |
310 | 310 | Sending a signal set to a task has no effect on that |
311 | | taskâs state. If a signal set is sent to a blocked task, then |
| 311 | task's state. If a signal set is sent to a blocked task, then |
312 | 312 | the task will remain blocked and the signals will be processed |
313 | 313 | when the task becomes the running task. |
-
r11e1a6f
|
rd389819
|
|
37 | 37 | |
38 | 38 | The stack bounds checker operates as a set of task extensions. At |
39 | | task creation time, the taskâs stack is filled with a pattern to |
| 39 | task creation time, the task's stack is filled with a pattern to |
40 | 40 | indicate the stack is unused. As the task executes, it will overwrite |
41 | | this pattern in memory. At each task switch, the stack bounds checkerâs |
| 41 | this pattern in memory. At each task switch, the stack bounds checker's |
42 | 42 | task switch extension is executed. This extension checks that: |
43 | 43 | |
44 | | - the last ``n`` bytes of the taskâs stack have |
| 44 | - the last ``n`` bytes of the task's stack have |
45 | 45 | not been overwritten. If this pattern has been damaged, it |
46 | 46 | indicates that at some point since this task was context |
… |
… |
|
48 | 48 | |
49 | 49 | - the current stack pointer of the task is not within |
50 | | the address range allocated for use as the taskâs stack. |
| 50 | the address range allocated for use as the task's stack. |
51 | 51 | |
52 | 52 | If either of these conditions is detected, then a blown stack |
… |
… |
|
132 | 132 | |
133 | 133 | The above includes the task id and a pointer to the task control block as |
134 | | well as enough information so one can look at the taskâs stack and |
| 134 | well as enough information so one can look at the task's stack and |
135 | 135 | see what was happening. |
136 | 136 | |
… |
… |
|
138 | 138 | ======== |
139 | 139 | |
140 | | This section details the stack bounds checkerâs routines. |
| 140 | This section details the stack bounds checker's routines. |
141 | 141 | A subsection is dedicated to each of routines |
142 | 142 | and describes the calling sequence, related constants, usage, |
-
r11e1a6f
|
rd389819
|
|
174 | 174 | |
175 | 175 | Clustered scheduling helps to control the worst-case latencies in |
176 | | multi-processor systems, see *Brandenburg, Björn B.: Scheduling and |
| 176 | multi-processor systems, see *Brandenburg, Bjorn B.: Scheduling and |
177 | 177 | Locking in Multiprocessor Real-Time Operating Systems. PhD thesis, 2011.http://www.cs.unc.edu/~bbb/diss/brandenburg-diss.pdf*. The goal is to |
178 | 178 | reduce the amount of shared state in the system and thus prevention of lock |
… |
… |
|
221 | 221 | removed from the FIFO. In case the previously first priority queue is not |
222 | 222 | empty, then it is appended to the FIFO. So there is FIFO fairness with respect |
223 | | to the highest priority task of each scheduler instances. See also *Brandenburg, Björn B.: A fully preemptive multiprocessor semaphore protocol for |
| 223 | to the highest priority task of each scheduler instances. See also *Brandenburg, Bjorn B.: A fully preemptive multiprocessor semaphore protocol for |
224 | 224 | latency-sensitive real-time applications. In Proceedings of the 25th Euromicro |
225 | | Conference on Real-Time Systems (ECRTS 2013), pages 292âÂÂ302, 2013.http://www.mpi-sws.org/~bbb/papers/pdf/ecrts13b.pdf*. |
| 225 | Conference on Real-Time Systems (ECRTS 2013), pages 292-302, 2013.http://www.mpi-sws.org/~bbb/papers/pdf/ecrts13b.pdf*. |
226 | 226 | |
227 | 227 | Such a two level queue may need a considerable amount of memory if fast enqueue |
-
r11e1a6f
|
rd389819
|
|
31 | 31 | - ``rtems_task_set_priority`` - Set task priority |
32 | 32 | |
33 | | - ``rtems_task_mode`` - Change current taskâs mode |
| 33 | - ``rtems_task_mode`` - Change current task's mode |
34 | 34 | |
35 | 35 | - ``rtems_task_wake_after`` - Wake up after interval |
… |
… |
|
70 | 70 | concurrently with other computational sequences. |
71 | 71 | |
72 | | From RTEMSâ perspective, a task is the smallest thread of |
| 72 | From RTEMS' perspective, a task is the smallest thread of |
73 | 73 | execution which can compete on its own for system resources. A |
74 | 74 | task is manifested by the existence of a task control block |
… |
… |
|
85 | 85 | upon deletion of the task. |
86 | 86 | |
87 | | The TCBâs elements are modified as a result of system calls made |
| 87 | The TCB's elements are modified as a result of system calls made |
88 | 88 | by the application in response to external and internal stimuli. |
89 | 89 | TCBs are the only RTEMS internal data structure that can be |
90 | 90 | accessed by an application via user extension routines. The TCB |
91 | | contains a taskâs name, ID, current priority, current and |
| 91 | contains a task's name, ID, current priority, current and |
92 | 92 | starting states, execution mode, TCB user extension pointer, |
93 | 93 | scheduling control structures, as well as data required by a |
94 | 94 | blocked task. |
95 | 95 | |
96 | | A taskâs context is stored in the TCB when a task switch occurs. |
| 96 | A task's context is stored in the TCB when a task switch occurs. |
97 | 97 | When the task regains control of the processor, its context is |
98 | 98 | restored from the TCB. When a task is restarted, the initial |
99 | 99 | state of the task is restored from the starting context area in |
100 | | the taskâs TCB. |
| 100 | the task's TCB. |
101 | 101 | |
102 | 102 | Task States |
… |
… |
|
132 | 132 | .. index:: rtems_task_priority |
133 | 133 | |
134 | | A taskâs priority determines its importance in relation to the |
| 134 | A task's priority determines its importance in relation to the |
135 | 135 | other tasks executing on the same processor. RTEMS supports 255 |
136 | 136 | levels of priority ranging from 1 to 255. The data type``rtems_task_priority`` is used to store task |
… |
… |
|
159 | 159 | .. index:: rtems_task_mode |
160 | 160 | |
161 | | A taskâs execution mode is a combination of the following |
| 161 | A task's execution mode is a combination of the following |
162 | 162 | four components: |
163 | 163 | |
… |
… |
|
170 | 170 | - interrupt level |
171 | 171 | |
172 | | It is used to modify RTEMSâ scheduling process and to alter the |
| 172 | It is used to modify RTEMS' scheduling process and to alter the |
173 | 173 | execution environment of the task. The data type``rtems_task_mode`` is used to manage the task |
174 | 174 | execution mode... index:: preemption |
… |
… |
|
177 | 177 | processor is relinquished. If preemption is disabled |
178 | 178 | (``RTEMS_NO_PREEMPT``), the task will retain control of the |
179 | | processor as long as it is in the executing state â even if a higher |
| 179 | processor as long as it is in the executing state - even if a higher |
180 | 180 | priority task is made ready. If preemption is enabled |
181 | 181 | (``RTEMS_PREEMPT``) and a higher priority task is made ready, |
… |
… |
|
301 | 301 | treated as private (i.e. per-task) the task can access and modify the |
302 | 302 | variable, but the modifications will not appear to other tasks, and |
303 | | other tasksâ modifications to that variable will not affect the value |
| 303 | other tasks' modifications to that variable will not affect the value |
304 | 304 | seen by the task. This is accomplished by saving and restoring the |
305 | | variableâs value each time a task switch occurs to or from the calling task. |
| 305 | variable's value each time a task switch occurs to or from the calling task. |
306 | 306 | |
307 | 307 | The value seen by other tasks, including those which have not added the |
… |
… |
|
323 | 323 | task variables. One efficient method is to have a single task |
324 | 324 | variable that is a pointer to a dynamically allocated structure |
325 | | containing the taskâs private "global" data. |
| 325 | containing the task's private "global" data. |
326 | 326 | |
327 | 327 | A critical point with per-task variables is that each task must separately |
… |
… |
|
330 | 330 | *WARNING*: Per-Task variables are inherently broken on SMP systems. They |
331 | 331 | only work correctly when there is one task executing in the system and |
332 | | that task is the logical owner of the value in the per-task variableâs |
| 332 | that task is the logical owner of the value in the per-task variable's |
333 | 333 | location. There is no way for a single memory image to contain the |
334 | 334 | correct value for each task executing on each core. Consequently, |
… |
… |
|
375 | 375 | In general, a mode and its corresponding mask is built by a |
376 | 376 | bitwise OR of the desired components. The set of valid mode |
377 | | constants and each modeâs corresponding mask constant is |
| 377 | constants and each mode's corresponding mask constant is |
378 | 378 | listed below: |
379 | 379 | |
… |
… |
|
408 | 408 | RTEMS_NO_PREEMPT`` to indicate the desired preemption mode and |
409 | 409 | interrupt level, while the mask parameter should be set to``RTEMS_INTERRUPT_MASK | |
410 | | RTEMS_NO_PREEMPT_MASK`` to indicate that the calling taskâs |
| 410 | RTEMS_NO_PREEMPT_MASK`` to indicate that the calling task's |
411 | 411 | interrupt level and preemption mode are being altered. |
412 | 412 | |
… |
… |
|
451 | 451 | |
452 | 452 | With the ``rtems_task_start`` |
453 | | directive the user specifies the taskâs |
| 453 | directive the user specifies the task's |
454 | 454 | starting address and argument. The argument is used to |
455 | 455 | communicate some startup information to the task. As part of |
456 | | this directive, RTEMS initializes the taskâs stack based upon |
457 | | the taskâs initial execution mode and start address. The |
| 456 | this directive, RTEMS initializes the task's stack based upon |
| 457 | the task's initial execution mode and start address. The |
458 | 458 | starting argument is passed to the task in accordance with the |
459 | | target processorâs calling convention. |
| 459 | target processor's calling convention. |
460 | 460 | |
461 | 461 | The ``rtems_task_restart`` |
… |
… |
|
464 | 464 | but with a possibly different argument. The new argument may be |
465 | 465 | used to distinguish between the original invocation of the task |
466 | | and subsequent invocations. The taskâs stack and control block |
| 466 | and subsequent invocations. The task's stack and control block |
467 | 467 | are modified to reflect their original creation values. |
468 | 468 | Although references to resources that have been requested are |
… |
… |
|
520 | 520 | directive is used to obtain or change the |
521 | 521 | current priority of either the calling task or another task. If |
522 | | the new priority requested is``RTEMS_CURRENT_PRIORITY`` or the taskâs |
| 522 | the new priority requested is``RTEMS_CURRENT_PRIORITY`` or the task's |
523 | 523 | actual priority, then the current priority will be returned and |
524 | | the taskâs priority will remain unchanged. If the taskâs |
| 524 | the task's priority will remain unchanged. If the task's |
525 | 525 | priority is altered, then the task will be scheduled according |
526 | 526 | to its new priority. |
… |
… |
|
535 | 535 | The ``rtems_task_mode`` |
536 | 536 | directive is used to obtain or change the current |
537 | | execution mode of the calling task. A taskâs execution mode is |
| 537 | execution mode of the calling task. A task's execution mode is |
538 | 538 | used to enable preemption, timeslicing, ASR processing, and to |
539 | | set the taskâs interrupt level. |
| 539 | set the task's interrupt level. |
540 | 540 | |
541 | 541 | The ``rtems_task_restart`` |
… |
… |
|
549 | 549 | directive to allow a task to |
550 | 550 | delete itself or any other task. This directive removes all |
551 | | RTEMS references to the task, frees the taskâs control block, |
| 551 | RTEMS references to the task, frees the task's control block, |
552 | 552 | removes it from resource wait queues, and deallocates its stack |
553 | | as well as the optional floating point context. The taskâs name |
| 553 | as well as the optional floating point context. The task's name |
554 | 554 | and ID become inactive at this time, and any subsequent |
555 | 555 | references to either of them is invalid. In fact, RTEMS may |
… |
… |
|
590 | 590 | ========== |
591 | 591 | |
592 | | This section details the task managerâs directives. A |
593 | | subsection is dedicated to each of this managerâs directives and |
| 592 | This section details the task manager's directives. A |
| 593 | subsection is dedicated to each of this manager's directives and |
594 | 594 | describes the calling sequence, related constants, usage, and |
595 | 595 | status codes. |
… |
… |
|
630 | 630 | It allocates and initializes a TCB, a stack, and an optional |
631 | 631 | floating point context area. The mode parameter contains values |
632 | | which sets the taskâs initial execution mode. The``RTEMS_FLOATING_POINT`` attribute should be |
| 632 | which sets the task's initial execution mode. The``RTEMS_FLOATING_POINT`` attribute should be |
633 | 633 | specified if the created task |
634 | 634 | is to use a numeric coprocessor. For performance reasons, it is |
… |
… |
|
714 | 714 | interact with them. This avoids the system overhead incurred by |
715 | 715 | the creation of a global task. When a global task is created, |
716 | | the taskâs name and id must be transmitted to every node in the |
| 716 | the task's name and id must be transmitted to every node in the |
717 | 717 | system for insertion in the local copy of the global object |
718 | 718 | table. |
… |
… |
|
821 | 821 | This directive readies the task, specified by ``id``, for execution |
822 | 822 | based on the priority and execution mode specified when the task |
823 | | was created. The starting address of the task is given in``entry_point``. The taskâs starting argument is contained in |
| 823 | was created. The starting address of the task is given in``entry_point``. The task's starting argument is contained in |
824 | 824 | argument. This argument can be a single value or used as an index into an |
825 | 825 | array of parameter blocks. The type of this numeric argument is an unsigned |
… |
… |
|
862 | 862 | |
863 | 863 | This directive resets the task specified by id to begin |
864 | | execution at its original starting address. The taskâs priority |
| 864 | execution at its original starting address. The task's priority |
865 | 865 | and execution mode are set to the original creation values. If |
866 | 866 | the task is currently blocked, RTEMS automatically makes the |
… |
… |
|
868 | 868 | dormant state. |
869 | 869 | |
870 | | The taskâs starting argument is contained in argument. This argument can be a |
| 870 | The task's starting argument is contained in argument. This argument can be a |
871 | 871 | single value or an index into an array of parameter blocks. The type of this |
872 | 872 | numeric argument is an unsigned integer type with the property that any valid |
… |
… |
|
1087 | 1087 | id. An id of ``RTEMS_SELF`` is used to indicate |
1088 | 1088 | the calling task. When new_priority is not equal to``RTEMS_CURRENT_PRIORITY``, the specified |
1089 | | taskâs previous priority is returned in old_priority. When |
| 1089 | task's previous priority is returned in old_priority. When |
1090 | 1090 | new_priority is ``RTEMS_CURRENT_PRIORITY``, |
1091 | | the specified taskâs current |
| 1091 | the specified task's current |
1092 | 1092 | priority is returned in old_priority. Valid priorities range |
1093 | 1093 | from a high of 1 to a low of 255. |
… |
… |
|
1096 | 1096 | |
1097 | 1097 | The calling task may be preempted if its preemption mode is |
1098 | | enabled and it lowers its own priority or raises another taskâs |
| 1098 | enabled and it lowers its own priority or raises another task's |
1099 | 1099 | priority. |
1100 | 1100 | |
… |
… |
|
1108 | 1108 | If the task specified by id is currently holding any binary |
1109 | 1109 | semaphores which use the priority inheritance algorithm, then |
1110 | | the taskâs priority cannot be lowered immediately. If the |
1111 | | taskâs priority were lowered immediately, then priority |
1112 | | inversion results. The requested lowering of the taskâs |
| 1110 | the task's priority cannot be lowered immediately. If the |
| 1111 | task's priority were lowered immediately, then priority |
| 1112 | inversion results. The requested lowering of the task's |
1113 | 1113 | priority will occur when the task has released all priority |
1114 | | inheritance binary semaphores. The taskâs priority can be |
1115 | | increased regardless of the taskâs use of priority inheritance |
| 1114 | inheritance binary semaphores. The task's priority can be |
| 1115 | increased regardless of the task's use of priority inheritance |
1116 | 1116 | binary semaphores. |
1117 | 1117 | |
… |
… |
|
1145 | 1145 | |
1146 | 1146 | This directive manipulates the execution mode of the calling |
1147 | | task. A taskâs execution mode enables and disables preemption, |
| 1147 | task. A task's execution mode enables and disables preemption, |
1148 | 1148 | timeslicing, asynchronous signal processing, as well as |
1149 | 1149 | specifying the current interrupt level. To modify an execution |
… |
… |
|
1168 | 1168 | indicator specified in mode. |
1169 | 1169 | |
1170 | | The set of task mode constants and each modeâs corresponding |
| 1170 | The set of task mode constants and each mode's corresponding |
1171 | 1171 | mask constant is provided in the following table: |
1172 | 1172 | |
… |
… |
|
1328 | 1328 | then be private to the task. The task can access and modify the |
1329 | 1329 | variable, but the modifications will not appear to other tasks, and |
1330 | | other tasksâ modifications to that variable will not affect the value |
| 1330 | other tasks' modifications to that variable will not affect the value |
1331 | 1331 | seen by the task. This is accomplished by saving and restoring the |
1332 | | variableâs value each time a task switch occurs to or from the calling task. |
1333 | | If the dtor argument is non-NULL it specifies the address of a âdestructorâ |
| 1332 | variable's value each time a task switch occurs to or from the calling task. |
| 1333 | If the dtor argument is non-NULL it specifies the address of a 'destructor' |
1334 | 1334 | function which will be called when the task is deleted. The argument |
1335 | | passed to the destructor function is the taskâs value of the variable. |
| 1335 | passed to the destructor function is the task's value of the variable. |
1336 | 1336 | |
1337 | 1337 | **NOTES:** |
… |
… |
|
1343 | 1343 | task variables. One efficient method |
1344 | 1344 | is to have a single task variable that is a pointer to a dynamically |
1345 | | allocated structure containing the taskâs private âglobalâ data. |
1346 | | In this case the destructor function could be âfreeâ. |
| 1345 | allocated structure containing the task's private 'global' data. |
| 1346 | In this case the destructor function could be 'free'. |
1347 | 1347 | |
1348 | 1348 | Per-task variables are disabled in SMP configurations and this service |
… |
… |
|
1421 | 1421 | **DESCRIPTION:** |
1422 | 1422 | |
1423 | | This directive removes the given location from a taskâs context. |
| 1423 | This directive removes the given location from a task's context. |
1424 | 1424 | |
1425 | 1425 | **NOTES:** |
-
r11e1a6f
|
rd389819
|
|
184 | 184 | The ``rtems_timer_delete`` directive is used to delete a timer. |
185 | 185 | If the timer is running and has not expired, the timer is |
186 | | automatically canceled. The timerâs control block is returned |
| 186 | automatically canceled. The timer's control block is returned |
187 | 187 | to the TMCB free list when it is deleted. A timer can be |
188 | 188 | deleted by a task other than the task which created the timer. |
189 | | Any subsequent references to the timerâs name and ID are invalid. |
| 189 | Any subsequent references to the timer's name and ID are invalid. |
190 | 190 | |
191 | 191 | Directives |
192 | 192 | ========== |
193 | 193 | |
194 | | This section details the timer managerâs directives. |
195 | | A subsection is dedicated to each of this managerâs directives |
| 194 | This section details the timer manager's directives. |
| 195 | A subsection is dedicated to each of this manager's directives |
196 | 196 | and describes the calling sequence, related constants, usage, |
197 | 197 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
10 | 10 | The directives provided by the timespec helpers manager are: |
11 | 11 | |
12 | | - ``rtems_timespec_set`` - Set timespecâs value |
13 | | |
14 | | - ``rtems_timespec_zero`` - Zero timespecâs value |
| 12 | - ``rtems_timespec_set`` - Set timespec's value |
| 13 | |
| 14 | - ``rtems_timespec_zero`` - Zero timespec's value |
15 | 15 | |
16 | 16 | - ``rtems_timespec_is_valid`` - Check if timespec is valid |
… |
… |
|
102 | 102 | ========== |
103 | 103 | |
104 | | This section details the Timespec Helpers managerâs directives. |
105 | | A subsection is dedicated to each of this managerâs directives |
| 104 | This section details the Timespec Helpers manager's directives. |
| 105 | A subsection is dedicated to each of this manager's directives |
106 | 106 | and describes the calling sequence, related constants, usage, |
107 | 107 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
73 | 73 | RTEMS allows the user to have multiple extension sets |
74 | 74 | active at the same time. First, a single static extension set |
75 | | may be defined as the applicationâs User Extension Table which |
| 75 | may be defined as the application's User Extension Table which |
76 | 76 | is included as part of the Configuration Table. This extension |
77 | 77 | set is active for the entire life of the system and may not be |
… |
… |
|
113 | 113 | |
114 | 114 | RTEMS provides for a pointer to a user-defined data |
115 | | area for each extension set to be linked to each taskâs control |
| 115 | area for each extension set to be linked to each task's control |
116 | 116 | block. This set of pointers is an extension of the TCB and can |
117 | | be used to store additional data required by the userâs |
| 117 | be used to store additional data required by the user's |
118 | 118 | extension functions. |
119 | 119 | |
… |
… |
|
130 | 130 | augment the TCB with user-defined information. For example, an |
131 | 131 | application could implement task profiling by storing timing |
132 | | statistics in the TCBâs extended memory area. When a task |
| 132 | statistics in the TCB's extended memory area. When a task |
133 | 133 | context switch is being executed, the TASK_SWITCH extension |
134 | 134 | could read a real-time clock to calculate how long the task |
… |
… |
|
145 | 145 | deleted. Since the TCB extension buffers would most likely be |
146 | 146 | of a fixed size, the RTEMS partition manager could be used to |
147 | | manage the applicationâs extended memory area. The application |
| 147 | manage the application's extended memory area. The application |
148 | 148 | could create a partition of fixed size TCB extension buffers and |
149 | | use the partition managerâs allocation and deallocation |
| 149 | use the partition manager's allocation and deallocation |
150 | 150 | directives to obtain and release the extension buffers. |
151 | 151 | |
… |
… |
|
287 | 287 | the task that is being swapped out, and heir_task can be used to |
288 | 288 | access the TCB for the task being swapped in. This extension is |
289 | | invoked from RTEMSâ dispatcher routine after the current_task |
| 289 | invoked from RTEMS' dispatcher routine after the current_task |
290 | 290 | context has been saved, but before the heir_task context has |
291 | 291 | been restored. This extension should not call any RTEMS |
… |
… |
|
361 | 361 | the fatal_error_occurred directive. |
362 | 362 | |
363 | | If defined, the userâs FATAL error extension is |
364 | | invoked before RTEMSâ default fatal error routine is invoked and |
| 363 | If defined, the user's FATAL error extension is |
| 364 | invoked before RTEMS' default fatal error routine is invoked and |
365 | 365 | the processor is stopped. For example, this extension could be |
366 | 366 | used to pass control to a debugger when a fatal error occurs. |
… |
… |
|
411 | 411 | Standard C Library. Extension sets which are installed after |
412 | 412 | the Standard C Library will operate correctly even if they |
413 | | utilize the C Library because the C Libraryâs TASK_DELETE |
| 413 | utilize the C Library because the C Library's TASK_DELETE |
414 | 414 | extension is invoked after that of the other extensions. |
415 | 415 | |
… |
… |
|
445 | 445 | |
446 | 446 | The ``rtems_extension_delete`` directive is used to delete an |
447 | | extension set. The extension setâs control block is returned to |
| 447 | extension set. The extension set's control block is returned to |
448 | 448 | the ESCB free list when it is deleted. An extension set can be |
449 | 449 | deleted by a task other than the task which created the |
450 | | extension set. Any subsequent references to the extensionâs |
| 450 | extension set. Any subsequent references to the extension's |
451 | 451 | name and ID are invalid. |
452 | 452 | |
… |
… |
|
454 | 454 | ========== |
455 | 455 | |
456 | | This section details the user extension managerâs |
457 | | directives. A subsection is dedicated to each of this managerâs |
| 456 | This section details the user extension manager's |
| 457 | directives. A subsection is dedicated to each of this manager's |
458 | 458 | directives and describes the calling sequence, related |
459 | 459 | constants, usage, and status codes. |
-
r11e1a6f
|
rd389819
|
|
52 | 52 | |
53 | 53 | A called function may clobber all registers, except RETS, R4-R7, P3-P5, |
54 | | FP and SP. It may also modify the first 12 bytes in the callerâÂÂs stack |
| 54 | FP and SP. It may also modify the first 12 bytes in the caller's stack |
55 | 55 | frame which is used as an argument area for the first three arguments |
56 | 56 | (which are passed in R0...R3 but may be placed on the stack by the |
… |
… |
|
81 | 81 | ==================== |
82 | 82 | |
83 | | Discussed in this chapter are the AVRâs interrupt response and |
| 83 | Discussed in this chapter are the AVR's interrupt response and |
84 | 84 | control mechanisms as they pertain to RTEMS. |
85 | 85 | |
-
r11e1a6f
|
rd389819
|
|
56 | 56 | |
57 | 57 | A called function may clobber all registers, except RETS, R4-R7, P3-P5, |
58 | | FP and SP. It may also modify the first 12 bytes in the callerâÂÂs stack |
| 58 | FP and SP. It may also modify the first 12 bytes in the caller's stack |
59 | 59 | frame which is used as an argument area for the first three arguments |
60 | 60 | (which are passed in R0...R3 but may be placed on the stack by the |
… |
… |
|
85 | 85 | ==================== |
86 | 86 | |
87 | | Discussed in this chapter are the Blackfinâs interrupt response and |
| 87 | Discussed in this chapter are the Blackfin's interrupt response and |
88 | 88 | control mechanisms as they pertain to RTEMS. The Blackfin architecture |
89 | 89 | support 16 kinds of interrupts broken down into Core and general-purpose |
-
r11e1a6f
|
rd389819
|
|
3 | 3 | ================================= |
4 | 4 | |
5 | | COPYRIGHT © 1988 - 2015. |
| 5 | COPYRIGHT (c) 1988 - 2015. |
6 | 6 | |
7 | 7 | On-Line Applications Research Corporation (OAR). |
-
r11e1a6f
|
rd389819
|
|
10 | 10 | following documents: |
11 | 11 | |
12 | | - *386 Programmerâs Reference Manual, Intel, Order No. 230985-002*. |
| 12 | - *386 Programmer's Reference Manual, Intel, Order No. 230985-002*. |
13 | 13 | |
14 | 14 | - *386 Microprocessor Hardware Reference Manual, Intel, |
15 | 15 | Order No. 231732-003*. |
16 | 16 | |
17 | | - *80386 System Software Writerâs Guide, Intel, Order No. 231499-001*. |
18 | | |
19 | | - *80387 Programmerâs Reference Manual, Intel, Order No. 231917-001*. |
| 17 | - *80386 System Software Writer's Guide, Intel, Order No. 231499-001*. |
| 18 | |
| 19 | - *80387 Programmer's Reference Manual, Intel, Order No. 231917-001*. |
20 | 20 | |
21 | 21 | CPU Model Dependent Features |
… |
… |
|
34 | 34 | endian swaps a thirty-two bit quantity. This instruction |
35 | 35 | appears to be present in all CPU models |
36 | | i486âs and above. |
| 36 | i486's and above. |
37 | 37 | |
38 | 38 | Calling Conventions |
… |
… |
|
129 | 129 | dependent details of interrupt processing, it is important to |
130 | 130 | understand how the RTEMS interrupt manager is mapped onto the |
131 | | processorâs unique architecture. Discussed in this chapter are |
132 | | the the processorâs response and control mechanisms as they |
| 131 | processor's unique architecture. Discussed in this chapter are |
| 132 | the the processor's response and control mechanisms as they |
133 | 133 | pertain to RTEMS. |
134 | 134 | |
… |
… |
|
176 | 176 | |
177 | 177 | Although RTEMS supports 256 interrupt levels, the |
178 | | i386 only supports two â enabled and disabled. Interrupts are |
| 178 | i386 only supports two - enabled and disabled. Interrupts are |
179 | 179 | enabled when the interrupt-enable flag (IF) in the extended |
180 | 180 | flags (EFLAGS) is set. Conversely, interrupt processing is |
… |
… |
|
226 | 226 | When the i386 is reset, |
227 | 227 | |
228 | | - The EAX register is set to indicate the results of the processorâs |
| 228 | - The EAX register is set to indicate the results of the processor's |
229 | 229 | power-up self test. If the self-test was not executed, the contents of |
230 | 230 | this register are undefined. Otherwise, a non-zero value indicates the |
… |
… |
|
254 | 254 | of memory. |
255 | 255 | |
256 | | Typically, an intersegment JMP to the applicationâs initialization code is |
| 256 | Typically, an intersegment JMP to the application's initialization code is |
257 | 257 | placed at address 0xFFFFFFF0. |
258 | 258 | |
… |
… |
|
307 | 307 | |
308 | 308 | For more information regarding the i386 data structures and their |
309 | | contents, refer to Intelâs 386 Programmerâs Reference Manual. |
| 309 | contents, refer to Intel's 386 Programmer's Reference Manual. |
310 | 310 | |
311 | 311 | .. COMMENT: COPYRIGHT (c) 1988-2002. |
-
r11e1a6f
|
rd389819
|
|
6 | 6 | architecture "soft" microprocessor, available for free with an open IP |
7 | 7 | core licensing agreement. Although mainly targeted for Lattice FPGA |
8 | | devices the microprocessor can be implemented on other vendorsâ FPGAs, |
| 8 | devices the microprocessor can be implemented on other vendors' FPGAs, |
9 | 9 | too. |
10 | 10 | |
… |
… |
|
193 | 193 | |
194 | 194 | Most of the action performed as part of processing the fatal error are |
195 | | described in detail in the Fatal Error Manager chapter in the Userâs |
| 195 | described in detail in the Fatal Error Manager chapter in the User's |
196 | 196 | Guide. However, the if no user provided extension or BSP specific fatal |
197 | 197 | error handler takes action, the final default action is to invoke a |
… |
… |
|
222 | 222 | on developing a BSP, refer to BSP and Device Driver Development Guide |
223 | 223 | and the chapter titled Board Support Packages in the RTEMS |
224 | | Applications Userâs Guide. |
| 224 | Applications User's Guide. |
225 | 225 | |
226 | 226 | System Reset |
-
r11e1a6f
|
rd389819
|
|
18 | 18 | - *M68000 Family Reference, Motorola, FR68K/D*. |
19 | 19 | |
20 | | - *MC68020 Userâs Manual, Motorola, MC68020UM/AD*. |
21 | | |
22 | | - *MC68881/MC68882 Floating-Point Coprocessor Userâs Manual, |
| 20 | - *MC68020 User's Manual, Motorola, MC68020UM/AD*. |
| 21 | |
| 22 | - *MC68881/MC68882 Floating-Point Coprocessor User's Manual, |
23 | 23 | Motorola, MC68881UM/AD*. |
24 | 24 | |
… |
… |
|
137 | 137 | ==================== |
138 | 138 | |
139 | | Discussed in this section are the MC68xxxâs interrupt response and |
| 139 | Discussed in this section are the MC68xxx's interrupt response and |
140 | 140 | control mechanisms as they pertain to RTEMS. |
141 | 141 | |
… |
… |
|
183 | 183 | interrupt handler will begin execution. The RTEMS interrupt |
184 | 184 | handler saves all registers which are not preserved according to |
185 | | the calling conventions and invokes the applicationâs ISR. |
| 185 | the calling conventions and invokes the application's ISR. |
186 | 186 | |
187 | 187 | A nested interrupt is processed similarly by these |
… |
… |
|
340 | 340 | ------------------------ |
341 | 341 | |
342 | | The address of the applicationâs initialization code should be stored in |
| 342 | The address of the application's initialization code should be stored in |
343 | 343 | the first vector of the EVT which will allow the immediate vectoring to |
344 | 344 | the application code. If the application requires that the VBR be some |
345 | 345 | value besides zero, then it should be set to the required value at this |
346 | | point. All tasks share the same MC68020âs VBR value. Because interrupts |
| 346 | point. All tasks share the same MC68020's VBR value. Because interrupts |
347 | 347 | are enabled automatically by RTEMS as part of the context switch to the |
348 | 348 | first task, the VBR MUST be set by either RTEMS of the BSP before this |
… |
… |
|
352 | 352 | |
353 | 353 | In addition to the requirements described in the |
354 | | Board Support Packages chapter of the Applications Userâs |
| 354 | Board Support Packages chapter of the Applications User's |
355 | 355 | Manual for the reset code which is executed before the call to |
356 | 356 | initialize executive, the MC68020 version has the following |
… |
… |
|
367 | 367 | the initialize executive directive. |
368 | 368 | |
369 | | - Must initialize the MC68020âs vector table. |
| 369 | - Must initialize the MC68020's vector table. |
370 | 370 | |
371 | 371 | .. COMMENT: Copyright (c) 2014 embedded brains GmbH. All rights reserved. |
-
r11e1a6f
|
rd389819
|
|
75 | 75 | Although RTEMS hides many of the processor dependent |
76 | 76 | details of interrupt processing, it is important to understand |
77 | | how the RTEMS interrupt manager is mapped onto the processorâs |
78 | | unique architecture. Discussed in this chapter are the MIPSâs |
| 77 | how the RTEMS interrupt manager is mapped onto the processor's |
| 78 | unique architecture. Discussed in this chapter are the MIPS's |
79 | 79 | interrupt response and control mechanisms as they pertain to |
80 | 80 | RTEMS. |
-
r11e1a6f
|
rd389819
|
|
43 | 43 | is or is not present and defines a single constant appropriately. |
44 | 44 | Conditional compilation is utilized to include the appropriate source |
45 | | code for this CPU modelâs feature set. It is important to note that |
| 45 | code for this CPU model's feature set. It is important to note that |
46 | 46 | this means that RTEMS is thus compiled using the appropriate feature set |
47 | 47 | and compilation flags optimal for this CPU model used. The alternative |
… |
… |
|
119 | 119 | |
120 | 120 | Each high-level language compiler generates subroutine entry and exit |
121 | | code based upon a set of rules known as the compilerâs calling convention. |
| 121 | code based upon a set of rules known as the compiler's calling convention. |
122 | 122 | These rules address the following issues: |
123 | 123 | |
… |
… |
|
128 | 128 | - call and return mechanism |
129 | 129 | |
130 | | A compilerâs calling convention is of importance when |
| 130 | A compiler's calling convention is of importance when |
131 | 131 | interfacing to subroutines written in another language either |
132 | 132 | assembly or high-level. Even when the high-level language and |
… |
… |
|
178 | 178 | models ranging from pure physical addressing to complex demand |
179 | 179 | paged virtual memory systems. RTEMS supports a flat memory |
180 | | model which ranges contiguously over the processorâs allowable |
| 180 | model which ranges contiguously over the processor's allowable |
181 | 181 | address space. RTEMS does not support segmentation or virtual |
182 | 182 | memory of any kind. The appropriate memory model for RTEMS |
… |
… |
|
220 | 220 | hides many of the processor dependent details of interrupt processing, |
221 | 221 | it is important to understand how the RTEMS interrupt manager is mapped |
222 | | onto the processorâs unique architecture. |
| 222 | onto the processor's unique architecture. |
223 | 223 | |
224 | 224 | RTEMS supports a dedicated interrupt stack for all architectures. |
… |
… |
|
244 | 244 | Workspace Area. The amount of memory allocated for the interrupt stack |
245 | 245 | is user configured and based upon the ``confdefs.h`` parameter``CONFIGURE_INTERRUPT_STACK_SIZE``. This parameter is described |
246 | | in detail in the Configuring a System chapter of the Userâs Guide. |
| 246 | in detail in the Configuring a System chapter of the User's Guide. |
247 | 247 | On configurations in which RTEMS allocates the interrupt stack, during |
248 | 248 | the initialization process, RTEMS will also install its interrupt stack. |
… |
… |
|
319 | 319 | |
320 | 320 | Most of the action performed as part of processing the fatal error are |
321 | | described in detail in the Fatal Error Manager chapter in the Userâs |
| 321 | described in detail in the Fatal Error Manager chapter in the User's |
322 | 322 | Guide. However, the if no user provided extension or BSP specific fatal |
323 | 323 | error handler takes action, the final default action is to invoke a |
… |
… |
|
415 | 415 | on developing a BSP, refer to BSP and Device Driver Development Guide |
416 | 416 | and the chapter titled Board Support Packages in the RTEMS |
417 | | Applications Userâs Guide. |
| 417 | Applications User's Guide. |
418 | 418 | |
419 | 419 | System Reset |
-
r11e1a6f
|
rd389819
|
|
21 | 21 | (Motorola Document MPRPPCFPE-01). |
22 | 22 | |
23 | | - *IBM PPC403GB Embedded Controller Userâs Manual*. |
| 23 | - *IBM PPC403GB Embedded Controller User's Manual*. |
24 | 24 | |
25 | 25 | - *PoweRisControl MPC500 Family RCPU RISC Central Processing |
26 | 26 | Unit Reference Manual* (Motorola Document RCPUURM/AD). |
27 | 27 | |
28 | | - *PowerPC 601 RISC Microprocessor Userâs Manual* |
| 28 | - *PowerPC 601 RISC Microprocessor User's Manual* |
29 | 29 | (Motorola Document MPR601UM/AD). |
30 | 30 | |
31 | | - *PowerPC 603 RISC Microprocessor Userâs Manual* |
| 31 | - *PowerPC 603 RISC Microprocessor User's Manual* |
32 | 32 | (Motorola Document MPR603UM/AD). |
33 | 33 | |
34 | | - *PowerPC 603e RISC Microprocessor Userâs Manual* |
| 34 | - *PowerPC 603e RISC Microprocessor User's Manual* |
35 | 35 | (Motorola Document MPR603EUM/AD). |
36 | 36 | |
37 | | - *PowerPC 604 RISC Microprocessor Userâs Manual* |
| 37 | - *PowerPC 604 RISC Microprocessor User's Manual* |
38 | 38 | (Motorola Document MPR604UM/AD). |
39 | 39 | |
40 | | - *PowerPC MPC821 Portable Systems Microprocessor Userâs Manual* |
| 40 | - *PowerPC MPC821 Portable Systems Microprocessor User's Manual* |
41 | 41 | (Motorola Document MPC821UM/AD). |
42 | 42 | |
43 | | - *PowerQUICC MPC860 Userâs Manual* (Motorola Document MPC860UM/AD). |
| 43 | - *PowerQUICC MPC860 User's Manual* (Motorola Document MPC860UM/AD). |
44 | 44 | |
45 | 45 | Motorola maintains an on-line electronic library for the PowerPC |
… |
… |
|
76 | 76 | --------- |
77 | 77 | |
78 | | The macro PPC_ALIGNMENT is set to the PowerPC modelâs worst case alignment |
| 78 | The macro PPC_ALIGNMENT is set to the PowerPC model's worst case alignment |
79 | 79 | requirement for data types on a byte boundary. This value is used |
80 | 80 | to derive the alignment restrictions for memory allocated from |
… |
… |
|
412 | 412 | Although RTEMS hides many of the processor dependent |
413 | 413 | details of interrupt processing, it is important to understand |
414 | | how the RTEMS interrupt manager is mapped onto the processorâs |
415 | | unique architecture. Discussed in this chapter are the PowerPCâs |
| 414 | how the RTEMS interrupt manager is mapped onto the processor's |
| 415 | unique architecture. Discussed in this chapter are the PowerPC's |
416 | 416 | interrupt response and control mechanisms as they pertain to |
417 | 417 | RTEMS. |
… |
… |
|
469 | 469 | performs the following actions: |
470 | 470 | |
471 | | - saves the state of the interrupted task on itâs stack, |
| 471 | - saves the state of the interrupted task on it's stack, |
472 | 472 | |
473 | 473 | - saves all registers which are not normally preserved |
474 | | by the calling sequence so the userâs interrupt service |
| 474 | by the calling sequence so the user's interrupt service |
475 | 475 | routine can be written in a high-level language. |
476 | 476 | |
… |
… |
|
561 | 561 | architecture defines a Reset Exception, but leaves the |
562 | 562 | details of the CPU state as implementation specific. Please |
563 | | refer to the Userâs Manual for the CPU model in question. |
| 563 | refer to the User's Manual for the CPU model in question. |
564 | 564 | |
565 | 565 | In general, at power-up the PowerPC begin execution at address |
… |
… |
|
580 | 580 | |
581 | 581 | In addition to the requirements described in the*Board Support Packages* chapter of the RTEMS C |
582 | | Applications Userâs Manual for the reset code |
| 582 | Applications User's Manual for the reset code |
583 | 583 | which is executed before the call to ``rtems_initialize_executive``, |
584 | 584 | the PowrePC version has the following specific requirements: |
… |
… |
|
597 | 597 | conditions can be properly handled. |
598 | 598 | |
599 | | - Must initialize the PowerPCâs initial Exception Table with default |
| 599 | - Must initialize the PowerPC's initial Exception Table with default |
600 | 600 | handlers. |
601 | 601 | |
-
r11e1a6f
|
rd389819
|
|
34 | 34 | **ERC32 Specific Information** |
35 | 35 | |
36 | | The European Space Agencyâs ERC32 is a three chip |
| 36 | The European Space Agency's ERC32 is a three chip |
37 | 37 | computing core implementing a SPARC V7 processor and associated |
38 | 38 | support circuitry for embedded space applications. The integer |
… |
… |
|
57 | 57 | - MEC Device Specification |
58 | 58 | |
59 | | Additionally, the SPARC RISC Userâs Guide from Matra |
| 59 | Additionally, the SPARC RISC User's Guide from Matra |
60 | 60 | MHS documents the functionality of the integer and floating |
61 | 61 | point units including the instruction set information. To |
… |
… |
|
113 | 113 | single constant appropriately. Conditional compilation is |
114 | 114 | utilized to include the appropriate source code for this CPU |
115 | | modelâs feature set. It is important to note that this means |
| 115 | model's feature set. It is important to note that this means |
116 | 116 | that RTEMS is thus compiled using the appropriate feature set |
117 | 117 | and compilation flags optimal for this CPU model used. The |
… |
… |
|
131 | 131 | The macro CPU_MODEL_NAME is a string which designates |
132 | 132 | the name of this CPU model. For example, for the European Space |
133 | | Agencyâs ERC32 SPARC model, this macro is set to the string |
| 133 | Agency's ERC32 SPARC model, this macro is set to the string |
134 | 134 | "erc32". |
135 | 135 | |
… |
… |
|
386 | 386 | Because the set of register windows is finite, it is |
387 | 387 | possible to execute enough save instructions without |
388 | | corresponding restoreâs to consume all of the register windows. |
| 388 | corresponding restore's to consume all of the register windows. |
389 | 389 | This is easily accomplished in a high level language because |
390 | 390 | each subroutine typically performs a save instruction upon |
… |
… |
|
397 | 397 | |
398 | 398 | Similarly, the subroutines will eventually complete |
399 | | and begin to perform restoreâs. If the restore results in the |
| 399 | and begin to perform restore's. If the restore results in the |
400 | 400 | need for a register window which has previously been written to |
401 | 401 | memory as part of an overflow, then a window underflow condition |
… |
… |
|
459 | 459 | effective call and return mechanism. A subroutine is invoked |
460 | 460 | via the call (call) instruction. This instruction places the |
461 | | return address in the callerâs output register 7 (o7). After |
| 461 | return address in the caller's output register 7 (o7). After |
462 | 462 | the callee executes a save instruction, this value is available |
463 | 463 | in input register 7 (i7) until the corresponding restore |
… |
… |
|
467 | 467 | return address. There is a delay slot following this |
468 | 468 | instruction which is commonly used to execute a restore |
469 | | instruction â if a register window was allocated by this |
| 469 | instruction - if a register window was allocated by this |
470 | 470 | subroutine. |
471 | 471 | |
… |
… |
|
501 | 501 | |
502 | 502 | RTEMS assumes that arguments are placed in the |
503 | | callerâs output registers with the first argument in output |
| 503 | caller's output registers with the first argument in output |
504 | 504 | register 0 (o0), the second argument in output register 1 (o1), |
505 | 505 | and so forth. Until the callee executes a save instruction, the |
… |
… |
|
535 | 535 | models ranging from pure physical addressing to complex demand |
536 | 536 | paged virtual memory systems. RTEMS supports a flat memory |
537 | | model which ranges contiguously over the processorâs allowable |
| 537 | model which ranges contiguously over the processor's allowable |
538 | 538 | address space. RTEMS does not support segmentation or virtual |
539 | 539 | memory of any kind. The appropriate memory model for RTEMS |
… |
… |
|
602 | 602 | stream. Although RTEMS hides many of the processor dependent |
603 | 603 | details of interrupt processing, it is important to understand |
604 | | how the RTEMS interrupt manager is mapped onto the processorâs |
605 | | unique architecture. Discussed in this chapter are the SPARCâs |
| 604 | how the RTEMS interrupt manager is mapped onto the processor's |
| 605 | unique architecture. Discussed in this chapter are the SPARC's |
606 | 606 | interrupt response and control mechanisms as they pertain to |
607 | 607 | RTEMS. |
… |
… |
|
677 | 677 | performs the following actions: |
678 | 678 | |
679 | | - saves the state of the interrupted task on itâs stack, |
| 679 | - saves the state of the interrupted task on it's stack, |
680 | 680 | |
681 | 681 | - insures that a register window is available for |
… |
… |
|
714 | 714 | RTEMS interrupt handler insures that a register window is |
715 | 715 | available for subsequent traps before enabling traps and |
716 | | invoking the userâs interrupt handler. |
| 716 | invoking the user's interrupt handler. |
717 | 717 | |
718 | 718 | Interrupt Levels |
… |
… |
|
793 | 793 | since EVERY task stack would have to include enough space to |
794 | 794 | account for the worst case interrupt stack requirements in |
795 | | addition to itâs own worst case usage. RTEMS addresses this |
| 795 | addition to it's own worst case usage. RTEMS addresses this |
796 | 796 | problem on the SPARC by providing a dedicated interrupt stack |
797 | 797 | managed by software. |
… |
… |
|
865 | 865 | For more information on developing a BSP, refer to the chapter |
866 | 866 | titled Board Support Packages in the RTEMS |
867 | | Applications Userâs Guide. |
| 867 | Applications User's Guide. |
868 | 868 | |
869 | 869 | System Reset |
… |
… |
|
892 | 892 | ------------------------ |
893 | 893 | |
894 | | It is the responsibility of the applicationâs |
| 894 | It is the responsibility of the application's |
895 | 895 | initialization code to initialize the TBR and install trap |
896 | 896 | handlers for at least the register window overflow and register |
… |
… |
|
899 | 899 | management. However, interrupts should be disabled by setting |
900 | 900 | the Processor Interrupt Level (pil) field of the psr to 15. |
901 | | RTEMS installs itâs own Trap Table as part of initialization |
| 901 | RTEMS installs it's own Trap Table as part of initialization |
902 | 902 | which is initialized with the contents of the Trap Table in |
903 | 903 | place when the ``rtems_initialize_executive`` directive was invoked. |
… |
… |
|
927 | 927 | conditions can be properly handled. |
928 | 928 | |
929 | | - Must initialize the SPARCâs initial trap table with at |
| 929 | - Must initialize the SPARC's initial trap table with at |
930 | 930 | least trap handlers for register window overflow and register |
931 | 931 | window underflow. |
-
r11e1a6f
|
rd389819
|
|
17 | 17 | The following documents were used in developing the SPARC-64 sun4u port: |
18 | 18 | |
19 | | - UltraSPARC UserâÂÂs Manual |
| 19 | - UltraSPARC User's Manual |
20 | 20 | (http://www.sun.com/microelectronics/manuals/ultrasparc/802-7220-02.pdf) |
21 | 21 | |
… |
… |
|
105 | 105 | Each high-level language compiler generates |
106 | 106 | subroutine entry and exit code based upon a set of rules known |
107 | | as the compilerâs calling convention. These rules address the |
| 107 | as the compiler's calling convention. These rules address the |
108 | 108 | following issues: |
109 | 109 | |
… |
… |
|
114 | 114 | - call and return mechanism |
115 | 115 | |
116 | | A compilerâs calling convention is of importance when |
| 116 | A compiler's calling convention is of importance when |
117 | 117 | interfacing to subroutines written in another language either |
118 | 118 | assembly or high-level. Even when the high-level language and |
… |
… |
|
223 | 223 | *``Processor State Register (pstate)``* |
224 | 224 | The privileged pstate register contains control fields for the proces- |
225 | | sorâÂÂs current state. Its flag fields include the interrupt enable, privi- |
| 225 | sor's current state. Its flag fields include the interrupt enable, privi- |
226 | 226 | leged mode, and enable FPU. |
227 | 227 | |
… |
… |
|
271 | 271 | Because the set of register windows is finite, it is |
272 | 272 | possible to execute enough save instructions without |
273 | | corresponding restoreâs to consume all of the register windows. |
| 273 | corresponding restore's to consume all of the register windows. |
274 | 274 | This is easily accomplished in a high level language because |
275 | 275 | each subroutine typically performs a save instruction upon |
… |
… |
|
282 | 282 | |
283 | 283 | Similarly, the subroutines will eventually complete |
284 | | and begin to perform restoreâs. If the restore results in the |
| 284 | and begin to perform restore's. If the restore results in the |
285 | 285 | need for a register window which has previously been written to |
286 | 286 | memory as part of an overflow, then a window underflow condition |
… |
… |
|
339 | 339 | effective call and return mechanism. A subroutine is invoked |
340 | 340 | via the call (call) instruction. This instruction places the |
341 | | return address in the callerâs output register 7 (o7). After |
| 341 | return address in the caller's output register 7 (o7). After |
342 | 342 | the callee executes a save instruction, this value is available |
343 | 343 | in input register 7 (i7) until the corresponding restore |
… |
… |
|
347 | 347 | return address. There is a delay slot following this |
348 | 348 | instruction which is commonly used to execute a restore |
349 | | instruction â if a register window was allocated by this |
| 349 | instruction - if a register window was allocated by this |
350 | 350 | subroutine. |
351 | 351 | |
… |
… |
|
355 | 355 | restore instructions which manage the set of registers windows. |
356 | 356 | This allows for the compiler to generate leaf-optimized functions |
357 | | that utilize the callerâÂÂs output registers without using save and restore. |
| 357 | that utilize the caller's output registers without using save and restore. |
358 | 358 | |
359 | 359 | Calling Mechanism |
… |
… |
|
377 | 377 | |
378 | 378 | RTEMS assumes that arguments are placed in the |
379 | | callerâs output registers with the first argument in output |
| 379 | caller's output registers with the first argument in output |
380 | 380 | register 0 (o0), the second argument in output register 1 (o1), |
381 | 381 | and so forth. Until the callee executes a save instruction, the |
… |
… |
|
411 | 411 | models ranging from pure physical addressing to complex demand |
412 | 412 | paged virtual memory systems. RTEMS supports a flat memory |
413 | | model which ranges contiguously over the processorâs allowable |
| 413 | model which ranges contiguously over the processor's allowable |
414 | 414 | address space. RTEMS does not support segmentation or virtual |
415 | 415 | memory of any kind. The appropriate memory model for RTEMS |
… |
… |
|
543 | 543 | performs the following actions: |
544 | 544 | |
545 | | - saves the state of the interrupted task on itâs stack, |
| 545 | - saves the state of the interrupted task on it's stack, |
546 | 546 | |
547 | 547 | - switches the processor to trap level 0, |
… |
… |
|
598 | 598 | since EVERY task stack would have to include enough space to |
599 | 599 | account for the worst case interrupt stack requirements in |
600 | | addition to itâs own worst case usage. RTEMS addresses this |
| 600 | addition to it's own worst case usage. RTEMS addresses this |
601 | 601 | problem on the SPARC by providing a dedicated interrupt stack |
602 | 602 | managed by software. |
… |
… |
|
662 | 662 | For more information on developing a BSP, refer to the chapter |
663 | 663 | titled Board Support Packages in the RTEMS |
664 | | Applications Userâs Guide. |
| 664 | Applications User's Guide. |
665 | 665 | |
666 | 666 | HelenOS and Open Firmware |
-
r11e1a6f
|
rd389819
|
|
85 | 85 | Although RTEMS hides many of the processor dependent |
86 | 86 | details of interrupt processing, it is important to understand |
87 | | how the RTEMS interrupt manager is mapped onto the processorâs |
88 | | unique architecture. Discussed in this chapter are the MIPSâs |
| 87 | how the RTEMS interrupt manager is mapped onto the processor's |
| 88 | unique architecture. Discussed in this chapter are the MIPS's |
89 | 89 | interrupt response and control mechanisms as they pertain to |
90 | 90 | RTEMS. |
-
r11e1a6f
|
rd389819
|
|
104 | 104 | |
105 | 105 | ``${RTEMS_ROOT}/cpukit/`` |
106 | | This directory is the root for all of the "multilibâable" |
| 106 | This directory is the root for all of the "multilib'able" |
107 | 107 | portions of RTEMS. This is a GNU way of saying the |
108 | 108 | contents of this directory can be compiled like the |
… |
… |
|
124 | 124 | ``${RTEMS_ROOT}/make/`` |
125 | 125 | This directory contains files which support the |
126 | | RTEMS Makefileâs. From a userâs perspective, the |
| 126 | RTEMS Makefile's. From a user's perspective, the |
127 | 127 | most important parts are found in the ``custom/`` |
128 | 128 | subdirectory. Each ".cfg" file in this directory |
… |
… |
|
233 | 233 | ``${RTEMS_ROOT}/c/src/nfsclient/`` |
234 | 234 | This directory contains a Network File System (NFS) client |
235 | | for RTEMS. With this file system, a userâs application can |
| 235 | for RTEMS. With this file system, a user's application can |
236 | 236 | access files on a remote computer. |
237 | 237 | |
… |
… |
|
555 | 555 | ``${RTEMS_ROOT}/doc/ada_user/`` |
556 | 556 | This directory contains the source code for the *RTEMS |
557 | | Applications Ada Userâs Guide* which documents the Ada95 |
| 557 | Applications Ada User's Guide* which documents the Ada95 |
558 | 558 | binding to the Classic API. This manual is produced from |
559 | 559 | from the same source base as the *RTEMS Application |
560 | | C Userâs Guide*. |
| 560 | C User's Guide*. |
561 | 561 | |
562 | 562 | ``${RTEMS_ROOT}/doc/bsp_howto/`` |
… |
… |
|
606 | 606 | |
607 | 607 | ``${RTEMS_ROOT}/doc/posix_users/`` |
608 | | This directory contains the source code for the*RTEMS POSIX API Userâs Guide*. It is important to |
609 | | note that RTEMSâ support for POSIX is a combination of |
| 608 | This directory contains the source code for the*RTEMS POSIX API User's Guide*. It is important to |
| 609 | note that RTEMS' support for POSIX is a combination of |
610 | 610 | functionality provided by RTEMS and the Newlib C Library |
611 | 611 | so some functionality is documented by Newlib. |
… |
… |
|
629 | 629 | ``${RTEMS_ROOT}/doc/user/`` |
630 | 630 | This directory contains the source code for the *RTEMS |
631 | | Applications C Userâs Guide* which documents the Classic API. |
| 631 | Applications C User's Guide* which documents the Classic API. |
632 | 632 | |
633 | 633 | .. COMMENT: COPYRIGHT (c) 1989-2007. |
-
r11e1a6f
|
rd389819
|
|
3 | 3 | =================================== |
4 | 4 | |
5 | | COPYRIGHT © 1988 - 2015. |
| 5 | COPYRIGHT (c) 1988 - 2015. |
6 | 6 | |
7 | 7 | On-Line Applications Research Corporation (OAR). |
-
r11e1a6f
|
rd389819
|
|
130 | 130 | \*** END OF HELLO WORLD TEST \*** |
131 | 131 | |
132 | | These messages are printed from the applicationâs |
| 132 | These messages are printed from the application's |
133 | 133 | single initialization task. If the above messages are not |
134 | 134 | printed correctly, then either the BSP start up code or the |
… |
… |
|
200 | 200 | |
201 | 201 | The first two messages are printed from the |
202 | | applicationâs single initialization task. The final messages |
| 202 | application's single initialization task. The final messages |
203 | 203 | are printed from the single application task. |
204 | 204 | |
… |
… |
|
234 | 234 | \*** END OF SAMPLE MULTIPROCESSOR APPLICATION \*** |
235 | 235 | |
236 | | The herald is printed from the applicationâs single |
| 236 | The herald is printed from the application's single |
237 | 237 | initialization task on each node. The final messages are |
238 | 238 | printed from the single application task on each node. |
-
r11e1a6f
|
rd389819
|
|
117 | 117 | The source for packhex first appeared in the May 1993 |
118 | 118 | issue of Embedded Systems magazine. The code was downloaded |
119 | | from their BBS. Unfortunately, the authorâs name was not |
| 119 | from their BBS. Unfortunately, the author's name was not |
120 | 120 | provided in the listing. |
121 | 121 | |
… |
… |
|
134 | 134 | |
135 | 135 | unhex accepts Intel Hexadecimal, Motorola Srecord, or |
136 | | TI âBâ records and converts them to their binary equivalent. |
| 136 | TI 'B' records and converts them to their binary equivalent. |
137 | 137 | The output may sent to standout or may be placed in a specified |
138 | 138 | file with the -o option. The designated output file may not be |
-
r11e1a6f
|
rd389819
|
|
2 | 2 | ############################# |
3 | 3 | |
4 | | This set of routines represents the applicationâs interface to files and directories |
| 4 | This set of routines represents the application's interface to files and directories |
5 | 5 | under the RTEMS filesystem. All routines are compliant with POSIX standards if a |
6 | 6 | specific interface has been established. The list below represents the routines that have |
7 | | been included as part of the applicationâs interface. |
| 7 | been included as part of the application's interface. |
8 | 8 | |
9 | 9 | # access() |
… |
… |
|
268 | 268 | reallocated. |
269 | 269 | |
270 | | The dd_buf structureâs memory is reallocated before the control structure |
| 270 | The dd_buf structure's memory is reallocated before the control structure |
271 | 271 | that contains the pointer to the dd_buf region. |
272 | 272 | |
… |
… |
|
630 | 630 | directory. |
631 | 631 | |
632 | | The OPS table evalformake() function for the parentâs filesystem is used |
| 632 | The OPS table evalformake() function for the parent's filesystem is used |
633 | 633 | to locate the node that will be the parent of the new link. It will also |
634 | | locate the start of the new pathâs name. This name will be used to define |
| 634 | locate the start of the new path's name. This name will be used to define |
635 | 635 | a child under the parent directory. |
636 | 636 | |
-
r11e1a6f
|
rd389819
|
|
79 | 79 | |
80 | 80 | - On filesystems supporting hard links, a link count is maintained. |
81 | | Prior to node removal, the nodeâs link count is decremented by one. The |
| 81 | Prior to node removal, the node's link count is decremented by one. The |
82 | 82 | link count must be less than one to allow for removal of the node. |
83 | 83 | |
… |
… |
|
169 | 169 | # write() |
170 | 170 | |
171 | | The filesystemâs type as well as the node type within the filesystem |
| 171 | The filesystem's type as well as the node type within the filesystem |
172 | 172 | determine the nature of the processing that must be performed for each of |
173 | 173 | the functions above. The RTEMS filesystem provides a framework that |
… |
… |
|
635 | 635 | The is intended to contain a string that identifies the device that contains |
636 | 636 | the filesystem information. The filesystems that are currently implemented |
637 | | are memory based and donât require a device specification. |
| 637 | are memory based and don't require a device specification. |
638 | 638 | |
639 | 639 | If the mt_point_node.node_access is NULL then we are mounting the base file |
… |
… |
|
646 | 646 | others. |
647 | 647 | |
648 | | The nodeâs name will be a null string. |
| 648 | The node's name will be a null string. |
649 | 649 | |
650 | 650 | A filesystem information structure(fs_info) will be allocated and |
… |
… |
|
760 | 760 | Handler table functions are defined in a ``rtems_filesystem_file_handlers_r`` |
761 | 761 | structure. It defines functions that are specific to a node type in a given |
762 | | filesystem. One table exists for each of the filesystemâs node types. The |
| 762 | filesystem. One table exists for each of the filesystem's node types. The |
763 | 763 | structure definition appears below. It is followed by general developmental |
764 | 764 | information on each of the functions associated with regular files contained |
-
r11e1a6f
|
rd389819
|
|
57 | 57 | |
58 | 58 | *st_uid* |
59 | | is the user ID of the fileâs owner |
| 59 | is the user ID of the file's owner |
60 | 60 | |
61 | 61 | *st_gid* |
62 | | is the group ID of the fileâs owner |
| 62 | is the group ID of the file's owner |
63 | 63 | |
64 | 64 | *st_atime* |
… |
… |
|
500 | 500 | type. |
501 | 501 | |
502 | | If it is the nodeâs info element is altered so that the info.directory.mt_fs |
| 502 | If it is the node's info element is altered so that the info.directory.mt_fs |
503 | 503 | element points to the mount table chain entry that is associated with the |
504 | 504 | mounted filesystem at this point. The info.directory.mt_fs element can be |
… |
… |
|
603 | 603 | The is intended to contain a string that identifies the device that contains |
604 | 604 | the filesystem information. The filesystems that are currently implemented |
605 | | are memory based and donât require a device specification. |
| 605 | are memory based and don't require a device specification. |
606 | 606 | |
607 | 607 | If the mt_point_node.node_access is NULL then we are mounting the base file |
… |
… |
|
614 | 614 | others. |
615 | 615 | |
616 | | The nodeâs name will be a null string. |
| 616 | The node's name will be a null string. |
617 | 617 | |
618 | 618 | A filesystem information structure(fs_info) will be allocated and |
… |
… |
|
659 | 659 | |
660 | 660 | The mount entry mount point node access is verified to be a mounted |
661 | | directory. Itâs mt_fs is set to NULL. This identifies to future |
| 661 | directory. It's mt_fs is set to NULL. This identifies to future |
662 | 662 | calles into the IMFS that this directory node is no longer a mount |
663 | 663 | point. Additionally, it will allow any directories that were hidden |
… |
… |
|
742 | 742 | Handler table functions are defined in a rtems_filesystem_file_handlers_r |
743 | 743 | structure. It defines functions that are specific to a node type in a given |
744 | | filesystem. One table exists for each of the filesystemâs node types. The |
| 744 | filesystem. One table exists for each of the filesystem's node types. The |
745 | 745 | structure definition appears below. It is followed by general developmental |
746 | 746 | information on each of the functions associated with regular files contained |
… |
… |
|
1115 | 1115 | Handler table functions are defined in a rtems_filesystem_file_handlers_r |
1116 | 1116 | structure. It defines functions that are specific to a node type in a given |
1117 | | filesystem. One table exists for each of the filesystemâs node types. The |
| 1117 | filesystem. One table exists for each of the filesystem's node types. The |
1118 | 1118 | structure definition appears below. It is followed by general developmental |
1119 | 1119 | information on each of the functions associated with directories contained in |
… |
… |
|
1468 | 1468 | Handler table functions are defined in a rtems_filesystem_file_handlers_r |
1469 | 1469 | structure. It defines functions that are specific to a node type in a given |
1470 | | filesystem. One table exists for each of the filesystemâs node types. The |
| 1470 | filesystem. One table exists for each of the filesystem's node types. The |
1471 | 1471 | structure definition appears below. It is followed by general developmental |
1472 | 1472 | information on each of the functions associated with devices contained in |
-
r11e1a6f
|
rd389819
|
|
3 | 3 | ============================= |
4 | 4 | |
5 | | COPYRIGHT © 1988 - 2015. |
| 5 | COPYRIGHT (c) 1988 - 2015. |
6 | 6 | |
7 | 7 | On-Line Applications Research Corporation (OAR). |
-
r11e1a6f
|
rd389819
|
|
67 | 67 | This element is filesystem specific. A filesystem can define and store |
68 | 68 | any information necessary to identify a node at this location. This element |
69 | | is normally filled in by the filesystemâs evaluate routine. For the |
70 | | filesystemâs root node, the filesystemâs initilization routine should |
| 69 | is normally filled in by the filesystem's evaluate routine. For the |
| 70 | filesystem's root node, the filesystem's initilization routine should |
71 | 71 | fill this in, and it should remain valid until the instance of the |
72 | 72 | filesystem is unmounted. |
-
r11e1a6f
|
rd389819
|
|
2 | 2 | ##################### |
3 | 3 | |
4 | | After the RTEMS initialization is performed, the applicationâs |
| 4 | After the RTEMS initialization is performed, the application's |
5 | 5 | initialization will be performed. Part of initialization is a call to |
6 | | rtems_filesystem_initialize(). This routine will mount the âIn Memory File |
7 | | Systemâ as the base filesystem. Mounting the base filesystem consists |
| 6 | rtems_filesystem_initialize(). This routine will mount the 'In Memory File |
| 7 | System' as the base filesystem. Mounting the base filesystem consists |
8 | 8 | of the following: |
9 | 9 | |
… |
… |
|
11 | 11 | |
12 | 12 | - Allocation of a ``jnode`` structure that will server as the root node |
13 | | of the âIn Memory Filesystemâ |
| 13 | of the 'In Memory Filesystem' |
14 | 14 | |
15 | 15 | - Initialization of the allocated ``jnode`` with the appropriate OPS, |
… |
… |
|
37 | 37 | RTEMS initially mounts a RAM based file system known as the base file system. |
38 | 38 | The root directory of this file system tree serves as the logical root of the |
39 | | directory hierarchy (Figure 3). Under the root directory a â/devâ directory |
| 39 | directory hierarchy (Figure 3). Under the root directory a '/dev' directory |
40 | 40 | is created under which all I/O device directories and files are registered as |
41 | 41 | part of the file system hierarchy. |
… |
… |
|
62 | 62 | ------------------------ |
63 | 63 | |
64 | | At present, the first file system to be mounted is the âIn Memory File |
65 | | Systemâ. It is mounted using a standard MOUNT() command in which the mount |
| 64 | At present, the first file system to be mounted is the 'In Memory File |
| 65 | System'. It is mounted using a standard MOUNT() command in which the mount |
66 | 66 | point is NULL. This flags the mount as the first file system to be |
67 | 67 | registered under the operating system and appropriate initialization of file |
… |
… |
|
82 | 82 | minor device number. In addition, the configuration information for each |
83 | 83 | device contains a text string that represents the fully qualified pathname to |
84 | | that deviceâs place in the base file systemâs hierarchy. A file system node |
| 84 | that device's place in the base file system's hierarchy. A file system node |
85 | 85 | is created for the device along the specified registration path. |
86 | 86 | |
-
r11e1a6f
|
rd389819
|
|
47 | 47 | The board we have chosen for our PC386 implementation is a D-Link DFE-500TX. |
48 | 48 | This is a dual-speed 10/100Mbps Ethernet PCI adapter with a DEC21140AF chip. |
49 | | Like other PCI devices, this board has a PCI deviceâs header containing some |
| 49 | Like other PCI devices, this board has a PCI device's header containing some |
50 | 50 | required configuration registers, as shown in the PCI Register Figure. |
51 | 51 | By reading |
… |
… |
|
133 | 133 | |
134 | 134 | This thread is event driven. Each time a DEC PCI board interrupt occurs, the |
135 | | handler checks if this is a receive interrupt and send an event âreceptionâ |
| 135 | handler checks if this is a receive interrupt and send an event "reception" |
136 | 136 | to the receiver thread which looks into the entire buffer descriptors ring the |
137 | 137 | ones that contain a valid incoming frame (bit OWN=0 means descriptor belongs |
-
r11e1a6f
|
rd389819
|
|
2 | 2 | RTEMS Network Supplement |
3 | 3 | ======================== |
4 | | COPYRIGHT © 1988 - 2015. |
| 4 | COPYRIGHT (c) 1988 - 2015. |
5 | 5 | |
6 | 6 | On-Line Applications Research Corporation (OAR). |
-
r11e1a6f
|
rd389819
|
|
7 | 7 | The RTEMS FTPD is a complete file transfer protocol (FTP) daemon |
8 | 8 | which can store, retrieve, and manipulate files on the local |
9 | | filesystem. In addition, the RTEMS FTPD provides âhooksâ |
| 9 | filesystem. In addition, the RTEMS FTPD provides "hooks" |
10 | 10 | which are actions performed on received data. Hooks are useful |
11 | 11 | in situations where a destination file is not necessarily |
-
r11e1a6f
|
rd389819
|
|
24 | 24 | aging and removing routing table entries. |
25 | 25 | |
26 | | The âNetwork codeâ contains routines which may run in the context of |
| 26 | The 'Network code' contains routines which may run in the context of |
27 | 27 | the user application tasks, the interface receive task or the network task. |
28 | 28 | A network semaphore ensures that |
-
r11e1a6f
|
rd389819
|
|
7 | 7 | This chapter is intended to provide an introduction to the |
8 | 8 | procedure for writing RTEMS network device drivers. |
9 | | The example code is taken from the âGeneric 68360â network device |
| 9 | The example code is taken from the 'Generic 68360' network device |
10 | 10 | driver. The source code for this driver is located in the``c/src/lib/libbsp/m68k/gen68360/network`` directory in the RTEMS |
11 | 11 | source code distribution. Having a copy of this driver at |
… |
… |
|
16 | 16 | |
17 | 17 | Before starting to write the network driver become completely |
18 | | familiar with the programmerâs view of the device. |
| 18 | familiar with the programmer's view of the device. |
19 | 19 | The following points list some of the details of the |
20 | 20 | device that must be understood before a driver can be written. |
… |
… |
|
71 | 71 | execute only when they hold the network semaphore (``rtems_bsdnet_semaphore``). |
72 | 72 | The transmit and receive tasks must abide by this protocol. Be very |
73 | | careful to avoid âdeadly embracesâ with the other network tasks. |
| 73 | careful to avoid 'deadly embraces' with the other network tasks. |
74 | 74 | A number of routines are provided to make it easier for the network |
75 | 75 | driver code to conform to the network task scheduling conventions. |
… |
… |
|
161 | 161 | ``ifp->if_unit`` |
162 | 162 | The device number. The network stack uses this number and the |
163 | | device name for device name lookups. For example, if``ifp->if_name`` is â``scc``â and ``ifp->if_unit`` is â``1``â, |
164 | | the full device name would be â``scc1``â. The unit number should be |
165 | | obtained from the ânameâ entry in the configuration structure. |
| 163 | device name for device name lookups. For example, if``ifp->if_name`` is '``scc``' and ``ifp->if_unit`` is '``1``', |
| 164 | the full device name would be '``scc1``'. The unit number should be |
| 165 | obtained from the 'name' entry in the configuration structure. |
166 | 166 | |
167 | 167 | ``ifp->if_mtu`` |
… |
… |
|
212 | 212 | calling ``if_attach``. Ethernet devices should then |
213 | 213 | call ``ether_ifattach``. Both functions take a pointer to the |
214 | | deviceâs ``ifnet`` structure as their only argument. |
| 214 | device's ``ifnet`` structure as their only argument. |
215 | 215 | |
216 | 216 | The attach function should return a non-zero value to indicate that |
… |
… |
|
222 | 222 | This function is called each time the network stack wants to start the |
223 | 223 | transmitter. This occures whenever the network stack adds a packet |
224 | | to a deviceâs send queue and the ``IFF_OACTIVE`` bit in the |
225 | | deviceâs ``if_flags`` is not set. |
| 224 | to a device's send queue and the ``IFF_OACTIVE`` bit in the |
| 225 | device's ``if_flags`` is not set. |
226 | 226 | |
227 | 227 | For many devices this function need only set the ``IFF_OACTIVE`` bit in the``if_flags`` and send an event to the transmit task |
-
r11e1a6f
|
rd389819
|
|
12 | 12 | to understand Ethernet: |
13 | 13 | |
14 | | - *Charles Spurgeonâs Ethernet Web Site* |
| 14 | - *Charles Spurgeon's Ethernet Web Site* |
15 | 15 | "This site provides extensive information about Ethernet |
16 | 16 | (IEEE 802.3) local area network (LAN) technology. Including |
-
r11e1a6f
|
rd389819
|
|
12 | 12 | |
13 | 13 | - An Ethernet network analyzer or a workstation with an |
14 | | âEthernet snoopâ program such as ``ethersnoop`` or``tcpdump``. |
| 14 | 'Ethernet snoop' program such as ``ethersnoop`` or``tcpdump``. |
15 | 15 | |
16 | 16 | - A workstation. |
… |
… |
|
40 | 40 | - mbuf activity |
41 | 41 | There are commented out calls to ``printf`` in the file``sys/mbuf.h`` in the network stack code. Uncommenting |
42 | | these lines results in output when mbufâs are allocated |
| 42 | these lines results in output when mbuf's are allocated |
43 | 43 | and freed. This is very useful for finding memory leaks. |
44 | 44 | |
… |
… |
|
92 | 92 | For a quick reference to the flags, see the table below: |
93 | 93 | |
94 | | â``U``â |
| 94 | '``U``' |
95 | 95 | Up: The route is active. |
96 | 96 | |
97 | | â``H``â |
| 97 | '``H``' |
98 | 98 | Host: The route destination is a single host. |
99 | 99 | |
100 | | â``G``â |
| 100 | '``G``' |
101 | 101 | Gateway: Send anything for this destination on to this remote system, which |
102 | 102 | will figure out from there where to send it. |
103 | 103 | |
104 | | â``S``â |
| 104 | '``S``' |
105 | 105 | Static: This route was configured manually, not automatically generated by the |
106 | 106 | system. |
107 | 107 | |
108 | | â``C``â |
| 108 | '``C``' |
109 | 109 | Clone: Generates a new route based upon this route for machines we connect |
110 | 110 | to. This type of route is normally used for local networks. |
111 | 111 | |
112 | | â``W``â |
| 112 | '``W``' |
113 | 113 | WasCloned: Indicated a route that was auto-configured based upon a local area |
114 | 114 | network (Clone) route. |
115 | 115 | |
116 | | â``L``â |
| 116 | '``L``' |
117 | 117 | Link: Route involves references to Ethernet hardware. |
118 | 118 | |
… |
… |
|
183 | 183 | Verify that the program continues to run once the driver has been attached. |
184 | 184 | |
185 | | - Issue a â``u``â command to send UDP |
186 | | packets to the âdiscardâ port. |
| 185 | - Issue a '``u``' command to send UDP |
| 186 | packets to the 'discard' port. |
187 | 187 | Verify that the packets appear on the network. |
188 | 188 | |
189 | | - Issue a â``s``â command to print the network and driver statistics. |
| 189 | - Issue a '``s``' command to print the network and driver statistics. |
190 | 190 | |
191 | 191 | - On a workstation, add a static route to the target system. |
192 | 192 | |
193 | | - On that same workstation try to âpingâ the target system. |
| 193 | - On that same workstation try to 'ping' the target system. |
194 | 194 | Verify that the ICMP echo request and reply packets appear on the net. |
195 | 195 | |
… |
… |
|
197 | 197 | Modify ``networkconfig.h`` to attach the driver |
198 | 198 | with reception of broadcast packets enabled. |
199 | | Try to âpingâ the target system again. |
| 199 | Try to 'ping' the target system again. |
200 | 200 | Verify that ARP request/reply and ICMP echo request/reply packets appear |
201 | 201 | on the net. |
202 | 202 | |
203 | | - Issue a â``t``â command to send TCP |
204 | | packets to the âdiscardâ port. |
| 203 | - Issue a '``t``' command to send TCP |
| 204 | packets to the 'discard' port. |
205 | 205 | Verify that the packets appear on the network. |
206 | 206 | |
207 | | - Issue a â``s``â command to print the network and driver statistics. |
| 207 | - Issue a '``s``' command to print the network and driver statistics. |
208 | 208 | |
209 | 209 | - Verify that you can telnet to ports 24742 |
… |
… |
|
233 | 233 | a smaller value, say 514. |
234 | 234 | |
235 | | - âPingâ the driver from another workstation and verify |
| 235 | - 'Ping' the driver from another workstation and verify |
236 | 236 | that frames larger than 514 bytes are correctly rejected. |
237 | 237 | |
… |
… |
|
249 | 249 | still telnet to both the ports. |
250 | 250 | |
251 | | - Display the driver statistics (Console â``s``â command or telnet |
252 | | âcontrol-Gâ character) and verify that: |
| 251 | - Display the driver statistics (Console '``s``' command or telnet |
| 252 | 'control-G' character) and verify that: |
253 | 253 | |
254 | 254 | # The number of transmit interrupts is non-zero. |
… |
… |
|
263 | 263 | - Run the ``netdemo`` program. |
264 | 264 | |
265 | | - Issue a â``u``â console command to make the target machine transmit |
| 265 | - Issue a '``u``' console command to make the target machine transmit |
266 | 266 | a bunch of UDP packets. |
267 | 267 | |
… |
… |
|
278 | 278 | |
279 | 279 | Run the ``ttcp`` network benchmark program. |
280 | | Transfer large amounts of data (100âs of megabytes) to and from the target |
| 280 | Transfer large amounts of data (100's of megabytes) to and from the target |
281 | 281 | system. |
282 | 282 | |
-
r11e1a6f
|
rd389819
|
|
127 | 127 | standard files created with the information return by the BOOTP/DHCP |
128 | 128 | protocol. The IP address is added to :file:`/etc/hosts` with the host |
129 | | name and domain returned. If no host name or domain is returned``me.mydomain`` is used. The BOOTP/DHCP serverâs address is also |
| 129 | name and domain returned. If no host name or domain is returned``me.mydomain`` is used. The BOOTP/DHCP server's address is also |
130 | 130 | added to :file:`/etc/hosts`. The domain name server listed in the |
131 | 131 | BOOTP/DHCP information are added to :file:`/etc/resolv.conf`. A``search`` record is also added if a domain is returned. The files |
… |
… |
|
163 | 163 | ``char \*gateway`` |
164 | 164 | The Internet host number of the network gateway machine, |
165 | | specified in âdotted decimalâ (``129.128.4.1``) form. |
| 165 | specified in 'dotted decimal' (``129.128.4.1``) form. |
166 | 166 | |
167 | 167 | ``char \*log_host`` |
… |
… |
|
280 | 280 | ``char \*ip_address`` |
281 | 281 | The Internet address of the device, |
282 | | specified in âdotted decimalâ (``129.128.4.2``) form, or ``NULL`` |
| 282 | specified in 'dotted decimal' (``129.128.4.2``) form, or ``NULL`` |
283 | 283 | if the device configuration information is being obtained from a |
284 | 284 | BOOTP/DHCP server. |
… |
… |
|
286 | 286 | ``char \*ip_netmask`` |
287 | 287 | The Internet inetwork mask of the device, |
288 | | specified in âdotted decimalâ (``255.255.255.0``) form, or ``NULL`` |
| 288 | specified in 'dotted decimal' (``255.255.255.0``) form, or ``NULL`` |
289 | 289 | if the device configuration information is being obtained from a |
290 | 290 | BOOTP/DHCP server. |
… |
… |
|
497 | 497 | For sending, when the socket is connected and the free space becomes at |
498 | 498 | or above the "low water mark" for the send buffer (default 4096 bytes) |
499 | | you will receive a writable callback. You donât get continuous callbacks |
500 | | if you donât write anything. Using a non-blocking write socket, you can |
| 499 | you will receive a writable callback. You don't get continuous callbacks |
| 500 | if you don't write anything. Using a non-blocking write socket, you can |
501 | 501 | then call write until it returns a value less than the amount of data |
502 | 502 | requested to be sent or it produces error EWOULDBLOCK (indicating buffer |
… |
… |
|
838 | 838 | If the interval argument is greater than 0, the routine also starts an |
839 | 839 | RTEMS task at the specified priority and polls the NTP server every |
840 | | âintervalâ seconds. NOTE: This mode of operation has not yet been |
| 840 | 'interval' seconds. NOTE: This mode of operation has not yet been |
841 | 841 | implemented. |
842 | 842 | |
… |
… |
|
844 | 844 | returns 0. If an error occurs a message is printed and the routine returns -1 |
845 | 845 | with an error code in errno. |
846 | | There is no timeout â if there is no response from an NTP server the |
| 846 | There is no timeout - if there is no response from an NTP server the |
847 | 847 | routine will wait forever. |
848 | 848 | |
-
r11e1a6f
|
rd389819
|
|
88 | 88 | ---------------------- |
89 | 89 | |
90 | | The CPU_ALIGNMENT macro should be set to the CPUâs worst alignment |
| 90 | The CPU_ALIGNMENT macro should be set to the CPU's worst alignment |
91 | 91 | requirement for data types on a byte boundary. This is typically the |
92 | 92 | alignment requirement for a C double. This alignment does not take into |
-
r11e1a6f
|
rd389819
|
|
39 | 39 | context. If there is not an easy way to initialize the FP context during |
40 | 40 | Context_Initialize, then it is usually easier to save an "uninitialized" |
41 | | FP context here and copy it to the taskâs during Context_Initialize. If |
| 41 | FP context here and copy it to the task's during Context_Initialize. If |
42 | 42 | this technique is used to initialize the FP contexts, then it is important |
43 | 43 | to ensure that the state of the floating point unit is in a coherent, |
-
r11e1a6f
|
rd389819
|
|
106 | 106 | Each of these boards is optimized for a particular project. The processor |
107 | 107 | and peripheral set have been chosen to meet a particular set of system |
108 | | requirements. The tools in the embedded systems developers toolbox must |
109 | | support their projectÂs unique board. RTEMS addresses this issue via the |
| 108 | requirements. The tools in the embedded systems developers toolbox must |
| 109 | support their project's unique board. RTEMS addresses this issue via the |
110 | 110 | Board Support Package. |
111 | 111 | |
-
r11e1a6f
|
rd389819
|
|
87 | 87 | |
88 | 88 | If the CPU dependent IDLE thread body is implementation centers upon using |
89 | | a "halt", "idle", or "shutdown" instruction, then donât forget to put it |
| 89 | a "halt", "idle", or "shutdown" instruction, then don't forget to put it |
90 | 90 | in an infinite loop as the CPU will have to reexecute this instruction |
91 | 91 | each time the IDLE thread is dispatched. |
-
r11e1a6f
|
rd389819
|
|
2 | 2 | RTEMS Porting Guide |
3 | 3 | =================== |
4 | | COPYRIGHT © 1988 - 2015. |
| 4 | COPYRIGHT (c) 1988 - 2015. |
5 | 5 | |
6 | 6 | On-Line Applications Research Corporation (OAR). |
-
r11e1a6f
|
rd389819
|
|
306 | 306 | This discussion ignores a lot of the ugly details in a real implementation |
307 | 307 | such as saving enough registers/state to be able to do something real. |
308 | | Keep in mind that the goal is to invoke a userâs ISR handler which is |
| 308 | Keep in mind that the goal is to invoke a user's ISR handler which is |
309 | 309 | written in C. That ISR handler uses a known set of registers thus |
310 | 310 | allowing the ISR to preserve only those that would normally be corrupted |
… |
… |
|
369 | 369 | ------------------------------ |
370 | 370 | |
371 | | Does the RTEMS invoke the userâs ISR with the vector number and a pointer |
| 371 | Does the RTEMS invoke the user's ISR with the vector number and a pointer |
372 | 372 | to the saved interrupt frame (1) or just the vector number (0)? |
373 | 373 | .. code:: c |
-
r11e1a6f
|
rd389819
|
|
6 | 6 | |
7 | 7 | The ``_CPU_Fatal_halt`` routine is the default fatal error handler. This |
8 | | routine copies _error into a known place â typically a stack location or |
| 8 | routine copies _error into a known place - typically a stack location or |
9 | 9 | a register, optionally disables interrupts, and halts/stops the CPU. It |
10 | 10 | is prototyped as follows and is often implemented as a macro: |
… |
… |
|
101 | 101 | would probably have to be disabled to insure that an interrupt does not |
102 | 102 | try to access the same "chunk" with the wrong endian. Another good reason |
103 | | is that on some CPUs, the endian bit endianness for ALL fetches â both |
104 | | code and data â so the code will be fetched incorrectly. |
| 103 | is that on some CPUs, the endian bit endianness for ALL fetches - both |
| 104 | code and data - so the code will be fetched incorrectly. |
105 | 105 | |
106 | 106 | The following is an implementation of the ``CPU_swap_u32`` routine that will |
… |
… |
|
143 | 143 | would probably have to be disabled to insure that an interrupt does not |
144 | 144 | try to access the same "chunk" with the wrong endian. Another good reason |
145 | | is that on some CPUs, the endian bit endianness for ALL fetches â both |
146 | | code and data â so the code will be fetched incorrectly. |
| 145 | is that on some CPUs, the endian bit endianness for ALL fetches - both |
| 146 | code and data - so the code will be fetched incorrectly. |
147 | 147 | |
148 | 148 | Similarly, here is a portable implementation of the ``CPU_swap_u16`` |
-
r11e1a6f
|
rd389819
|
|
86 | 86 | manner in which a priority is broken into a major and minor components |
87 | 87 | with the major being the 4 MSB of a priority and minor the 4 LSB. Thus (0 |
88 | | << 4) + 0 corresponds to priority 0 â the highest priority. And (15 << |
89 | | 4) + 14 corresponds to priority 254 â the next to the lowest priority. |
| 88 | << 4) + 0 corresponds to priority 0 - the highest priority. And (15 << |
| 89 | 4) + 14 corresponds to priority 254 - the next to the lowest priority. |
90 | 90 | |
91 | 91 | If your CPU does not have a "find first bit" instruction, then there are |
… |
… |
|
95 | 95 | - a series of 16 bit test instructions |
96 | 96 | |
97 | | - a "binary search using ifâs" |
| 97 | - a "binary search using if's" |
98 | 98 | |
99 | 99 | - the following algorithm based upon a 16 entry lookup table. In this pseudo-code, bit_set_table[16] has values which indicate the first bit set: |
-
r11e1a6f
|
rd389819
|
|
201 | 201 | registers assumed to be preserved across subroutine calls |
202 | 202 | must be preserved. These registers may be saved in |
203 | | the taskâs context area or on its stack. However, the |
| 203 | the task's context area or on its stack. However, the |
204 | 204 | stack pointer and address to resume executing the task |
205 | 205 | at must be included in the context (normally the subroutine |
206 | 206 | return address to the caller of ``_Thread_Dispatch``. |
207 | | The decision of where to store the taskâs context is based |
| 207 | The decision of where to store the task's context is based |
208 | 208 | on numerous factors including the capabilities of |
209 | 209 | the CPU architecture itself and simplicity as well |
210 | 210 | as external considerations such as debuggers wishing |
211 | | to examine a taskâs context. In this case, it is |
| 211 | to examine a task's context. In this case, it is |
212 | 212 | often simpler to save all data in the context area. |
213 | 213 | |
… |
… |
|
293 | 293 | indicates whether or not this CPU model has FP support. For example, the |
294 | 294 | definition of the i386ex and i386sx CPU models would set I386_HAS_FPU to |
295 | | FALSE to indicate that these CPU models are i386âs without an i387 and |
| 295 | FALSE to indicate that these CPU models are i386's without an i387 and |
296 | 296 | wish to leave floating point support out of RTEMS when built for the |
297 | 297 | i386_nofp processor model. On a CPU with a built-in FPU like the i486, |
… |
… |
|
400 | 400 | format is not critical for the implementation of the floating point |
401 | 401 | context switch routines. In this case, there is no need to figure out the |
402 | | exact format â only the size. Of course, although this is enough |
| 402 | exact format - only the size. Of course, although this is enough |
403 | 403 | information for RTEMS, it is probably not enough for a debugger such as |
404 | 404 | gdb. But that is another problem. |
… |
… |
|
417 | 417 | The CPU_CONTEXT_FP_SIZE macro is set to the size of the floating point |
418 | 418 | context area. On some CPUs this will not be a "sizeof" because the format |
419 | | of the floating point area is not defined â only the size is. This is |
| 419 | of the floating point area is not defined - only the size is. This is |
420 | 420 | usually on CPUs with a "floating point save context" instruction. In |
421 | 421 | general, though it is easier to define the structure as a "sizeof" |
-
r11e1a6f
|
rd389819
|
|
244 | 244 | NOTE: The newlib unistd.h and sys/unistd.h are installed and the |
245 | 245 | include search patch is used to get the right one. There are |
246 | | conflicts between the newlib unistd.h and RTEMSâ version. |
| 246 | conflicts between the newlib unistd.h and RTEMS' version. |
247 | 247 | |
248 | 248 | .. COMMENT: COPYRIGHT (c) 1988-2002. |
-
r11e1a6f
|
rd389819
|
|
3 | 3 | =================================== |
4 | 4 | |
5 | | COPYRIGHT © 1988 - 2015. |
| 5 | COPYRIGHT (c) 1988 - 2015. |
6 | 6 | |
7 | 7 | On-Line Applications Research Corporation (OAR). |
-
r11e1a6f
|
rd389819
|
|
5 | 5 | ============================== |
6 | 6 | |
7 | | ANSI C Section 4.2 â Diagnostics |
| 7 | ANSI C Section 4.2 - Diagnostics |
8 | 8 | .. code:: c |
9 | 9 | |
10 | 10 | assert(), Function, Implemented |
11 | 11 | |
12 | | ANSI C Section 4.3 â Character Handling |
| 12 | ANSI C Section 4.3 - Character Handling |
13 | 13 | .. code:: c |
14 | 14 | |
… |
… |
|
27 | 27 | toupper(), Function, Implemented |
28 | 28 | |
29 | | ANSI C Section 4.4 â Localization |
| 29 | ANSI C Section 4.4 - Localization |
30 | 30 | .. code:: c |
31 | 31 | |
32 | 32 | setlocale(), Function, Implemented |
33 | 33 | |
34 | | ANSI C Section 4.5 â Mathematics |
| 34 | ANSI C Section 4.5 - Mathematics |
35 | 35 | .. code:: c |
36 | 36 | |
… |
… |
|
58 | 58 | fmod(), Function, Implemented |
59 | 59 | |
60 | | ANSI C Section 4.6 â Non-Local Jumps |
| 60 | ANSI C Section 4.6 - Non-Local Jumps |
61 | 61 | .. code:: c |
62 | 62 | |
… |
… |
|
64 | 64 | longjmp(), Function, Implemented |
65 | 65 | |
66 | | ANSI C Section 4.9 â Input/Output |
| 66 | ANSI C Section 4.9 - Input/Output |
67 | 67 | .. code:: c |
68 | 68 | |
… |
… |
|
106 | 106 | NOTE: ``rename`` is also included in another section. `Rename a File`_. |
107 | 107 | |
108 | | ANSI C Section 4.10 â General Utilities |
| 108 | ANSI C Section 4.10 - General Utilities |
109 | 109 | .. code:: c |
110 | 110 | |
… |
… |
|
126 | 126 | NOTE: ``getenv`` is also included in another section. `Environment Access`_. |
127 | 127 | |
128 | | ANSI C Section 4.11 â String Handling |
| 128 | ANSI C Section 4.11 - String Handling |
129 | 129 | .. code:: c |
130 | 130 | |
… |
… |
|
144 | 144 | strlen(), Function, Implemented |
145 | 145 | |
146 | | ANSI C Section 4.12 â Date and Time Handling |
| 146 | ANSI C Section 4.12 - Date and Time Handling |
147 | 147 | .. code:: c |
148 | 148 | |
-
r11e1a6f
|
rd389819
|
|
59 | 59 | .. COMMENT: can force the copyright description onto a left hand page. |
60 | 60 | |
61 | | COPYRIGHT © 1988 - 2015. |
| 61 | COPYRIGHT (c) 1988 - 2015. |
62 | 62 | |
63 | 63 | On-Line Applications Research Corporation (OAR). |
… |
… |
|
294 | 294 | USHRT_MAX, Constant, Implemented |
295 | 295 | |
296 | | NOTE: These are implemented in GCCâs limits.h file. |
| 296 | NOTE: These are implemented in GCC's limits.h file. |
297 | 297 | |
298 | 298 | Minimum Values |
… |
… |
|
1139 | 1139 | NOTE: The newlib unistd.h and sys/unistd.h are installed and the |
1140 | 1140 | include search patch is used to get the right one. There are |
1141 | | conflicts between the newlib unistd.h and RTEMSâ version. |
| 1141 | conflicts between the newlib unistd.h and RTEMS' version. |
1142 | 1142 | |
1143 | 1143 | .. COMMENT: COPYRIGHT (c) 1988-2002. |
… |
… |
|
1581 | 1581 | ============================== |
1582 | 1582 | |
1583 | | ANSI C Section 4.2 â Diagnostics |
| 1583 | ANSI C Section 4.2 - Diagnostics |
1584 | 1584 | .. code:: c |
1585 | 1585 | |
1586 | 1586 | assert(), Function, Implemented |
1587 | 1587 | |
1588 | | ANSI C Section 4.3 â Character Handling |
| 1588 | ANSI C Section 4.3 - Character Handling |
1589 | 1589 | .. code:: c |
1590 | 1590 | |
… |
… |
|
1603 | 1603 | toupper(), Function, Implemented |
1604 | 1604 | |
1605 | | ANSI C Section 4.4 â Localization |
| 1605 | ANSI C Section 4.4 - Localization |
1606 | 1606 | .. code:: c |
1607 | 1607 | |
1608 | 1608 | setlocale(), Function, Implemented |
1609 | 1609 | |
1610 | | ANSI C Section 4.5 â Mathematics |
| 1610 | ANSI C Section 4.5 - Mathematics |
1611 | 1611 | .. code:: c |
1612 | 1612 | |
… |
… |
|
1634 | 1634 | fmod(), Function, Implemented |
1635 | 1635 | |
1636 | | ANSI C Section 4.6 â Non-Local Jumps |
| 1636 | ANSI C Section 4.6 - Non-Local Jumps |
1637 | 1637 | .. code:: c |
1638 | 1638 | |
… |
… |
|
1640 | 1640 | longjmp(), Function, Implemented |
1641 | 1641 | |
1642 | | ANSI C Section 4.9 â Input/Output |
| 1642 | ANSI C Section 4.9 - Input/Output |
1643 | 1643 | .. code:: c |
1644 | 1644 | |
… |
… |
|
1682 | 1682 | NOTE: ``rename`` is also included in another section. `Rename a File`_. |
1683 | 1683 | |
1684 | | ANSI C Section 4.10 â General Utilities |
| 1684 | ANSI C Section 4.10 - General Utilities |
1685 | 1685 | .. code:: c |
1686 | 1686 | |
… |
… |
|
1702 | 1702 | NOTE: ``getenv`` is also included in another section. `Environment Access`_. |
1703 | 1703 | |
1704 | | ANSI C Section 4.11 â String Handling |
| 1704 | ANSI C Section 4.11 - String Handling |
1705 | 1705 | .. code:: c |
1706 | 1706 | |
… |
… |
|
1720 | 1720 | strlen(), Function, Implemented |
1721 | 1721 | |
1722 | | ANSI C Section 4.12 â Date and Time Handling |
| 1722 | ANSI C Section 4.12 - Date and Time Handling |
1723 | 1723 | .. code:: c |
1724 | 1724 | |
-
r11e1a6f
|
rd389819
|
|
132 | 132 | USHRT_MAX, Constant, Implemented |
133 | 133 | |
134 | | NOTE: These are implemented in GCCâs limits.h file. |
| 134 | NOTE: These are implemented in GCC's limits.h file. |
135 | 135 | |
136 | 136 | Minimum Values |
-
r11e1a6f
|
rd389819
|
|
42 | 42 | ========== |
43 | 43 | |
44 | | This section details the clock managerâs directives. |
45 | | A subsection is dedicated to each of this managerâs directives |
| 44 | This section details the clock manager's directives. |
| 45 | A subsection is dedicated to each of this manager's directives |
46 | 46 | and describes the calling sequence, related constants, usage, |
47 | 47 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
42 | 42 | ========== |
43 | 43 | |
44 | | This section details the condition variable managerâs directives. |
45 | | A subsection is dedicated to each of this managerâs directives |
| 44 | This section details the condition variable manager's directives. |
| 45 | A subsection is dedicated to each of this manager's directives |
46 | 46 | and describes the calling sequence, related constants, usage, |
47 | 47 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
47 | 47 | ========== |
48 | 48 | |
49 | | This section details the device- and class- specific functions managerâs |
50 | | directives. A subsection is dedicated to each of this managerâs directives |
| 49 | This section details the device- and class- specific functions manager's |
| 50 | directives. A subsection is dedicated to each of this manager's directives |
51 | 51 | and describes the calling sequence, related constants, usage, |
52 | 52 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
104 | 104 | ========== |
105 | 105 | |
106 | | This section details the files and directories managerâs directives. |
107 | | A subsection is dedicated to each of this managerâs directives |
| 106 | This section details the files and directories manager's directives. |
| 107 | A subsection is dedicated to each of this manager's directives |
108 | 108 | and describes the calling sequence, related constants, usage, |
109 | 109 | and status codes. |
… |
… |
|
343 | 343 | |
344 | 344 | *EACCES* |
345 | | Search permission is denied for a directory in a fileâs path prefix. |
| 345 | Search permission is denied for a directory in a file's path prefix. |
346 | 346 | |
347 | 347 | *ENAMETOOLONG* |
… |
… |
|
389 | 389 | |
390 | 390 | *EACCES* |
391 | | Search permission is denied for a directory in a fileâs path prefix. |
| 391 | Search permission is denied for a directory in a file's path prefix. |
392 | 392 | |
393 | 393 | *ENAMETOOLONG* |
… |
… |
|
436 | 436 | |
437 | 437 | *EACCES* |
438 | | Search permission is denied for a directory in a fileâs path prefix. |
| 438 | Search permission is denied for a directory in a file's path prefix. |
439 | 439 | |
440 | 440 | **DESCRIPTION:** |
… |
… |
|
476 | 476 | |
477 | 477 | *EACCES* |
478 | | Search permission is denied for a directory in a fileâs path prefix. |
| 478 | Search permission is denied for a directory in a file's path prefix. |
479 | 479 | |
480 | 480 | *EEXIST* |
… |
… |
|
696 | 696 | |
697 | 697 | *EACCES* |
698 | | Search permission is denied for a directory in a fileâs path prefix |
| 698 | Search permission is denied for a directory in a file's path prefix |
699 | 699 | |
700 | 700 | *EEXIST* |
… |
… |
|
761 | 761 | |
762 | 762 | *EACCES* |
763 | | Search permission is denied for a directory in a fileâs path prefix |
| 763 | Search permission is denied for a directory in a file's path prefix |
764 | 764 | |
765 | 765 | *EEXIST* |
… |
… |
|
819 | 819 | |
820 | 820 | *EACCES* |
821 | | Search permission is denied for a directory in a fileâs path prefix |
| 821 | Search permission is denied for a directory in a file's path prefix |
822 | 822 | |
823 | 823 | *ENAMETOOLONG* |
… |
… |
|
871 | 871 | |
872 | 872 | *EACCES* |
873 | | Search permission is denied for a directory in a fileâs path prefix |
| 873 | Search permission is denied for a directory in a file's path prefix |
874 | 874 | |
875 | 875 | *EEXIST* |
… |
… |
|
929 | 929 | |
930 | 930 | *EACCES* |
931 | | Search permission is denied for a directory in a fileâs path prefix |
| 931 | Search permission is denied for a directory in a file's path prefix |
932 | 932 | |
933 | 933 | *EEXIST* |
… |
… |
|
974 | 974 | |
975 | 975 | *EACCES* |
976 | | Search permission is denied for a directory in a fileâs path prefix |
| 976 | Search permission is denied for a directory in a file's path prefix |
977 | 977 | |
978 | 978 | *EBUSY* |
… |
… |
|
1033 | 1033 | *EACCES* |
1034 | 1034 | Write access to the directory containing ``pathname`` was not |
1035 | | allowed for the processâs effective uid, or one of the directories in``pathname`` did not allow search (execute) permission. |
| 1035 | allowed for the process's effective uid, or one of the directories in``pathname`` did not allow search (execute) permission. |
1036 | 1036 | |
1037 | 1037 | *EPERM* |
1038 | 1038 | The directory containing ``pathname`` has the stickybit (S_ISVTX) |
1039 | | set and the processâs effective uid is neither the uid of the file to |
| 1039 | set and the process's effective uid is neither the uid of the file to |
1040 | 1040 | be delected nor that of the director containing it. |
1041 | 1041 | |
… |
… |
|
1097 | 1097 | |
1098 | 1098 | *EACCES* |
1099 | | Search permission is denied for a directory in a fileâs path prefix. |
| 1099 | Search permission is denied for a directory in a file's path prefix. |
1100 | 1100 | |
1101 | 1101 | *EBUSY* |
… |
… |
|
1175 | 1175 | |
1176 | 1176 | *EACCES* |
1177 | | Search permission is denied for a directory in a fileâs path prefix. |
| 1177 | Search permission is denied for a directory in a file's path prefix. |
1178 | 1178 | |
1179 | 1179 | *EBADF* |
… |
… |
|
1344 | 1344 | |
1345 | 1345 | *EACCES* |
1346 | | Search permission is denied for a directory in a fileâs path prefix |
| 1346 | Search permission is denied for a directory in a file's path prefix |
1347 | 1347 | |
1348 | 1348 | *ENAMETOOLONG* |
… |
… |
|
1394 | 1394 | |
1395 | 1395 | *EACCES* |
1396 | | Search permission is denied for a directory in a fileâs path prefix. |
| 1396 | Search permission is denied for a directory in a file's path prefix. |
1397 | 1397 | |
1398 | 1398 | *EBADF* |
… |
… |
|
1465 | 1465 | |
1466 | 1466 | *EFAULT* |
1467 | | Argument points outside the calling processâs address space. |
| 1467 | Argument points outside the calling process's address space. |
1468 | 1468 | |
1469 | 1469 | *EINVAL* |
… |
… |
|
1506 | 1506 | |
1507 | 1507 | *EACCES* |
1508 | | Search permission is denied for a directory in a fileâs path prefix |
| 1508 | Search permission is denied for a directory in a file's path prefix |
1509 | 1509 | |
1510 | 1510 | *EINVAL* |
… |
… |
|
1635 | 1635 | |
1636 | 1636 | *EFAULT* |
1637 | | ``Path`` points outside the processâs allocated address space. |
| 1637 | ``Path`` points outside the process's allocated address space. |
1638 | 1638 | |
1639 | 1639 | *EBADF* |
… |
… |
|
1703 | 1703 | |
1704 | 1704 | *EFAULT* |
1705 | | ``Path`` points outside the processâs allocated address space. |
| 1705 | ``Path`` points outside the process's allocated address space. |
1706 | 1706 | |
1707 | 1707 | *EBADF* |
… |
… |
|
1920 | 1920 | below and the permissions for the new node. |
1921 | 1921 | |
1922 | | The permissions are modified by the processâs ``umask`` in the usual way: the |
| 1922 | The permissions are modified by the process's ``umask`` in the usual way: the |
1923 | 1923 | permissions of the created node are ``(mode & ~umask)``. |
1924 | 1924 | |
-
r11e1a6f
|
rd389819
|
|
1 | 1 | ============================ |
2 | | RTEMS POSIX API Userâs Guide |
| 2 | RTEMS POSIX API User's Guide |
3 | 3 | ============================ |
4 | 4 | |
5 | | COPYRIGHT © 1988 - 2015. |
| 5 | COPYRIGHT (c) 1988 - 2015. |
6 | 6 | |
7 | 7 | On-Line Applications Research Corporation (OAR). |
-
r11e1a6f
|
rd389819
|
|
68 | 68 | ========== |
69 | 69 | |
70 | | This section details the input and output primitives managerâs directives. |
71 | | A subsection is dedicated to each of this managerâs directives |
| 70 | This section details the input and output primitives manager's directives. |
| 71 | A subsection is dedicated to each of this manager's directives |
72 | 72 | and describes the calling sequence, related constants, usage, |
73 | 73 | and status codes. |
… |
… |
|
360 | 360 | |
361 | 361 | *EACCESS* |
362 | | Search permission is denied for a direcotry in a fileâs path |
| 362 | Search permission is denied for a direcotry in a file's path |
363 | 363 | prefix. |
364 | 364 | |
… |
… |
|
410 | 410 | |
411 | 411 | *F_GETFL* |
412 | | Read the descriptorâs flags (all flags (as set by open()) are returned). |
| 412 | Read the descriptor's flags (all flags (as set by open()) are returned). |
413 | 413 | |
414 | 414 | *F_SETFL* |
415 | | Set the descriptorâs flags to the value specified by ``arg``. Only``O_APPEND`` and ``O_NONBLOCK`` may be set. |
| 415 | Set the descriptor's flags to the value specified by ``arg``. Only``O_APPEND`` and ``O_NONBLOCK`` may be set. |
416 | 416 | The flags are shared between copies (made with ``dup()`` etc.) of the same |
417 | 417 | file descriptor. |
-
r11e1a6f
|
rd389819
|
|
31 | 31 | ========== |
32 | 32 | |
33 | | This section details the key managerâs directives. |
34 | | A subsection is dedicated to each of this managerâs directives |
| 33 | This section details the key manager's directives. |
| 34 | A subsection is dedicated to each of this manager's directives |
35 | 35 | and describes the calling sequence, related constants, usage, |
36 | 36 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
65 | 65 | ========== |
66 | 66 | |
67 | | This section details the language-specific services for the C programming language managerâs directives. |
68 | | A subsection is dedicated to each of this managerâs directives |
| 67 | This section details the language-specific services for the C programming language manager's directives. |
| 68 | A subsection is dedicated to each of this manager's directives |
69 | 69 | and describes the calling sequence, related constants, usage, |
70 | 70 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
43 | 43 | ========== |
44 | 44 | |
45 | | This section details the memory management managerâs directives. |
46 | | A subsection is dedicated to each of this managerâs directives |
| 45 | This section details the memory management manager's directives. |
| 46 | A subsection is dedicated to each of this manager's directives |
47 | 47 | and describes the calling sequence, related constants, usage, |
48 | 48 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
104 | 104 | |
105 | 105 | Every message queue has the ability to notify one (and only one) process |
106 | | whenever the queueâs state changes from empty (0 messages) to nonempty. |
| 106 | whenever the queue's state changes from empty (0 messages) to nonempty. |
107 | 107 | This means that the process does not have to block or constantly poll |
108 | 108 | while it waits for a message. By calling mq_notify, you can attach a |
… |
… |
|
195 | 195 | priority message(s) from the message queue specified by mqdes. The |
196 | 196 | messages are received in FIFO order within the priorities. The received |
197 | | messageâs priority is stored in the location referenced by the msg_prio. |
| 197 | message's priority is stored in the location referenced by the msg_prio. |
198 | 198 | If the msg_prio is a NULL, the priority is discarded. The message is |
199 | 199 | removed and stored in an area pointed to by msg_ptr whose length is of |
… |
… |
|
213 | 213 | The mq_notify() function registers the calling process to be notified of |
214 | 214 | message arrival at an empty message queue. Every message queue has the |
215 | | ability to notify one (and only one) process whenever the queueâs state |
| 215 | ability to notify one (and only one) process whenever the queue's state |
216 | 216 | changes from empty (0 messages) to nonempty. This means that the process |
217 | 217 | does not have to block or constantly poll while it waits for a message. |
… |
… |
|
266 | 266 | ========== |
267 | 267 | |
268 | | This section details the message passing managerâs directives. A |
269 | | subsection is dedicated to each of this managerâs directives and describes |
| 268 | This section details the message passing manager's directives. A |
| 269 | subsection is dedicated to each of this manager's directives and describes |
270 | 270 | the calling sequence, related constants, usage, and status codes. |
271 | 271 | |
… |
… |
|
318 | 318 | mq_open creates it. Message queues can have multiple senders and |
319 | 319 | receivers. If mq_open is successful, the function returns a message queue |
320 | | descriptor. Otherwise, the function returns a -1 and sets âerrnoâ to |
| 320 | descriptor. Otherwise, the function returns a -1 and sets 'errno' to |
321 | 321 | indicate the error. |
322 | 322 | |
… |
… |
|
501 | 501 | priority message(s) from the message queue specified by mqdes. The |
502 | 502 | messages are received in FIFO order within the priorities. The received |
503 | | messageâs priority is stored in the location referenced by the msg_prio. |
| 503 | message's priority is stored in the location referenced by the msg_prio. |
504 | 504 | If the msg_prio is a NULL, the priority is discarded. The message is |
505 | 505 | removed and stored in an area pointed to by msg_ptr whose length is of |
… |
… |
|
549 | 549 | |
550 | 550 | Every message queue has the ability to notify one (and only one) process |
551 | | whenever the queueâs state changes from empty (0 messages) to nonempty. |
| 551 | whenever the queue's state changes from empty (0 messages) to nonempty. |
552 | 552 | This means that the process does not have to block or constantly poll |
553 | 553 | while it waits for a message. By calling mq_notify, a notification |
-
r11e1a6f
|
rd389819
|
|
88 | 88 | ======== |
89 | 89 | |
90 | | This section details the mutex managerâs services. |
91 | | A subsection is dedicated to each of this managerâs services |
| 90 | This section details the mutex manager's services. |
| 91 | A subsection is dedicated to each of this manager's services |
92 | 92 | and describes the calling sequence, related constants, usage, |
93 | 93 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
2 | 2 | ####### |
3 | 3 | |
4 | | This is the Userâs Guide for the POSIX API support |
| 4 | This is the User's Guide for the POSIX API support |
5 | 5 | provided in RTEMS. |
6 | 6 | |
… |
… |
|
53 | 53 | Portions of this text are reprinted and reproduced in electronic |
54 | 54 | form from IEEE Std 1003.1, 2004 Edition, Standard for Information |
55 | | Technology â Operating System Interface (POSIX), The Open |
56 | | Group Base Specifications Issue 6, Copyright é 2001-2004 by the |
| 55 | Technology Operating System Interface (POSIX), The Open |
| 56 | Group Base Specifications Issue 6, Copyright (c) 2001-2004 by the |
57 | 57 | Institute of Electrical and Electronics Engineers, Inc and The |
58 | 58 | Open Group. In the event of any discrepancy between this version |
-
r11e1a6f
|
rd389819
|
|
58 | 58 | ========== |
59 | 59 | |
60 | | This section details the process creation and execution managerâs directives. |
61 | | A subsection is dedicated to each of this managerâs directives |
| 60 | This section details the process creation and execution manager's directives. |
| 61 | A subsection is dedicated to each of this manager's directives |
62 | 62 | and describes the calling sequence, related constants, usage, |
63 | 63 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
104 | 104 | programs. In a full POSIX environment with command line shell |
105 | 105 | and multiple processes, environment variables may be set in |
106 | | one process â such as the shell â and inherited by child |
| 106 | one process - such as the shell - and inherited by child |
107 | 107 | processes. In RTEMS, there is only one process and thus |
108 | 108 | only one set of environment variables across all processes. |
… |
… |
|
128 | 128 | ========== |
129 | 129 | |
130 | | This section details the process environment managerâs directives. |
131 | | A subsection is dedicated to each of this managerâs directives |
| 130 | This section details the process environment manager's directives. |
| 131 | A subsection is dedicated to each of this manager's directives |
132 | 132 | and describes the calling sequence, related constants, usage, |
133 | 133 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
61 | 61 | ========== |
62 | 62 | |
63 | | This section details the scheduler managerâs directives. |
64 | | A subsection is dedicated to each of this managerâs directives |
| 63 | This section details the scheduler manager's directives. |
| 64 | A subsection is dedicated to each of this manager's directives |
65 | 65 | and describes the calling sequence, related constants, usage, |
66 | 66 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
79 | 79 | ========== |
80 | 80 | |
81 | | This section details the semaphore managerâs directives. |
82 | | A subsection is dedicated to each of this managerâs directives |
| 81 | This section details the semaphore manager's directives. |
| 82 | A subsection is dedicated to each of this manager's directives |
83 | 83 | and describes the calling sequence, related constants, usage, |
84 | 84 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
166 | 166 | - ``puts`` - Write a character string on standard output |
167 | 167 | |
168 | | - ``remove`` - Delete a fileâs name |
| 168 | - ``remove`` - Delete a file's name |
169 | 169 | |
170 | 170 | - ``rename`` - Rename a file |
-
r11e1a6f
|
rd389819
|
|
116 | 116 | individual signals and handlers associated with it. Services |
117 | 117 | are provided to construct signal sets for the purposes of building |
118 | | signal sets â type ``sigset_t`` â that are used to |
| 118 | signal sets - type ``sigset_t`` - that are used to |
119 | 119 | provide arguments to the services that mask, unmask, and |
120 | 120 | check on pending signals. |
… |
… |
|
139 | 139 | ========== |
140 | 140 | |
141 | | This section details the signal managerâs directives. |
142 | | A subsection is dedicated to each of this managerâs directives |
| 141 | This section details the signal manager's directives. |
| 142 | A subsection is dedicated to each of this manager's directives |
143 | 143 | and describes the calling sequence, related constants, usage, |
144 | 144 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
39 | 39 | ========== |
40 | 40 | |
41 | | This section details the system databases managerâs directives. |
42 | | A subsection is dedicated to each of this managerâs directives |
| 41 | This section details the system databases manager's directives. |
| 42 | A subsection is dedicated to each of this manager's directives |
43 | 43 | and describes the calling sequence, related constants, usage, |
44 | 44 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
86 | 86 | If this value is NULL, then RTEMS allocates the memory for the thread stack |
87 | 87 | from the RTEMS Workspace Area. Otherwise, this is the user specified |
88 | | address for the memory to be used for the threadâs stack. Each thread must |
| 88 | address for the memory to be used for the thread's stack. Each thread must |
89 | 89 | have a distinct stack area. Each processor family has different alignment |
90 | 90 | rules which should be followed. |
91 | 91 | |
92 | 92 | *stack size* |
93 | | is the minimum desired size for this threadâs stack area. |
| 93 | is the minimum desired size for this thread's stack area. |
94 | 94 | If the size of this area as specified by the stack size attribute |
95 | 95 | is smaller than the minimum for this processor family and the stack |
… |
… |
|
121 | 121 | ======== |
122 | 122 | |
123 | | This section details the thread managerâs services. |
124 | | A subsection is dedicated to each of this managerâs services |
| 123 | This section details the thread manager's services. |
| 124 | A subsection is dedicated to each of this manager's services |
125 | 125 | and describes the calling sequence, related constants, usage, |
126 | 126 | and status codes. |
… |
… |
|
853 | 853 | *EINVAL* |
854 | 854 | The user specified a stack address and the size of the area was not |
855 | | large enough to meet this processorâs minimum stack requirements. |
| 855 | large enough to meet this processor's minimum stack requirements. |
856 | 856 | |
857 | 857 | *EINVAL* |
-
r11e1a6f
|
rd389819
|
|
35 | 35 | ========== |
36 | 36 | |
37 | | This section details the thread cancellation managerâs directives. |
38 | | A subsection is dedicated to each of this managerâs directives |
| 37 | This section details the thread cancellation manager's directives. |
| 38 | A subsection is dedicated to each of this manager's directives |
39 | 39 | and describes the calling sequence, related constants, usage, |
40 | 40 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
28 | 28 | ============ |
29 | 29 | |
30 | | This section details the timer managerâs services. |
31 | | A subsection is dedicated to each of this managerâs services |
| 30 | This section details the timer manager's services. |
| 31 | A subsection is dedicated to each of this manager's services |
32 | 32 | and describes the calling sequence, related constants, usage, |
33 | 33 | and status codes. |
-
r11e1a6f
|
rd389819
|
|
537 | 537 | Causes cp to write a prompt to the standard error output before copying a file |
538 | 538 | that would overwrite an existing file. If the response from the standard input |
539 | | begins with the character âyâ, the file copy is attempted. |
| 539 | begins with the character 'y', the file copy is attempted. |
540 | 540 | |
541 | 541 | *-L* |
… |
… |
|
554 | 554 | and the exit value is not altered. |
555 | 555 | If the source file has its set user ID bit on and the user ID cannot be |
556 | | preserved, the set user ID bit is not preserved in the copyâs permissions. If |
| 556 | preserved, the set user ID bit is not preserved in the copy's permissions. If |
557 | 557 | the source file has its set group ID bit on and the group ID cannot be |
558 | | preserved, the set group ID bit is not preserved in the copyâs permissions. If |
| 558 | preserved, the set group ID bit is not preserved in the copy's permissions. If |
559 | 559 | the source file has both its set user ID and set group ID bits on, and either |
560 | 560 | the user ID or group ID cannot be preserved, neither the set user ID or set |
561 | | group ID bits are preserved in the copyâs permissions. |
| 561 | group ID bits are preserved in the copy's permissions. |
562 | 562 | |
563 | 563 | *-R* |
… |
… |
|
566 | 566 | copied, rather than indirected through, and for cp to create special files |
567 | 567 | rather than copying them as normal files. Created directories have the same |
568 | | mode as the corresponding source directory, unmodified by the processâs umask. |
| 568 | mode as the corresponding source directory, unmodified by the process's umask. |
569 | 569 | |
570 | 570 | *-v* |
… |
… |
|
593 | 593 | as described above. The -H and -L options are ignored unless the -R option is |