Changeset 1a1be7f in rtems-docs


Ignore:
Timestamp:
Jan 18, 2016, 12:13:37 AM (4 years ago)
Author:
Amar Takhar <amar@…>
Branches:
4.11, master
Children:
fd6dc8c
Parents:
4783b0d
git-author:
Amar Takhar <amar@…> (01/18/16 00:13:37)
git-committer:
Amar Takhar <verm@…> (05/03/16 00:51:23)
Message:

Fix markup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c_user/c_user.rst

    r4783b0d r1a1be7f  
    589589RTEMS requires RAM to manage each instance of an RTEMS object
    590590that is created.  Thus the more RTEMS objects an application
    591 needs, the more memory that must be reserved.  See:ref:`Configuring a System <Configuring-a-System>` for more details.
     591needs, the more memory that must be reserved.  See `Configuring a System`_.
    592592
    593593RTEMS utilizes memory for both code and data space.
     
    787787
    788788Chapter 30:
    789     Constant Bandwidth Server Scheduler API::
     789    Constant Bandwidth Server Scheduler API.
    790790
    791791Chapter 31:
     
    11011101The data type ``rtems_time_of_day`` is used to specify
    11021102calendar time in RTEMS services.
    1103 See :ref:`Time and Date Data Structures <Clock-Manager-Time-and-Date-Data-Structures>`... index:: rtems_time_of_day
     1103See `Time and Date Data Structures`_
     1104
     1105... index:: rtems_time_of_day
    11041106
    11051107Obviously, the directives which use intervals or wall
     
    11641166
    11651167- .. index:: rtems_address
     1168
    11661169  ``rtems_address`` is the data type used to manage
    11671170  addresses.  It is equivalent to
     
    11691172
    11701173- .. index:: rtems_asr
     1174
    11711175  ``rtems_asr`` is the return type for an
    11721176  RTEMS ASR.
    11731177
    11741178- .. index:: rtems_asr_entry
     1179
    11751180  ``rtems_asr_entry`` is the address of
    11761181  the entry point to an RTEMS ASR.
    11771182
    11781183- .. index:: rtems_attribute
     1184
    11791185  ``rtems_attribute`` is the data type used
    11801186  to manage the attributes for RTEMS objects.  It is primarily
     
    11831189
    11841190- .. index:: rtems_boolean
     1191
    11851192  ``rtems_boolean`` may only take on the
    11861193  values of ``TRUE`` and ``FALSE``.
     
    11881195
    11891196- .. index:: rtems_context
     1197
    11901198  ``rtems_context`` is the CPU dependent
    11911199  data structure used to manage the integer and system
     
    11931201
    11941202- .. index:: rtems_context_fp
     1203
    11951204  ``rtems_context_fp`` is the CPU dependent
    11961205  data structure used to manage the floating point portion of
     
    11981207
    11991208- .. index:: rtems_device_driver
     1209
    12001210  ``rtems_device_driver`` is the
    12011211  return type for a RTEMS device driver routine.
    12021212
    12031213- .. index:: rtems_device_driver_entry
     1214
    12041215  ``rtems_device_driver_entry`` is the
    12051216  entry point to a RTEMS device driver routine.
    12061217
    12071218- .. index:: rtems_device_major_number
     1219
    12081220  ``rtems_device_major_number`` is the
    12091221  data type used to manage device major numbers.
    12101222
    12111223- .. index:: rtems_device_minor_number
     1224
    12121225  ``rtems_device_minor_number`` is the
    12131226  data type used to manage device minor numbers.
    12141227
    12151228- .. index:: rtems_double
     1229
    12161230  ``rtems_double`` is the RTEMS data
    12171231  type that corresponds to double precision floating point
     
    12201234
    12211235- .. index:: rtems_event_set
     1236
    12221237  ``rtems_event_set`` is the data
    12231238  type used to manage and manipulate RTEMS event sets
     
    12251240
    12261241- .. index:: rtems_extension
     1242
    12271243  ``rtems_extension`` is the return type
    12281244  for RTEMS user extension routines.
    12291245
    12301246- .. index:: rtems_fatal_extension
     1247
    12311248  ``rtems_fatal_extension`` is the
    12321249  entry point for a fatal error user extension handler routine.
    12331250
    12341251- .. index:: rtems_id
     1252
    12351253  ``rtems_id`` is the data type used
    12361254  to manage and manipulate RTEMS object IDs.
    12371255
    12381256- .. index:: rtems_interrupt_frame
     1257
    12391258  ``rtems_interrupt_frame`` is the
    12401259  data structure that defines the format of the interrupt
     
    12431262
    12441263- .. index:: rtems_interrupt_level
     1264
    12451265  ``rtems_interrupt_level`` is the
    12461266  data structure used with the ``rtems_interrupt_disable``,``rtems_interrupt_enable``, and``rtems_interrupt_flash`` routines.  This
     
    12501270
    12511271- .. index:: rtems_interval
     1272
    12521273  ``rtems_interval`` is the data
    12531274  type used to manage and manipulate time intervals.
     
    12561277
    12571278- .. index:: rtems_isr
     1279
    12581280  ``rtems_isr`` is the return type
    12591281  of a function implementing an RTEMS ISR.
    12601282
    12611283- .. index:: rtems_isr_entry
     1284
    12621285  ``rtems_isr_entry`` is the address of
    12631286  the entry point to an RTEMS ISR.  It is equivalent to the
     
    12651288
    12661289- .. index:: rtems_mp_packet_classes
     1290
    12671291  ``rtems_mp_packet_classes`` is the
    12681292  enumerated type which specifies the categories of
     
    12721296
    12731297- .. index:: rtems_mode
     1298
    12741299  ``rtems_mode`` is the data type
    12751300  used to manage and dynamically manipulate the execution
     
    12771302
    12781303- .. index:: rtems_mpci_entry
     1304
    12791305  ``rtems_mpci_entry`` is the return type
    12801306  of an RTEMS MPCI routine.
    12811307
    12821308- .. index:: rtems_mpci_get_packet_entry
     1309
    12831310  ``rtems_mpci_get_packet_entry`` is the address of
    12841311  the entry point to the get packet routine for an MPCI implementation.
    12851312
    12861313- .. index:: rtems_mpci_initialization_entry
     1314
    12871315  ``rtems_mpci_initialization_entry`` is the address of
    12881316  the entry point to the initialization routine for an MPCI implementation.
    12891317
    12901318- .. index:: rtems_mpci_receive_packet_entry
     1319
    12911320  ``rtems_mpci_receive_packet_entry`` is the address of
    12921321  the entry point to the receive packet routine for an MPCI implementation.
    12931322
    12941323- .. index:: rtems_mpci_return_packet_entry
     1324
    12951325  ``rtems_mpci_return_packet_entry`` is the address of
    12961326  the entry point to the return packet routine for an MPCI implementation.
    12971327
    12981328- .. index:: rtems_mpci_send_packet_entry
     1329
    12991330  ``rtems_mpci_send_packet_entry`` is the address of
    13001331  the entry point to the send packet routine for an MPCI implementation.
    13011332
    13021333- .. index:: rtems_mpci_table
     1334
    13031335  ``rtems_mpci_table`` is the data structure
    13041336  containing the configuration information for an MPCI.
    13051337
    13061338- .. index:: rtems_name
     1339
    13071340  ``rtems_name`` is the data type used to
    13081341  contain the name of a Classic API object.  It is an unsigned
     
    13121345
    13131346- .. index:: rtems_option
     1347
    13141348  ``rtems_option`` is the data type
    13151349  used to specify which behavioral options the caller desires.
     
    13191353
    13201354- .. index:: rtems_packet_prefix
     1355
    13211356  ``rtems_packet_prefix`` is the data structure
    13221357  that defines the first bytes in every packet sent between nodes
     
    13251360
    13261361- .. index:: rtems_signal_set
     1362
    13271363  ``rtems_signal_set`` is the data
    13281364  type used to manage and manipulate RTEMS signal sets
     
    13301366
    13311367- .. index:: int8_t
     1368
    13321369  ``int8_t`` is the C99 data type that corresponds to signed eight
    13331370  bit integers.  This data type is defined by RTEMS in a manner that
     
    13351372
    13361373- .. index:: int16_t
     1374
    13371375  ``int16_t`` is the C99 data type that corresponds to signed
    13381376  sixteen bit integers.  This data type is defined by RTEMS in a manner
     
    13401378
    13411379- .. index:: int32_t
     1380
    13421381  ``int32_t`` is the C99 data type that corresponds to signed
    13431382  thirty-two bit integers.  This data type is defined by RTEMS in a manner
     
    13451384
    13461385- .. index:: int64_t
     1386
    13471387  ``int64_t`` is the C99 data type that corresponds to signed
    13481388  sixty-four bit integers.  This data type is defined by RTEMS in a manner
     
    13501390
    13511391- .. index:: rtems_single
     1392
    13521393  ``rtems_single`` is the RTEMS data
    13531394  type that corresponds to single precision floating point
     
    13561397
    13571398- .. index:: rtems_status_codes
     1399
    13581400  ``rtems_status_codes`` is the return type for most
    13591401  RTEMS services.  This is an enumerated type of approximately twenty-five
     
    13621404
    13631405- .. index:: rtems_task
     1406
    13641407  ``rtems_task`` is the return type for an
    13651408  RTEMS Task.
    13661409
    13671410- .. index:: rtems_task_argument
     1411
    13681412  ``rtems_task_argument`` is the data
    13691413  type for the argument passed to each RTEMS task. In RTEMS 4.7
     
    13741418
    13751419- .. index:: rtems_task_begin_extension
     1420
    13761421  ``rtems_task_begin_extension`` is the
    13771422  entry point for a task beginning execution user extension handler routine.
    13781423
    13791424- .. index:: rtems_task_create_extension
     1425
    13801426  ``rtems_task_create_extension`` is the
    13811427  entry point for a task creation execution user extension handler routine.
    13821428
    13831429- .. index:: rtems_task_delete_extension
     1430
    13841431  ``rtems_task_delete_extension`` is the
    13851432  entry point for a task deletion user extension handler routine.
    13861433
    13871434- .. index:: rtems_task_entry
     1435
    13881436  ``rtems_task_entry`` is the address of
    13891437  the entry point to an RTEMS ASR.  It is equivalent to the
     
    13911439
    13921440- .. index:: rtems_task_exitted_extension
     1441
    13931442  ``rtems_task_exitted_extension`` is the
    13941443  entry point for a task exitted user extension handler routine.
    13951444
    13961445- .. index:: rtems_task_priority
     1446
    13971447  ``rtems_task_priority`` is the data type
    13981448  used to manage and manipulate task priorities.
    13991449
    14001450- .. index:: rtems_task_restart_extension
     1451
    14011452  ``rtems_task_restart_extension`` is the
    14021453  entry point for a task restart user extension handler routine.
    14031454
    14041455- .. index:: rtems_task_start_extension
     1456
    14051457  ``rtems_task_start_extension`` is the
    14061458  entry point for a task start user extension handler routine.
    14071459
    14081460- .. index:: rtems_task_switch_extension
     1461
    14091462  ``rtems_task_switch_extension`` is the
    14101463  entry point for a task context switch user extension handler routine.
    14111464
    14121465- .. index:: rtems_tcb
     1466
    14131467  ``rtems_tcb`` is the data structure associated
    14141468  with each task in an RTEMS system.
    14151469
    14161470- .. index:: rtems_time_of_day
     1471
    14171472  ``rtems_time_of_day`` is the data structure
    14181473  used to manage and manipulate calendar time in RTEMS.
    14191474
    14201475- .. index:: rtems_timer_service_routine
     1476
    14211477  ``rtems_timer_service_routine`` is the
    14221478  return type for an RTEMS Timer Service Routine.
    14231479
    14241480- .. index:: rtems_timer_service_routine_entry
     1481
    14251482  ``rtems_timer_service_routine_entry`` is the address of
    14261483  the entry point to an RTEMS TSR.  It is equivalent to the
     
    14281485
    14291486- .. index:: rtems_vector_number
     1487
    14301488  ``rtems_vector_number`` is the data
    14311489  type used to manage and manipulate interrupt vector numbers.
    14321490
    14331491- .. index:: uint8_t
     1492
    14341493  ``uint8_t`` is the C99 data type that corresponds to unsigned
    14351494  eight bit integers.  This data type is defined by RTEMS in a manner that
     
    14371496
    14381497- .. index:: uint16_t
     1498
    14391499  ``uint16_t`` is the C99 data type that corresponds to unsigned
    14401500  sixteen bit integers.  This data type is defined by RTEMS in a manner
     
    14421502
    14431503- .. index:: uint32_t
     1504
    14441505  ``uint32_t`` is the C99 data type that corresponds to unsigned
    14451506  thirty-two bit integers.  This data type is defined by RTEMS in a manner
     
    14471508
    14481509- .. index:: uint64_t
     1510
    14491511  ``uint64_t`` is the C99 data type that corresponds to unsigned
    14501512  sixty-four bit integers.  This data type is defined by RTEMS in a manner
     
    14521514
    14531515- .. index:: uintptr_t
     1516
    14541517  ``uintptr_t`` is the C99 data type that corresponds to the
    14551518  unsigned integer type that is of sufficient size to represent addresses
     
    15251588priorities, the most important rule to remember is:
    15261589
    1527 - ```` *Priority based scheduling algorithms will always select the
     1590- *Priority based scheduling algorithms will always select the
    15281591  highest priority task that is ready to run when allocating the processor
    15291592  to a task.*
     
    20602123
    20612124A discussion of RTEMS actions when a fatal error occurs
    2062 may be found :ref:`Fatal Error Manager Announcing a Fatal Error <Fatal-Error-Manager-Announcing-a-Fatal-Error>`.
     2125may be found `Announcing a Fatal Error`_.
    20632126
    20642127Operations
     
    20852148The ``rtems_initialize_executive`` directive uses a system
    20862149initialization linker set to initialize only those parts of the overall RTEMS
    2087 feature set that is necessary for a particular application.  See :ref:`Linker
    2088 Sets <Linker-Sets>`.  Each RTEMS feature used the application may optionally register an
     2150feature set that is necessary for a particular application.  See `Linker Sets`_. 
     2151Each RTEMS feature used the application may optionally register an
    20892152initialization handler.  The system initialization API is available via``#included <rtems/sysinit.h>``.
    20902153
     
    21402203the contents of the Configuration Table.  For more information
    21412204regarding the format and contents of this table, please refer
    2142 to the chapter :ref:`Configuring a System <Configuring-a-System>`.
     2205to the chapter `Configuring a System`_.
    21432206
    21442207The final action in the initialization sequence is the
     
    43674430specified by the user in the Configuration Table.
    43684431
    4369 .. _Clock-Manager-Time-and-Date-Data-Structures:
    43704432
    43714433Time and Date Data Structures
     
    58185880system’s behavior.  It has been proven that:
    58195881
    5820 - ```` *RMS is an optimal static priority algorithm for
     5882- *RMS is an optimal static priority algorithm for
    58215883  scheduling independent, preemptible, periodic tasks
    58225884  on a single processor.*
     
    58395901for task priorities.  For example, consider the following task
    58405902set and priority assignments:
    5841 .. code:: c
    5842 
    5843     +--------------------+---------------------+---------------------+
    5844     |        Task        |       Period        |      Priority       |
    5845     |                    |  (in milliseconds)  |                     |
    5846     +--------------------+---------------------+---------------------+
    5847     |         1          |         100         |         Low         |
    5848     +--------------------+---------------------+---------------------+
    5849     |         2          |          50         |       Medium        |
    5850     +--------------------+---------------------+---------------------+
    5851     |         3          |          50         |       Medium        |
    5852     +--------------------+---------------------+---------------------+
    5853     |         4          |          25         |        High         |
    5854     +--------------------+---------------------+---------------------+
     5903
     5904+--------------------+---------------------+---------------------+
     5905| Task               | Period              | Priority            |
     5906|                    | (in milliseconds)   |                     |
     5907+====================+=====================+=====================+
     5908|         1          |         100         |         Low         |
     5909+--------------------+---------------------+---------------------+
     5910|         2          |          50         |       Medium        |
     5911+--------------------+---------------------+---------------------+
     5912|         3          |          50         |       Medium        |
     5913+--------------------+---------------------+---------------------+
     5914|         4          |          25         |        High         |
     5915+--------------------+---------------------+---------------------+
    58555916
    58565917RMS only calls for task 1 to have the lowest
     
    59446005periodic tasks.  The following table details the RMS priority,
    59456006period, execution time, and processor utilization for each task:
    5946 .. code:: c
    5947 
    5948     +------------+----------+--------+-----------+-------------+
    5949     |    Task    |   RMS    | Period | Execution |  Processor  |
    5950     |            | Priority |        |   Time    | Utilization |
    5951     +------------+----------+--------+-----------+-------------+
    5952     |     1      |   High   |  100   |    15     |    0.15     |
    5953     +------------+----------+--------+-----------+-------------+
    5954     |     2      |  Medium  |  200   |    50     |    0.25     |
    5955     +------------+----------+--------+-----------+-------------+
    5956     |     3      |   Low    |  300   |   100     |    0.33     |
    5957     +------------+----------+--------+-----------+-------------+
     6007
     6008
     6009+------------+----------+--------+-----------+-------------+
     6010| Tas   k    | RMS      | Period | Execution | Processor   |
     6011|            | Priority |        | Time      | Utilization |
     6012+============+==========+========+===========+=============+
     6013|     1      |   High   |  100   |    15     |    0.15     |
     6014+------------+----------+--------+-----------+-------------+
     6015|     2      |  Medium  |  200   |    50     |    0.25     |
     6016+------------+----------+--------+-----------+-------------+
     6017|     3      |   Low    |  300   |   100     |    0.33     |
     6018+------------+----------+--------+-----------+-------------+
    59586019
    59596020The total processor utilization for this task set is
     
    59986059.. code:: c
    59996060
    6000     +------------+----------+--------+-----------+-------------+
    6001     |    Task    |   RMS    | Period | Execution |  Processor  |
    6002     |            | Priority |        |   Time    | Utilization |
    6003     +------------+----------+--------+-----------+-------------+
    6004     |     1      |   High   |  100   |    25     |    0.25     |
    6005     +------------+----------+--------+-----------+-------------+
    6006     |     2      |  Medium  |  200   |    50     |    0.25     |
    6007     +------------+----------+--------+-----------+-------------+
    6008     |     3      |   Low    |  300   |   100     |    0.33     |
    6009     +------------+----------+--------+-----------+-------------+
     6061+------------+----------+--------+-----------+-------------+
     6062| Task       | RMS      | Period | Execution | Processor   |
     6063|            | Priority |        | Time      | Utilization |
     6064+============+==========+========+===========+=============+
     6065|     1      |   High   |  100   |    25     |    0.25     |
     6066+------------+----------+--------+-----------+-------------+
     6067|     2      |  Medium  |  200   |    50     |    0.25     |
     6068+------------+----------+--------+-----------+-------------+
     6069|     3      |   Low    |  300   |   100     |    0.33     |
     6070+------------+----------+--------+-----------+-------------+
    60106071
    60116072The total processor utilization for the modified task
     
    60236084.. code:: c
    60246085
    6025     +----------+------+------+------+----------------------+---------------+
    6026     | Deadline | Task | Task | Task |        Total         | All Deadlines |
    6027     |   Time   |  1   |  2   |  3   |    Execution Time    |     Met?      |
    6028     +----------+------+------+------+----------------------+---------------+
    6029     |   100    |  1   |  1   |  1   |  25 + 50 + 100 = 175 |      NO       |
    6030     +----------+------+------+------+----------------------+---------------+
    6031     |   200    |  2   |  1   |  1   |  50 + 50 + 100 = 200 |     YES       |
    6032     +----------+------+------+------+----------------------+---------------+
     6086+----------+------+------+------+----------------------+---------------+
     6087| Deadline | Task | Task | Task | Total                | All Deadlines |
     6088| Time     | 1    | 2    | 3    | Execution Time       | Met?          |
     6089+==========+======+======+======+======================+===============+
     6090|   100    |  1   |  1   |  1   |  25 + 50 + 100 = 175 |      NO       |
     6091+----------+------+------+------+----------------------+---------------+
     6092|   200    |  2   |  1   |  1   |  50 + 50 + 100 = 200 |     YES       |
     6093+----------+------+------+------+----------------------+---------------+
    60336094
    60346095The key to this analysis is to recognize when each
     
    60986159following:
    60996160
    6100 - ```` *C. L. Liu and J. W. Layland. "Scheduling Algorithms for
     6161- *C. L. Liu and J. W. Layland. "Scheduling Algorithms for
    61016162  Multiprogramming in a Hard Real Time Environment." *Journal of
    61026163  the Association of Computing Machinery*. January 1973. pp. 46-61.*
    61036164
    6104 - ```` *John Lehoczky, Lui Sha, and Ye Ding. "The Rate Monotonic
     6165- *John Lehoczky, Lui Sha, and Ye Ding. "The Rate Monotonic
    61056166  Scheduling Algorithm: Exact Characterization and Average Case
    61066167  Behavior."  *IEEE Real-Time Systems Symposium*. 1989. pp. 166-171.*
    61076168
    6108 - ```` *Lui Sha and John Goodenough. "Real-Time Scheduling
    6109   Theory and Ada."  *IEEE Computer*. April 1990. pp. 53-62.*
    6110 
    6111 - ```` *Alan Burns. "Scheduling hard real-time systems: a
     6169- *Lui Sha and John Goodenough. "Real-Time Scheduling
     6170  theory and Ada."  *IEEE Computer*. April 1990. pp. 53-62.*
     6171
     6172- *Alan Burns. "Scheduling hard real-time systems: a
    61126173  review."  *Software Engineering Journal*. May 1991. pp. 116-128.*
    61136174
     
    65416602time values will be set to 0.  Otherwise, both time values will contain
    65426603time information since the last invocation of the``rtems_rate_monotonic_period`` directive.  More
    6543 specifically, the (ticks_)since_last_period value contains the elapsed time
     6604specifically, the ticks_since_last_period value contains the elapsed time
    65446605which has occurred since the last invocation of the``rtems_rate_monotonic_period`` directive and the
    6545 (ticks_)executed_since_last_period contains how much processor time the
     6606ticks_executed_since_last_period contains how much processor time the
    65466607owning task has consumed since the invocation of the``rtems_rate_monotonic_period`` directive.
    65476608
     
    68116872from executing by lower priority tasks.
    68126873
    6813 .. _Semaphore-Manager-Priority-Inheritance:
    68146874
    68156875Priority Inheritance
     
    68896949be restored to the normal value.
    68906950
    6891 .. _Semaphore-Manager-Multiprocessor-Resource-Sharing-Protocol:
    68926951
    68936952Multiprocessor Resource Sharing Protocol
     
    88518910
    88528911- Target Task is Blocked Waiting for Events
    8853   - - If the waiting task’s input event condition is
     8912
     8913  - If the waiting task’s input event condition is
    88548914    satisfied, then the task is made ready for execution.
    8855   - - If the waiting task’s input event condition is not
     8915
     8916  - If the waiting task’s input event condition is not
    88568917    satisfied, then the event set is posted but left pending and the
    88578918    task remains blocked.
    88588919
    88598920- Target Task is Not Waiting for Events
    8860   - - The event set is posted and left pending.
     8921
     8922  - The event set is posted and left pending.
    88618923
    88628924Receiving an Event Set
     
    1128911351==========
    1129011352
    11291 .. _Fatal-Error-Manager-Announcing-a-Fatal-Error:
    1129211353
    1129311354Announcing a Fatal Error
     
    1170311764device.
    1170411765
    11705 For more information on user extensions, refer to the:ref:`User Extensions Manager <User-Extensions-Manager>` chapter.
     11766For more information on user extensions, refer to `User Extensions Manager`_.
    1170611767
    1170711768Multiprocessor Communications Interface (MPCI)
     
    1179611857.. COMMENT: All rights reserved.
    1179711858
    11798 .. _User-Extensions-Manager:
    1179911859
    1180011860User Extensions Manager
     
    1238912449.. COMMENT: Device Driver Table, Init task table, etc.?
    1239012450
    12391 .. _Configuring-a-System:
    1239212451
    1239312452Configuring a System
     
    1245212511.. COMMENT: === Sizing the RTEMS Workspace ===
    1245312512
    12454 .. _Configuring-a-System-Sizing-the-RTEMS-Workspace:
    12455 
    1245612513Sizing the RTEMS Workspace
    1245712514==========================
     
    1246912526includes the amount of memory that will be allocated for internal use
    1247012527by RTEMS. The automatic calculation may underestimate the workspace
    12471 size truly needed by the application, in which case one can use the``CONFIGURE_MEMORY_OVERHEAD`` macro to add a value to the estimate. See:ref:`Configuring a System Specify Memory Overhead <Configuring-a-System-Specify-Memory-Overhead>` for more details.
     12528size truly needed by the application, in which case one can use the``CONFIGURE_MEMORY_OVERHEAD`` macro to add a value to the estimate. See `Specify Memory Overhead`_ for more details.
    1247212529
    1247312530The memory area for the RTEMS Workspace is determined by the BSP.  In case the
     
    1248912546space from inside the RTEMS Workspace.
    1249012547
    12491 See :ref:`Configuring a System Unlimited Objects <Configuring-a-System-Unlimited-Objects>` for more details about
     12548See `Unlimited Objects`_ for more details about
    1249212549the second way, which allows for dynamic allocation of objects and
    1249312550therefore does not provide determinism.  This mode is useful mostly for
     
    1255912616
    1256012617- RANGE:
     12618
    1256112619  The range depends on the Data Type of the macro.
     12620
    1256212621  - − If the data type is of type task priority, then its value should
    1256312622    be an integer in the range of 1 to 255.
     
    1257412633
    1257512634- DEFAULT VALUE
     12635
    1257612636  The default value should be in the following formats-
    1257712637  Please note that the ’.’ (full stop) is necessary.
     12638
    1257812639  - − In case the value is not defined then:
    1257912640    This is not defined by default.
     
    1267412735.. COMMENT: === Unlimited Objects ===
    1267512736
    12676 .. _Configuring-a-System-Unlimited-Objects:
    1267712737
    1267812738Unlimited Objects
     
    1268112741In real-time embedded systems the RAM is normally a limited, critical
    1268212742resource and dynamic allocation is avoided as much as possible to
    12683 ensure predictable, deterministic execution times. For such cases, see:ref:`Configuring a System Sizing the RTEMS Workspace <Configuring-a-System-Sizing-the-RTEMS-Workspace>` for an overview
     12743ensure predictable, deterministic execution times. For such cases, see `Sizing the RTEMS Workspace`_ for an overview
    1268412744of how to tune the size of the workspace.  Frequently when users are
    1268512745porting software to RTEMS the precise resource requirements of the
     
    1275012810
    1275112811Due to the memory requirements of unlimited objects it is strongly recommended
    12752 to use them only in combination with the unified work areas. See:ref:`Configuring a System Separate or Unified Work Areas <Configuring-a-System-Separate-or-Unified-Work-Areas>` for more information
     12812to use them only in combination with the unified work areas. See `Separate or Unified Work Areas`_ for more information
    1275312813on unified work areas.
    1275412814
     
    1291012970for tasks assume that each task has a minimum stack size and
    1291112971has floating point support enabled.  The configuration parameter``CONFIGURE_EXTRA_TASK_STACKS`` is used to specify task stack
    12912 requirements *ABOVE* the minimum size required.  See:ref:`Configuring a System Reserve Task/Thread Stack Memory Above Minimum <Configuring-a-System-Reserve-Task_002fThread-Stack-Memory-Above-Minimum>`
     12972requirements *ABOVE* the minimum size required.  See `Reserve Task/Thread Stack Memory Above Minimum`_
    1291312973for more information about ``CONFIGURE_EXTRA_TASK_STACKS``.
    1291412974
     
    1332313383If the stack size specified is greater than the configured minimum,
    1332413384it must be accounted for in ``CONFIGURE_EXTRA_TASK_STACKS``.
    13325 See :ref:`Configuring a System Reserve Task/Thread Stack Memory Above Minimum <Configuring-a-System-Reserve-Task_002fThread-Stack-Memory-Above-Minimum>`
     13385See `Reserve Task/Thread Stack Memory Above Minimum`_
    1332613386for more information about ``CONFIGURE_EXTRA_TASK_STACKS``.
    1332713387
     
    1350513565has floating point support enabled.  The configuration parameter``CONFIGURE_EXTRA_TASK_STACKS`` is used to specify thread stack
    1350613566requirements *ABOVE* the minimum size required.
    13507 See :ref:`Configuring a System Reserve Task/Thread Stack Memory Above Minimum <Configuring-a-System-Reserve-Task_002fThread-Stack-Memory-Above-Minimum>`
     13567See `Reserve Task/Thread Stack Memory Above Minimum`_
    1350813568for more information about ``CONFIGURE_EXTRA_TASK_STACKS``.
    1350913569
     
    1392413984If the stack size specified is greater than the configured minimum,
    1392513985it must be accounted for in ``CONFIGURE_EXTRA_TASK_STACKS``.
    13926 See :ref:`Configuring a System Reserve Task/Thread Stack Memory Above Minimum <Configuring-a-System-Reserve-Task_002fThread-Stack-Memory-Above-Minimum>`
     13986See `Reserve Task/Thread Stack Memory Above Minimum`_
    1392713987for more information about ``CONFIGURE_EXTRA_TASK_STACKS``.
    1392813988
     
    1396514025.. COMMENT: === CONFIGURE_UNIFIED_WORK_AREAS ===
    1396614026
    13967 .. _Configuring-a-System-Separate-or-Unified-Work-Areas:
    1396814027
    1396914028Separate or Unified Work Areas
     
    1420914268.. COMMENT: === CONFIGURE_EXTRA_TASK_STACKS ===
    1421014269
    14211 .. _Configuring-a-System-Reserve-Task_002fThread-Stack-Memory-Above-Minimum:
    1421214270
    1421314271Reserve Task/Thread Stack Memory Above Minimum
     
    1454714605.. COMMENT: === CONFIGURE_MEMORY_OVERHEAD ===
    1454814606
    14549 .. _Configuring-a-System-Specify-Memory-Overhead:
    1455014607
    1455114608Specify Memory Overhead
     
    1626216319.. COMMENT: === Configuring Clustered Schedulers ===
    1626316320
    16264 .. _Configuring-a-System-Configuring-Clustered-Schedulers:
    1626516321
    1626616322Configuring Clustered Schedulers
     
    1643316489.. COMMENT: === CONFIGURE_SMP_APPLICATION ===
    1643416490
    16435 .. _Configuring-a-System-Enable-SMP-Support-for-Applications:
    1643616491
    1643716492Enable SMP Support for Applications
     
    1726517320
    1726617321- .. index:: PCI_LIB_AUTO
     17322
    1726717323  ``PCI_LIB_AUTO`` is used to enable the PCI auto configuration
    1726817324  software. PCI will be automatically probed, PCI buses enumerated, all
     
    1727417330
    1727517331- .. index:: PCI_LIB_READ
     17332
    1727617333  ``PCI_LIB_READ`` is used to enable the PCI read configuration
    1727717334  software. The current PCI configuration is read to create the RAM
     
    1728217339
    1728317340- .. index:: PCI_LIB_STATIC
     17341
    1728417342  ``PCI_LIB_STATIC`` is used to enable the PCI static configuration
    1728517343  software. The user provides a PCI tree with information how all PCI devices
     
    1729217350
    1729317351- .. index:: PCI_LIB_PERIPHERAL
     17352
    1729417353  ``PCI_LIB_PERIPHERAL`` is used to enable the PCI peripheral
    1729517354  configuration. It is similar to ``PCI_LIB_STATIC``, but it will never write
     
    1796218021
    1796318022It must be explicitly enabled via the ``--enable-smp`` configure command
    17964 line option.  To enable SMP in the application configuration see:ref:`Configuring a System Enable SMP Support for Applications <Configuring-a-System-Enable-SMP-Support-for-Applications>`.  The default
     18023line option.  To enable SMP in the application configuration see `Enable SMP Support for Applications`_.  The default
    1796518024scheduler for SMP applications supports up to 32 processors and is a global
    17966 fixed priority scheduler, see also :ref:`Configuring a System Configuring
    17967 Clustered Schedulers <Configuring-a-System-Configuring-Clustered-Schedulers>`.  For example applications see:file:`testsuites/smptests`.
     18025fixed priority scheduler, see also `Configuring Clustered Schedulers`_.  For example applications see:file:`testsuites/smptests`.
    1796818026
    1796918027*WARNING: The SMP support in RTEMS is work in progress.  Before you
     
    1813718195- message queues,
    1813818196
    18139 - semaphores using the :ref:`Semaphore Manager Priority Inheritance <Semaphore-Manager-Priority-Inheritance>`
     18197- semaphores using the `Priority Inheritance`_
    1814018198  protocol (priority boosting), and
    1814118199
    18142 - semaphores using the :ref:`Semaphore Manager Multiprocessor Resource
    18143   Sharing Protocol <Semaphore-Manager-Multiprocessor-Resource-Sharing-Protocol>` (MrsP).
     18200- semaphores using the `Multiprocessor Resource Sharing Protocol`_ (MrsP).
    1814418201
    1814518202The clustered scheduling approach enables separation of functions with
     
    1814818205inter-cluster synchronization primitives are used.  This is work in progress.
    1814918206
    18150 For the configuration of clustered schedulers see :ref:`Configuring a System
    18151 Configuring Clustered Schedulers <Configuring-a-System-Configuring-Clustered-Schedulers>`.
    18152 
    18153 To set the scheduler of a task see :ref:`Symmetric Multiprocessing Services
    18154 SCHEDULER_IDENT - Get ID of a scheduler <Symmetric-Multiprocessing-Services-SCHEDULER_005fIDENT-_002d-Get-ID-of-a-scheduler>` and :ref:`Symmetric Multiprocessing
    18155 Services TASK_SET_SCHEDULER - Set scheduler of a task <Symmetric-Multiprocessing-Services-TASK_005fSET_005fSCHEDULER-_002d-Set-scheduler-of-a-task>`.
     18207For the configuration of clustered schedulers see `Configuring Clustered Schedulers`_.
     18208
     18209To set the scheduler of a task see `SCHEDULER_IDENT - Get ID of a scheduler`_
     18210and `TASK_SET_SCHEDULER - Set scheduler of a task`_.
    1815618211
    1815718212Task Priority Queues
     
    1864618701.. COMMENT: rtems_scheduler_ident
    1864718702
    18648 .. _Symmetric-Multiprocessing-Services-SCHEDULER_005fIDENT-_002d-Get-ID-of-a-scheduler:
    1864918703
    1865018704SCHEDULER_IDENT - Get ID of a scheduler
     
    1867118725
    1867218726Identifies a scheduler by its name.  The scheduler name is determined by the
    18673 scheduler configuration.  See :ref:`Configuring a System Configuring Clustered
    18674 Schedulers <Configuring-a-System-Configuring-Clustered-Schedulers>`.
     18727scheduler configuration.  See `Configuring a System`_.
    1867518728
    1867618729**NOTES:**
     
    1874118794.. COMMENT: rtems_task_set_scheduler
    1874218795
    18743 .. _Symmetric-Multiprocessing-Services-TASK_005fSET_005fSCHEDULER-_002d-Set-scheduler-of-a-task:
    1874418796
    1874518797TASK_SET_SCHEDULER - Set scheduler of a task
     
    1919319245given to the functions is not the PCI I/O addresses, the caller must have
    1919419246translated PCI I/O addresses (available in the PCI BARs) into a BSP or host
    19195 driver custom address, see :ref:`PCI Library Access functions <PCI-Library-Access-functions>` for how
     19247driver custom address, see `Access functions`_ for how
    1919619248addresses are translated.
     19249
    1919719250.. code:: c
    1919819251
     
    1923019283In order to support non-standard big-endian PCI bus the above pci_* functions
    1923119284is required, pci_ld_le16 != ld_le16 on big endian PCI buses.
    19232 
    19233 .. _PCI-Library-Access-functions:
    1923419285
    1923519286Access functions
     
    1929719348when including bsp.h.
    1929819349
    19299 PCI device drivers may use the pci_interrupt_ routines in order to call the
     19350PCI device drivers may use the pci_interrupt_* routines in order to call the
    1930019351BSP specific functions in a platform independent way. The PCI interrupt
    1930119352interface has been made similar to the RTEMS IRQ extension so that a BSP can
     
    1934719398Recursive routines make calculating peak stack usage difficult, if not
    1934819399impossible.  Each call to the recursive routine consumes *n* bytes
    19349 of stack space.  If the routine recursives 1000 times, then``1000 * *n*`` bytes of stack space are required.
     19400of stack space.  If the routine recursives 1000 times, then ``1000 * *n*`` bytes of stack space are required.
    1935019401
    1935119402Execution
     
    1956919620
    1957019621The following is an example of the report generated:
    19571 .. code:: c
    19572 
    19573     -------------------------------------------------------------------------------
    19574     CPU USAGE BY THREAD
    19575     ------------+----------------------------------------+---------------+---------
    19576     ID         | NAME                                   | SECONDS       | PERCENT
    19577     ------------+----------------------------------------+---------------+---------
    19578     0x04010001 | IDLE                                   |             0 |   0.000
    19579     0x08010002 | TA1                                    |          1203 |   0.748
    19580     0x08010003 | TA2                                    |           203 |   0.126
    19581     0x08010004 | TA3                                    |           202 |   0.126
    19582     ------------+----------------------------------------+---------------+---------
    19583     TICKS SINCE LAST SYSTEM RESET:                                           1600
    19584     TOTAL UNITS:                                                             1608
    19585     -------------------------------------------------------------------------------
     19622
     19623
     19624+------------------------------------------------------------------------------+
     19625|CPU USAGE BY THREAD                                                           |
     19626+-----------+----------------------------------------+-------------------------+
     19627|ID         | NAME                                   | SECONDS       | PERCENT |
     19628+-----------+----------------------------------------+---------------+---------+
     19629|0x04010001 | IDLE                                   |             0 |   0.000 |
     19630+-----------+----------------------------------------+---------------+---------+
     19631|0x08010002 | TA1                                    |          1203 |   0.748 |
     19632+-----------+----------------------------------------+---------------+---------+
     19633|0x08010003 | TA2                                    |           203 |   0.126 |
     19634+-----------+----------------------------------------+---------------+---------+
     19635|0x08010004 | TA3                                    |           202 |   0.126 |
     19636+-----------+----------------------------------------+---------------+---------+
     19637|TICKS SINCE LAST SYSTEM RESET:                                           1600 |
     19638|TOTAL UNITS:                                                             1608 |
     19639+------------------------------------------------------------------------------+
    1958619640
    1958719641Notice that the "TOTAL UNITS" is greater than the ticks per reset.
     
    2237422428
    2237522429.. COMMENT: All rights reserved.
    22376 
    22377 .. _Linker-Sets:
    2237822430
    2237922431Linker Sets
     
    2353723589    context to store its internal state.  Each processor in the system is owned by
    2353823590    at most one scheduler instance.  The processor to scheduler instance assignment
    23539     is determined at application configuration time.  See :ref:`Configuring a System
    23540     Configuring Clustered Schedulers <Configuring-a-System-Configuring-Clustered-Schedulers>`.
     23591    is determined at application configuration time.  See `Configuring a System`_.
    2354123592
    2354223593:dfn:`segments`
Note: See TracChangeset for help on using the changeset viewer.