[f3f06f79] | 1 | -- |
---|
| 2 | -- RTEMS / Specification |
---|
| 3 | -- |
---|
| 4 | -- DESCRIPTION: |
---|
| 5 | -- |
---|
| 6 | -- This package provides the interface to the RTEMS API. |
---|
| 7 | -- |
---|
| 8 | -- DEPENDENCIES: |
---|
| 9 | -- |
---|
[a6ec372] | 10 | -- NOTES: |
---|
| 11 | -- RTEMS initialization and configuration are called from |
---|
| 12 | -- the BSP side, therefore should never be called from ADA. |
---|
[f3f06f79] | 13 | -- |
---|
[a6ec372] | 14 | -- COPYRIGHT (c) 1997-2007. |
---|
[f3f06f79] | 15 | -- On-Line Applications Research Corporation (OAR). |
---|
| 16 | -- |
---|
[d348ad96] | 17 | -- The license and distribution terms for this file may in |
---|
| 18 | -- the file LICENSE in this distribution or at |
---|
[dcdb62d] | 19 | -- http://www.rtems.com/license/LICENSE. |
---|
[d348ad96] | 20 | -- |
---|
[a6ec372] | 21 | -- rtems.ads,v 1.19.2.2 2003/11/25 14:07:32 joel Exp |
---|
[d348ad96] | 22 | -- |
---|
[f3f06f79] | 23 | |
---|
| 24 | with System; |
---|
[a6b44a8a] | 25 | with System.Storage_Elements; use System.Storage_Elements; |
---|
[f3f06f79] | 26 | with Interfaces; |
---|
| 27 | with Interfaces.C; |
---|
| 28 | |
---|
| 29 | package RTEMS is |
---|
[7003847] | 30 | pragma Elaborate_Body (RTEMS); |
---|
[f3f06f79] | 31 | |
---|
[d348ad96] | 32 | Structure_Alignment : constant := 8; |
---|
[a6b44a8a] | 33 | |
---|
[f3f06f79] | 34 | -- |
---|
| 35 | -- RTEMS Base Types |
---|
| 36 | -- |
---|
| 37 | |
---|
| 38 | subtype Unsigned8 is Interfaces.Unsigned_8; |
---|
| 39 | subtype Unsigned16 is Interfaces.Unsigned_16; |
---|
| 40 | subtype Unsigned32 is Interfaces.Unsigned_32; |
---|
[7003847] | 41 | subtype Signed32 is Interfaces.Integer_32; |
---|
[f3f06f79] | 42 | |
---|
| 43 | type Unsigned32_Pointer is access all RTEMS.Unsigned32; |
---|
| 44 | type Unsigned16_Pointer is access all RTEMS.Unsigned16; |
---|
| 45 | type Unsigned8_Pointer is access all RTEMS.Unsigned8; |
---|
[7003847] | 46 | type Signed32_Pointer is access all RTEMS.Signed32; |
---|
[f3f06f79] | 47 | |
---|
| 48 | subtype Boolean is RTEMS.Unsigned32; |
---|
| 49 | subtype Address is System.Address; |
---|
| 50 | subtype Single is Interfaces.C.C_float; |
---|
| 51 | subtype Double is Interfaces.C.Double; |
---|
| 52 | |
---|
| 53 | -- |
---|
| 54 | -- The following define the size of each of the base types in |
---|
| 55 | -- both bits and system units. |
---|
| 56 | -- |
---|
| 57 | |
---|
| 58 | Unsigned8_Bits : constant := 7; |
---|
| 59 | Unsigned16_Bits : constant := 15; |
---|
| 60 | Unsigned32_Bits : constant := 31; |
---|
| 61 | Boolean_Bits : constant := 31; |
---|
| 62 | Address_Bits : constant := 31; |
---|
| 63 | Single_Bits : constant := 31; |
---|
| 64 | Double_Bits : constant := 63; |
---|
| 65 | |
---|
| 66 | Unsigned8_Units : constant := 1; |
---|
| 67 | Unsigned16_Units : constant := 2; |
---|
| 68 | Unsigned32_Units : constant := 4; |
---|
| 69 | Boolean_Units : constant := 4; |
---|
| 70 | Address_Units : constant := 4; |
---|
| 71 | Single_Units : constant := 4; |
---|
| 72 | Double_Units : constant := 8; |
---|
| 73 | |
---|
[a6b44a8a] | 74 | Null_Address : constant RTEMS.Address := |
---|
| 75 | System.Storage_Elements.To_Address(0); |
---|
| 76 | |
---|
[87e951a2] | 77 | True : constant RTEMS.Boolean := 1; |
---|
| 78 | False : constant RTEMS.Boolean := 0; |
---|
| 79 | |
---|
[d14963b] | 80 | -- |
---|
[f3f06f79] | 81 | -- More Types |
---|
| 82 | -- |
---|
| 83 | |
---|
| 84 | subtype Name is RTEMS.Unsigned32; |
---|
| 85 | subtype ID is RTEMS.Unsigned32; |
---|
| 86 | subtype Interval is RTEMS.Unsigned32; |
---|
| 87 | subtype Attribute is RTEMS.Unsigned32; |
---|
| 88 | subtype Mode is RTEMS.Unsigned32; |
---|
| 89 | subtype Option is RTEMS.Unsigned32; |
---|
| 90 | subtype Task_Priority is RTEMS.Unsigned32; |
---|
[d348ad96] | 91 | subtype Notepad_Index is RTEMS.Unsigned32 range 0 .. 15; |
---|
[f3f06f79] | 92 | |
---|
| 93 | subtype Event_Set is RTEMS.Unsigned32; |
---|
| 94 | subtype Signal_Set is RTEMS.Unsigned32; |
---|
| 95 | subtype Debug_Set is RTEMS.Unsigned32; |
---|
| 96 | subtype Device_Major_Number is RTEMS.Unsigned32; |
---|
| 97 | subtype Device_Minor_Number is RTEMS.Unsigned32; |
---|
| 98 | subtype ISR_Level is RTEMS.Unsigned32; |
---|
| 99 | |
---|
| 100 | subtype Node is RTEMS.Unsigned32; |
---|
| 101 | |
---|
| 102 | -- |
---|
| 103 | -- Task Related Types |
---|
[d14963b] | 104 | -- |
---|
| 105 | |
---|
[f3f06f79] | 106 | subtype Task_Argument is RTEMS.Unsigned32; |
---|
| 107 | type Task_Argument_PTR is access all Task_Argument; |
---|
| 108 | |
---|
| 109 | type Task_Entry is access procedure ( |
---|
| 110 | Argument : RTEMS.Unsigned32 |
---|
| 111 | ); |
---|
| 112 | |
---|
[d14963b] | 113 | subtype TCB is RTEMS.Unsigned32; |
---|
| 114 | type TCB_Pointer is access all RTEMS.TCB; |
---|
| 115 | |
---|
[f3f06f79] | 116 | -- |
---|
| 117 | -- Clock and Time of Day Types |
---|
| 118 | -- |
---|
| 119 | |
---|
| 120 | type Time_Of_Day is |
---|
| 121 | record |
---|
| 122 | Year : RTEMS.Unsigned32; -- year, A.D. |
---|
| 123 | Month : RTEMS.Unsigned32; -- month, 1 .. 12 |
---|
| 124 | Day : RTEMS.Unsigned32; -- day, 1 .. 31 |
---|
| 125 | Hour : RTEMS.Unsigned32; -- hour, 0 .. 23 |
---|
| 126 | Minute : RTEMS.Unsigned32; -- minute, 0 .. 59 |
---|
| 127 | Second : RTEMS.Unsigned32; -- second, 0 .. 59 |
---|
| 128 | Ticks : RTEMS.Unsigned32; -- elapsed ticks between seconds |
---|
| 129 | end record; |
---|
| 130 | |
---|
| 131 | type Clock_Time_Value is |
---|
| 132 | record |
---|
| 133 | Seconds : RTEMS.Unsigned32; |
---|
| 134 | Microseconds : RTEMS.Unsigned32; |
---|
| 135 | end record; |
---|
| 136 | |
---|
| 137 | type Clock_Get_Options is ( |
---|
| 138 | Clock_Get_TOD, |
---|
| 139 | Clock_Get_Seconds_Since_Epoch, |
---|
| 140 | Clock_Get_Ticks_Since_Boot, |
---|
| 141 | Clock_Get_Ticks_Per_Seconds, |
---|
| 142 | Clock_Get_Time_Value |
---|
| 143 | ); |
---|
| 144 | |
---|
| 145 | -- |
---|
| 146 | -- Ident Options |
---|
| 147 | -- |
---|
| 148 | |
---|
[a6ec372] | 149 | Search_All_Nodes : constant RTEMS.Node := 0; |
---|
| 150 | Search_Other_Nodes : constant RTEMS.Node := 16#7FFFFFFE#; |
---|
| 151 | Search_Local_Node : constant RTEMS.Node := 16#7FFFFFFF#; |
---|
| 152 | Who_Am_I : constant RTEMS.Node := 0; |
---|
[f3f06f79] | 153 | |
---|
| 154 | -- |
---|
| 155 | -- Options |
---|
| 156 | -- |
---|
| 157 | |
---|
| 158 | Default_Options : constant RTEMS.Option := 16#0000#; |
---|
| 159 | |
---|
| 160 | Wait : constant RTEMS.Option := 16#0000#; |
---|
| 161 | No_Wait : constant RTEMS.Option := 16#0001#; |
---|
| 162 | |
---|
| 163 | Event_All : constant RTEMS.Option := 16#0000#; |
---|
| 164 | Event_Any : constant RTEMS.Option := 16#0002#; |
---|
| 165 | |
---|
| 166 | -- |
---|
| 167 | -- Mode constants |
---|
| 168 | -- |
---|
| 169 | |
---|
| 170 | Default_Modes : constant RTEMS.Mode := 16#0000#; |
---|
| 171 | |
---|
[d766b7fd] | 172 | All_Mode_Masks : constant RTEMS.Mode := 16#0000_ffff#; |
---|
| 173 | Current_Mode : constant RTEMS.Mode := 16#0000_0000#; |
---|
| 174 | Preempt_Mask : constant RTEMS.Mode := 16#0000_0100#; |
---|
| 175 | Timeslice_Mask : constant RTEMS.Mode := 16#0000_0200#; |
---|
| 176 | ASR_Mask : constant RTEMS.Mode := 16#0000_0400#; |
---|
[7e3dcbc] | 177 | Interrupt_Mask : RTEMS.Mode; |
---|
[d766b7fd] | 178 | Preempt : constant RTEMS.Mode := 16#0000_0000#; |
---|
| 179 | No_Preempt : constant RTEMS.Mode := 16#0000_0100#; |
---|
| 180 | No_Timeslice : constant RTEMS.Mode := 16#0000_0000#; |
---|
| 181 | Timeslice : constant RTEMS.Mode := 16#0000_0200#; |
---|
| 182 | ASR : constant RTEMS.Mode := 16#0000_0000#; |
---|
| 183 | No_ASR : constant RTEMS.Mode := 16#0000_0400#; |
---|
| 184 | |
---|
[7e3dcbc] | 185 | pragma Import (C, Interrupt_Mask, "rtems_interrupt_mask"); |
---|
| 186 | |
---|
[f3f06f79] | 187 | -- |
---|
| 188 | -- Attribute constants |
---|
| 189 | -- |
---|
| 190 | |
---|
[a6ec372] | 191 | Default_Attributes : constant RTEMS.Attribute := 16#00000000#; |
---|
| 192 | No_Floating_Point : constant RTEMS.Attribute := 16#00000000#; |
---|
| 193 | Floating_Point : constant RTEMS.Attribute := 16#00000001#; |
---|
| 194 | Local : constant RTEMS.Attribute := 16#00000000#; |
---|
| 195 | Global : constant RTEMS.Attribute := 16#00000002#; |
---|
| 196 | FIFO : constant RTEMS.Attribute := 16#00000000#; |
---|
| 197 | Priority : constant RTEMS.Attribute := 16#00000004#; |
---|
| 198 | Counting_Semaphore : constant RTEMS.Attribute := 16#00000000#; |
---|
| 199 | Binary_Semaphore : constant RTEMS.Attribute := 16#00000010#; |
---|
| 200 | Simple_Binary_Semaphore : constant RTEMS.Attribute := 16#00000020#; |
---|
| 201 | No_Inherit_Priority : constant RTEMS.Attribute := 16#00000000#; |
---|
| 202 | Inherit_Priority : constant RTEMS.Attribute := 16#00000040#; |
---|
| 203 | No_Priority_Ceiling : constant RTEMS.Attribute := 16#00000000#; |
---|
| 204 | Priority_Ceiling : constant RTEMS.Attribute := 16#00000080#; |
---|
[f3f06f79] | 205 | |
---|
| 206 | function Interrupt_Level ( |
---|
| 207 | Level : in RTEMS.Unsigned32 |
---|
| 208 | ) return RTEMS.Attribute; |
---|
[7e3dcbc] | 209 | pragma Import (C, Interrupt_Level, "rtems_interrupt_level_attribute"); |
---|
[d766b7fd] | 210 | |
---|
| 211 | Minimum_Stack_Size : RTEMS.Unsigned32; |
---|
| 212 | pragma Import (C, Minimum_Stack_Size, "rtems_minimum_stack_size"); |
---|
| 213 | |
---|
[f3f06f79] | 214 | -- |
---|
| 215 | -- Notepad index constants |
---|
| 216 | -- |
---|
| 217 | |
---|
| 218 | Notepad_0 : constant RTEMS.Unsigned32 := 0; |
---|
| 219 | Notepad_1 : constant RTEMS.Unsigned32 := 1; |
---|
| 220 | Notepad_2 : constant RTEMS.Unsigned32 := 2; |
---|
| 221 | Notepad_3 : constant RTEMS.Unsigned32 := 3; |
---|
| 222 | Notepad_4 : constant RTEMS.Unsigned32 := 4; |
---|
| 223 | Notepad_5 : constant RTEMS.Unsigned32 := 5; |
---|
| 224 | Notepad_6 : constant RTEMS.Unsigned32 := 6; |
---|
| 225 | Notepad_7 : constant RTEMS.Unsigned32 := 7; |
---|
| 226 | Notepad_8 : constant RTEMS.Unsigned32 := 8; |
---|
| 227 | Notepad_9 : constant RTEMS.Unsigned32 := 9; |
---|
| 228 | Notepad_10 : constant RTEMS.Unsigned32 := 10; |
---|
| 229 | Notepad_11 : constant RTEMS.Unsigned32 := 11; |
---|
| 230 | Notepad_12 : constant RTEMS.Unsigned32 := 12; |
---|
| 231 | Notepad_13 : constant RTEMS.Unsigned32 := 13; |
---|
| 232 | Notepad_14 : constant RTEMS.Unsigned32 := 14; |
---|
| 233 | Notepad_15 : constant RTEMS.Unsigned32 := 15; |
---|
| 234 | |
---|
| 235 | -- |
---|
| 236 | -- Miscellaneous |
---|
| 237 | -- |
---|
| 238 | |
---|
| 239 | No_Timeout : constant RTEMS.Interval := 0; |
---|
| 240 | Self : constant RTEMS.ID := 0; |
---|
| 241 | Period_Status : constant RTEMS.Interval := 0; |
---|
| 242 | Yield_Processor : constant RTEMS.Interval := 0; |
---|
| 243 | Current_Priority : constant RTEMS.Task_Priority := 0; |
---|
[d348ad96] | 244 | No_Priority : constant RTEMS.Task_Priority := 0; |
---|
[f3f06f79] | 245 | |
---|
| 246 | -- |
---|
| 247 | -- Extension Callouts and Table |
---|
| 248 | -- |
---|
| 249 | |
---|
[d14963b] | 250 | type Thread_Create_Extension is access function ( |
---|
[f3f06f79] | 251 | Current_Task : in RTEMS.TCB_Pointer; |
---|
| 252 | New_Task : in RTEMS.TCB_Pointer |
---|
[d14963b] | 253 | ) return RTEMS.Boolean; |
---|
[f3f06f79] | 254 | |
---|
| 255 | type Thread_Start_Extension is access procedure ( |
---|
| 256 | Current_Task : in RTEMS.TCB_Pointer; |
---|
| 257 | Started_Task : in RTEMS.TCB_Pointer |
---|
| 258 | ); |
---|
| 259 | |
---|
| 260 | type Thread_Restart_Extension is access procedure ( |
---|
| 261 | Current_Task : in RTEMS.TCB_Pointer; |
---|
| 262 | Restarted_Task : in RTEMS.TCB_Pointer |
---|
| 263 | ); |
---|
| 264 | |
---|
| 265 | type Thread_Delete_Extension is access procedure ( |
---|
| 266 | Current_Task : in RTEMS.TCB_Pointer; |
---|
| 267 | Deleted_Task : in RTEMS.TCB_Pointer |
---|
| 268 | ); |
---|
| 269 | |
---|
| 270 | type Thread_Switch_Extension is access procedure ( |
---|
| 271 | Current_Task : in RTEMS.TCB_Pointer; |
---|
| 272 | Heir_Task : in RTEMS.TCB_Pointer |
---|
| 273 | ); |
---|
| 274 | |
---|
| 275 | type Thread_Post_Switch_Extension is access procedure ( |
---|
| 276 | Current_Task : in RTEMS.TCB_Pointer |
---|
| 277 | ); |
---|
| 278 | |
---|
| 279 | type Thread_Begin_Extension is access procedure ( |
---|
| 280 | Current_Task : in RTEMS.TCB_Pointer |
---|
| 281 | ); |
---|
| 282 | |
---|
| 283 | type Thread_Exitted_Extension is access procedure ( |
---|
| 284 | Current_Task : in RTEMS.TCB_Pointer |
---|
| 285 | ); |
---|
| 286 | |
---|
| 287 | type Fatal_Error_Extension is access procedure ( |
---|
| 288 | Error : in RTEMS.Unsigned32 |
---|
| 289 | ); |
---|
| 290 | |
---|
[7e3dcbc] | 291 | type Extensions_Table is |
---|
[f3f06f79] | 292 | record |
---|
| 293 | Thread_Create : RTEMS.Thread_Create_Extension; |
---|
| 294 | Thread_Start : RTEMS.Thread_Start_Extension; |
---|
| 295 | Thread_Restart : RTEMS.Thread_Restart_Extension; |
---|
| 296 | Thread_Delete : RTEMS.Thread_Delete_Extension; |
---|
| 297 | Thread_Switch : RTEMS.Thread_Switch_Extension; |
---|
| 298 | Thread_Post_Switch : RTEMS.Thread_Post_Switch_Extension; |
---|
| 299 | Thread_Begin : RTEMS.Thread_Begin_Extension; |
---|
| 300 | Thread_Exitted : RTEMS.Thread_Exitted_Extension; |
---|
| 301 | Fatal : RTEMS.Fatal_Error_Extension; |
---|
| 302 | end record; |
---|
| 303 | |
---|
| 304 | type Extensions_Table_Pointer is access all Extensions_Table; |
---|
| 305 | |
---|
| 306 | -- |
---|
| 307 | -- The following type define a pointer to a watchdog/timer service routine. |
---|
| 308 | -- |
---|
| 309 | |
---|
| 310 | type Timer_Service_Routine is access procedure ( |
---|
| 311 | ID : in RTEMS.ID; |
---|
| 312 | User_Data : in RTEMS.Address |
---|
| 313 | ); |
---|
| 314 | |
---|
| 315 | -- |
---|
| 316 | -- The following type define a pointer to a signal service routine. |
---|
| 317 | -- |
---|
| 318 | |
---|
| 319 | type ASR_Handler is access procedure ( |
---|
| 320 | Signals : in RTEMS.Signal_Set |
---|
| 321 | ); |
---|
| 322 | |
---|
| 323 | -- |
---|
| 324 | -- The following type defines the status information returned |
---|
| 325 | -- about a period. |
---|
| 326 | -- |
---|
| 327 | |
---|
| 328 | type Rate_Monotonic_Period_States is ( |
---|
| 329 | Inactive, -- off chain, never initialized |
---|
| 330 | Owner_Is_Blocking, -- on chain, owner is blocking on it |
---|
| 331 | Active, -- on chain, running continuously |
---|
| 332 | Expired_While_Blocking, -- on chain, expired while owner was was blocking |
---|
| 333 | Expired -- off chain, will be reset by next |
---|
| 334 | -- rtems_rate_monotonic_period |
---|
| 335 | ); |
---|
| 336 | |
---|
| 337 | for Rate_Monotonic_Period_States'Size use 32; |
---|
| 338 | |
---|
| 339 | for Rate_Monotonic_Period_States use ( |
---|
| 340 | Inactive => 0, |
---|
| 341 | Owner_Is_Blocking => 1, |
---|
| 342 | Active => 2, |
---|
| 343 | Expired_While_Blocking => 3, |
---|
| 344 | Expired => 4 |
---|
| 345 | ); |
---|
[d766b7fd] | 346 | |
---|
[f3f06f79] | 347 | type Rate_Monotonic_Period_Status is |
---|
| 348 | record |
---|
| 349 | State : RTEMS.Rate_Monotonic_Period_States; |
---|
| 350 | Ticks_Since_Last_Period : RTEMS.Unsigned32; |
---|
| 351 | Ticks_Executed_Since_Last_Period : RTEMS.Unsigned32; |
---|
| 352 | end record; |
---|
| 353 | |
---|
| 354 | -- |
---|
| 355 | -- Method Completions Status Codes |
---|
| 356 | -- |
---|
| 357 | |
---|
| 358 | type Status_Codes is ( |
---|
| 359 | Successful, -- successful completion |
---|
| 360 | Task_Exitted, -- returned from a task |
---|
| 361 | MP_Not_Configured, -- multiprocessing not configured |
---|
| 362 | Invalid_Name, -- invalid object name |
---|
| 363 | Invalid_ID, -- invalid object id |
---|
| 364 | Too_Many, -- too many |
---|
| 365 | Timeout, -- timed out waiting |
---|
| 366 | Object_Was_Deleted, -- object deleted while waiting |
---|
| 367 | Invalid_Size, -- specified size was invalid |
---|
| 368 | Invalid_Address, -- address specified is invalid |
---|
| 369 | Invalid_Number, -- number was invalid |
---|
| 370 | Not_Defined, -- item has not been initialized |
---|
| 371 | Resource_In_Use, -- resources still outstanding |
---|
| 372 | Unsatisfied, -- request not satisfied |
---|
| 373 | Incorrect_State, -- task is in wrong state |
---|
| 374 | Already_Suspended, -- task already in state |
---|
| 375 | Illegal_On_Self, -- illegal on calling task |
---|
| 376 | Illegal_On_Remote_Object, -- illegal for remote object |
---|
| 377 | Called_From_ISR, -- called from wrong environment |
---|
| 378 | Invalid_Priority, -- invalid task priority |
---|
| 379 | Invalid_Clock, -- invalid date/time |
---|
| 380 | Invalid_Node, -- invalid node id |
---|
| 381 | Not_Configured, -- directive not configured |
---|
| 382 | Not_Owner_Of_Resource, -- not owner of resource |
---|
| 383 | Not_Implemented, -- directive not implemented |
---|
| 384 | Internal_Error, -- RTEMS inconsistency detected |
---|
[b47be20] | 385 | No_Memory, -- no memory left in heap |
---|
| 386 | IO_Error, -- driver IO error |
---|
[8959fcc] | 387 | Proxy_Blocking -- internal multiprocessing only |
---|
[f3f06f79] | 388 | ); |
---|
| 389 | |
---|
| 390 | for Status_Codes'Size use 32; |
---|
| 391 | |
---|
| 392 | for Status_Codes use ( |
---|
| 393 | Successful => 0, |
---|
| 394 | Task_Exitted => 1, |
---|
| 395 | MP_Not_Configured => 2, |
---|
| 396 | Invalid_Name => 3, |
---|
| 397 | Invalid_ID => 4, |
---|
| 398 | Too_Many => 5, |
---|
| 399 | Timeout => 6, |
---|
| 400 | Object_Was_Deleted => 7, |
---|
| 401 | Invalid_Size => 8, |
---|
| 402 | Invalid_Address => 9, |
---|
| 403 | Invalid_NumbeR => 10, |
---|
| 404 | Not_Defined => 11, |
---|
| 405 | Resource_In_Use => 12, |
---|
| 406 | Unsatisfied => 13, |
---|
| 407 | Incorrect_State => 14, |
---|
| 408 | Already_Suspended => 15, |
---|
| 409 | Illegal_On_Self => 16, |
---|
| 410 | Illegal_On_Remote_Object => 17, |
---|
| 411 | Called_From_ISR => 18, |
---|
| 412 | Invalid_Priority => 19, |
---|
| 413 | Invalid_Clock => 20, |
---|
| 414 | Invalid_Node => 21, |
---|
| 415 | Not_Configured => 22, |
---|
| 416 | Not_Owner_Of_Resource => 23, |
---|
| 417 | Not_ImplementeD => 24, |
---|
| 418 | Internal_Error => 25, |
---|
[b47be20] | 419 | No_Memory => 26, |
---|
| 420 | IO_Error => 27, |
---|
| 421 | Proxy_Blocking => 28 |
---|
[f3f06f79] | 422 | ); |
---|
| 423 | |
---|
| 424 | -- |
---|
| 425 | -- RTEMS Events |
---|
| 426 | -- |
---|
| 427 | |
---|
[4c3340c] | 428 | Pending_Events : constant RTEMS.Event_Set := 16#0000_0000#; |
---|
| 429 | All_Events : constant RTEMS.Event_Set := 16#FFFF_FFFF#; |
---|
| 430 | Event_0 : constant RTEMS.Event_Set := 16#0000_0001#; |
---|
| 431 | Event_1 : constant RTEMS.Event_Set := 16#0000_0002#; |
---|
| 432 | Event_2 : constant RTEMS.Event_Set := 16#0000_0004#; |
---|
| 433 | Event_3 : constant RTEMS.Event_Set := 16#0000_0008#; |
---|
| 434 | Event_4 : constant RTEMS.Event_Set := 16#0000_0010#; |
---|
| 435 | Event_5 : constant RTEMS.Event_Set := 16#0000_0020#; |
---|
| 436 | Event_6 : constant RTEMS.Event_Set := 16#0000_0040#; |
---|
| 437 | Event_7 : constant RTEMS.Event_Set := 16#0000_0080#; |
---|
| 438 | Event_8 : constant RTEMS.Event_Set := 16#0000_0100#; |
---|
| 439 | Event_9 : constant RTEMS.Event_Set := 16#0000_0200#; |
---|
| 440 | Event_10 : constant RTEMS.Event_Set := 16#0000_0400#; |
---|
| 441 | Event_11 : constant RTEMS.Event_Set := 16#0000_0800#; |
---|
| 442 | Event_12 : constant RTEMS.Event_Set := 16#0000_1000#; |
---|
| 443 | Event_13 : constant RTEMS.Event_Set := 16#0000_2000#; |
---|
| 444 | Event_14 : constant RTEMS.Event_Set := 16#0000_4000#; |
---|
| 445 | Event_15 : constant RTEMS.Event_Set := 16#0000_8000#; |
---|
| 446 | Event_16 : constant RTEMS.Event_Set := 16#0001_0000#; |
---|
| 447 | Event_17 : constant RTEMS.Event_Set := 16#0002_0000#; |
---|
| 448 | Event_18 : constant RTEMS.Event_Set := 16#0004_0000#; |
---|
| 449 | Event_19 : constant RTEMS.Event_Set := 16#0008_0000#; |
---|
| 450 | Event_20 : constant RTEMS.Event_Set := 16#0010_0000#; |
---|
| 451 | Event_21 : constant RTEMS.Event_Set := 16#0020_0000#; |
---|
| 452 | Event_22 : constant RTEMS.Event_Set := 16#0040_0000#; |
---|
| 453 | Event_23 : constant RTEMS.Event_Set := 16#0080_0000#; |
---|
| 454 | Event_24 : constant RTEMS.Event_Set := 16#0100_0000#; |
---|
| 455 | Event_25 : constant RTEMS.Event_Set := 16#0200_0000#; |
---|
| 456 | Event_26 : constant RTEMS.Event_Set := 16#0400_0000#; |
---|
| 457 | Event_27 : constant RTEMS.Event_Set := 16#0800_0000#; |
---|
| 458 | Event_28 : constant RTEMS.Event_Set := 16#1000_0000#; |
---|
| 459 | Event_29 : constant RTEMS.Event_Set := 16#2000_0000#; |
---|
| 460 | Event_30 : constant RTEMS.Event_Set := 16#4000_0000#; |
---|
| 461 | Event_31 : constant RTEMS.Event_Set := 16#8000_0000#; |
---|
[f3f06f79] | 462 | |
---|
[a6b44a8a] | 463 | -- |
---|
| 464 | -- RTEMS Signals |
---|
| 465 | -- |
---|
| 466 | |
---|
| 467 | All_Signals : constant RTEMS.Signal_Set := 16#7FFFFFFF#; |
---|
| 468 | Signal_0 : constant RTEMS.Signal_Set := 16#00000001#; |
---|
| 469 | Signal_1 : constant RTEMS.Signal_Set := 16#00000002#; |
---|
| 470 | Signal_2 : constant RTEMS.Signal_Set := 16#00000004#; |
---|
| 471 | Signal_3 : constant RTEMS.Signal_Set := 16#00000008#; |
---|
| 472 | Signal_4 : constant RTEMS.Signal_Set := 16#00000010#; |
---|
| 473 | Signal_5 : constant RTEMS.Signal_Set := 16#00000020#; |
---|
| 474 | Signal_6 : constant RTEMS.Signal_Set := 16#00000040#; |
---|
| 475 | Signal_7 : constant RTEMS.Signal_Set := 16#00000080#; |
---|
| 476 | Signal_8 : constant RTEMS.Signal_Set := 16#00000100#; |
---|
| 477 | Signal_9 : constant RTEMS.Signal_Set := 16#00000200#; |
---|
| 478 | Signal_10 : constant RTEMS.Signal_Set := 16#00000400#; |
---|
| 479 | Signal_11 : constant RTEMS.Signal_Set := 16#00000800#; |
---|
| 480 | Signal_12 : constant RTEMS.Signal_Set := 16#00001000#; |
---|
| 481 | Signal_13 : constant RTEMS.Signal_Set := 16#00002000#; |
---|
| 482 | Signal_14 : constant RTEMS.Signal_Set := 16#00004000#; |
---|
| 483 | Signal_15 : constant RTEMS.Signal_Set := 16#00008000#; |
---|
| 484 | Signal_16 : constant RTEMS.Signal_Set := 16#00010000#; |
---|
| 485 | Signal_17 : constant RTEMS.Signal_Set := 16#00020000#; |
---|
| 486 | Signal_18 : constant RTEMS.Signal_Set := 16#00040000#; |
---|
| 487 | Signal_19 : constant RTEMS.Signal_Set := 16#00080000#; |
---|
| 488 | Signal_20 : constant RTEMS.Signal_Set := 16#00100000#; |
---|
| 489 | Signal_21 : constant RTEMS.Signal_Set := 16#00200000#; |
---|
| 490 | Signal_22 : constant RTEMS.Signal_Set := 16#00400000#; |
---|
| 491 | Signal_23 : constant RTEMS.Signal_Set := 16#00800000#; |
---|
| 492 | Signal_24 : constant RTEMS.Signal_Set := 16#01000000#; |
---|
| 493 | Signal_25 : constant RTEMS.Signal_Set := 16#02000000#; |
---|
| 494 | Signal_26 : constant RTEMS.Signal_Set := 16#04000000#; |
---|
| 495 | Signal_27 : constant RTEMS.Signal_Set := 16#08000000#; |
---|
| 496 | Signal_28 : constant RTEMS.Signal_Set := 16#10000000#; |
---|
| 497 | Signal_29 : constant RTEMS.Signal_Set := 16#20000000#; |
---|
| 498 | Signal_30 : constant RTEMS.Signal_Set := 16#40000000#; |
---|
| 499 | Signal_31 : constant RTEMS.Signal_Set := 16#80000000#; |
---|
| 500 | |
---|
[f3f06f79] | 501 | -- |
---|
| 502 | -- Utility Functions |
---|
| 503 | -- |
---|
| 504 | |
---|
| 505 | function From_Ada_Boolean ( |
---|
| 506 | Ada_Boolean : Standard.Boolean |
---|
| 507 | ) return RTEMS.Boolean; |
---|
| 508 | |
---|
| 509 | function To_Ada_Boolean ( |
---|
| 510 | RTEMS_Boolean : RTEMS.Boolean |
---|
| 511 | ) return Standard.Boolean; |
---|
| 512 | |
---|
| 513 | function Milliseconds_To_Microseconds ( |
---|
| 514 | Milliseconds : RTEMS.Unsigned32 |
---|
| 515 | ) return RTEMS.Unsigned32; |
---|
| 516 | |
---|
| 517 | function Microseconds_To_Ticks ( |
---|
| 518 | Microseconds : RTEMS.Unsigned32 |
---|
| 519 | ) return RTEMS.Interval; |
---|
| 520 | |
---|
[bb566a02] | 521 | function Milliseconds_To_Ticks ( |
---|
| 522 | Milliseconds : RTEMS.Unsigned32 |
---|
| 523 | ) return RTEMS.Interval; |
---|
| 524 | |
---|
[f3f06f79] | 525 | function Build_Name ( |
---|
| 526 | C1 : in Character; |
---|
| 527 | C2 : in Character; |
---|
| 528 | C3 : in Character; |
---|
| 529 | C4 : in Character |
---|
| 530 | ) return RTEMS.Name; |
---|
| 531 | |
---|
| 532 | procedure Name_To_Characters ( |
---|
| 533 | Name : in RTEMS.Name; |
---|
| 534 | C1 : out Character; |
---|
| 535 | C2 : out Character; |
---|
| 536 | C3 : out Character; |
---|
| 537 | C4 : out Character |
---|
| 538 | ); |
---|
| 539 | |
---|
| 540 | function Get_Node ( |
---|
| 541 | ID : in RTEMS.ID |
---|
| 542 | ) return RTEMS.Unsigned32; |
---|
| 543 | |
---|
| 544 | function Get_Index ( |
---|
| 545 | ID : in RTEMS.ID |
---|
| 546 | ) return RTEMS.Unsigned32; |
---|
| 547 | |
---|
| 548 | function Are_Statuses_Equal ( |
---|
| 549 | Status : in RTEMS.Status_Codes; |
---|
| 550 | Desired : in RTEMS.Status_Codes |
---|
| 551 | ) return Standard.Boolean; |
---|
| 552 | |
---|
[a6b44a8a] | 553 | function Is_Status_Successful ( |
---|
| 554 | Status : in RTEMS.Status_Codes |
---|
| 555 | ) return Standard.Boolean; |
---|
| 556 | |
---|
[d348ad96] | 557 | function Subtract ( |
---|
| 558 | Left : in RTEMS.Address; |
---|
| 559 | Right : in RTEMS.Address |
---|
| 560 | ) return RTEMS.Unsigned32; |
---|
| 561 | |
---|
[6666ea88] | 562 | function Are_Equal ( |
---|
| 563 | Left : in RTEMS.Address; |
---|
| 564 | Right : in RTEMS.Address |
---|
| 565 | ) return Standard.Boolean; |
---|
[d14963b] | 566 | |
---|
| 567 | |
---|
[f3f06f79] | 568 | -- |
---|
| 569 | -- RTEMS API |
---|
| 570 | -- |
---|
| 571 | |
---|
[f10fe707] | 572 | -- |
---|
| 573 | -- Initialization Manager -- Shutdown Only |
---|
| 574 | -- |
---|
| 575 | procedure Shutdown_Executive ( |
---|
| 576 | Status : in RTEMS.Unsigned32 |
---|
| 577 | ); |
---|
| 578 | |
---|
[f3f06f79] | 579 | -- |
---|
| 580 | -- Task Manager |
---|
| 581 | -- |
---|
| 582 | |
---|
| 583 | procedure Task_Create ( |
---|
| 584 | Name : in RTEMS.Name; |
---|
| 585 | Initial_Priority : in RTEMS.Task_Priority; |
---|
| 586 | Stack_Size : in Unsigned32; |
---|
| 587 | Initial_Modes : in RTEMS.Mode; |
---|
| 588 | Attribute_Set : in RTEMS.Attribute; |
---|
| 589 | ID : out RTEMS.ID; |
---|
| 590 | Result : out RTEMS.Status_Codes |
---|
| 591 | ); |
---|
| 592 | |
---|
| 593 | procedure Task_Ident ( |
---|
| 594 | Name : in RTEMS.Name; |
---|
| 595 | Node : in RTEMS.Node; |
---|
| 596 | ID : out RTEMS.ID; |
---|
| 597 | Result : out RTEMS.Status_Codes |
---|
| 598 | ); |
---|
| 599 | |
---|
| 600 | procedure Task_Start ( |
---|
| 601 | ID : in RTEMS.ID; |
---|
| 602 | Entry_Point : in RTEMS.Task_Entry; |
---|
| 603 | Argument : in RTEMS.Task_Argument; |
---|
| 604 | Result : out RTEMS.Status_Codes |
---|
| 605 | ); |
---|
| 606 | |
---|
| 607 | procedure Task_Restart ( |
---|
| 608 | ID : in RTEMS.ID; |
---|
| 609 | Argument : in RTEMS.Task_Argument; |
---|
| 610 | Result : out RTEMS.Status_Codes |
---|
| 611 | ); |
---|
| 612 | |
---|
| 613 | procedure Task_Delete ( |
---|
| 614 | ID : in RTEMS.ID; |
---|
| 615 | Result : out RTEMS.Status_Codes |
---|
| 616 | ); |
---|
| 617 | |
---|
| 618 | procedure Task_Suspend ( |
---|
| 619 | ID : in RTEMS.ID; |
---|
| 620 | Result : out RTEMS.Status_Codes |
---|
| 621 | ); |
---|
| 622 | |
---|
| 623 | procedure Task_Resume ( |
---|
| 624 | ID : in RTEMS.ID; |
---|
| 625 | Result : out RTEMS.Status_Codes |
---|
[1e3e81f] | 626 | ); |
---|
| 627 | |
---|
[f3f06f79] | 628 | procedure Task_Set_Priority ( |
---|
| 629 | ID : in RTEMS.ID; |
---|
| 630 | New_Priority : in RTEMS.Task_Priority; |
---|
| 631 | Old_Priority : out RTEMS.Task_Priority; |
---|
| 632 | Result : out RTEMS.Status_Codes |
---|
| 633 | ); |
---|
| 634 | |
---|
| 635 | procedure Task_Mode ( |
---|
| 636 | Mode_Set : in RTEMS.Mode; |
---|
| 637 | Mask : in RTEMS.Mode; |
---|
| 638 | Previous_Mode_Set : out RTEMS.Mode; |
---|
| 639 | Result : out RTEMS.Status_Codes |
---|
| 640 | ); |
---|
| 641 | |
---|
| 642 | procedure Task_Get_Note ( |
---|
| 643 | ID : in RTEMS.ID; |
---|
| 644 | Notepad : in RTEMS.Notepad_Index; |
---|
| 645 | Note : out RTEMS.Unsigned32; |
---|
| 646 | Result : out RTEMS.Status_Codes |
---|
| 647 | ); |
---|
| 648 | |
---|
| 649 | procedure Task_Set_Note ( |
---|
| 650 | ID : in RTEMS.ID; |
---|
| 651 | Notepad : in RTEMS.Notepad_Index; |
---|
| 652 | Note : in RTEMS.Unsigned32; |
---|
| 653 | Result : out RTEMS.Status_Codes |
---|
| 654 | ); |
---|
[09196757] | 655 | |
---|
| 656 | type Task_Variable_Dtor is access procedure ( |
---|
[6221625] | 657 | Argument : in RTEMS.Address |
---|
[09196757] | 658 | ); |
---|
| 659 | |
---|
[d14963b] | 660 | procedure Task_Variable_Add ( |
---|
| 661 | ID : in RTEMS.ID; |
---|
| 662 | Task_Variable : in RTEMS.Address; |
---|
| 663 | Dtor : in RTEMS.Task_Variable_Dtor; |
---|
| 664 | Result : out RTEMS.Status_Codes |
---|
| 665 | ); |
---|
[09196757] | 666 | |
---|
[d14963b] | 667 | procedure Task_Variable_Get ( |
---|
| 668 | ID : in RTEMS.ID; |
---|
| 669 | Task_Variable : out RTEMS.Address; |
---|
| 670 | Task_Variable_Value : out RTEMS.Address; |
---|
| 671 | Result : out RTEMS.Status_Codes |
---|
| 672 | ); |
---|
[09196757] | 673 | |
---|
[d14963b] | 674 | procedure Task_Variable_Delete ( |
---|
| 675 | ID : in RTEMS.ID; |
---|
| 676 | Task_Variable : out RTEMS.Address; |
---|
| 677 | Result : out RTEMS.Status_Codes |
---|
| 678 | ); |
---|
[f3f06f79] | 679 | |
---|
| 680 | procedure Task_Wake_When ( |
---|
| 681 | Time_Buffer : in RTEMS.Time_Of_Day; |
---|
| 682 | Result : out RTEMS.Status_Codes |
---|
| 683 | ); |
---|
| 684 | |
---|
| 685 | procedure Task_Wake_After ( |
---|
| 686 | Ticks : in RTEMS.Interval; |
---|
| 687 | Result : out RTEMS.Status_Codes |
---|
| 688 | ); |
---|
| 689 | |
---|
| 690 | -- |
---|
| 691 | -- Interrupt Manager |
---|
| 692 | -- |
---|
| 693 | |
---|
[7003847] | 694 | function Interrupt_Disable return RTEMS.ISR_Level; |
---|
| 695 | pragma Interface (C, Interrupt_Disable); |
---|
| 696 | pragma Interface_Name (Interrupt_Disable, "rtems_interrupt_disable"); |
---|
[f3f06f79] | 697 | |
---|
| 698 | procedure Interrupt_Enable ( |
---|
| 699 | Level : in RTEMS.ISR_Level |
---|
| 700 | ); |
---|
[7003847] | 701 | pragma Interface (C, Interrupt_Enable); |
---|
| 702 | pragma Interface_Name (Interrupt_Enable, "rtems_interrupt_enable"); |
---|
[f3f06f79] | 703 | |
---|
| 704 | procedure Interrupt_Flash ( |
---|
| 705 | Level : in RTEMS.ISR_Level |
---|
| 706 | ); |
---|
[7003847] | 707 | pragma Interface (C, Interrupt_Flash); |
---|
| 708 | pragma Interface_Name (Interrupt_Flash, "rtems_interrupt_flash"); |
---|
[f3f06f79] | 709 | |
---|
[7003847] | 710 | function Interrupt_Is_In_Progress return RTEMS.Boolean; |
---|
| 711 | pragma Interface (C, Interrupt_Is_In_Progress); |
---|
| 712 | pragma Interface_Name |
---|
| 713 | (Interrupt_Is_In_Progress, "rtems_interrupt_is_in_progress"); |
---|
[f3f06f79] | 714 | |
---|
| 715 | -- |
---|
| 716 | -- Clock Manager |
---|
| 717 | -- |
---|
| 718 | |
---|
| 719 | procedure Clock_Get ( |
---|
| 720 | Option : in RTEMS.Clock_Get_Options; |
---|
| 721 | Time_Buffer : in RTEMS.Address; |
---|
| 722 | Result : out RTEMS.Status_Codes |
---|
| 723 | ); |
---|
| 724 | |
---|
| 725 | procedure Clock_Set ( |
---|
| 726 | Time_Buffer : in RTEMS.Time_Of_Day; |
---|
| 727 | Result : out RTEMS.Status_Codes |
---|
| 728 | ); |
---|
| 729 | |
---|
| 730 | procedure Clock_Tick ( |
---|
| 731 | Result : out RTEMS.Status_Codes |
---|
| 732 | ); |
---|
| 733 | |
---|
| 734 | -- |
---|
| 735 | -- Extension Manager |
---|
| 736 | -- |
---|
| 737 | |
---|
| 738 | procedure Extension_Create ( |
---|
| 739 | Name : in RTEMS.Name; |
---|
| 740 | Table : in RTEMS.Extensions_Table_Pointer; |
---|
| 741 | ID : out RTEMS.ID; |
---|
| 742 | Result : out RTEMS.Status_Codes |
---|
| 743 | ); |
---|
| 744 | |
---|
| 745 | procedure Extension_Ident ( |
---|
| 746 | Name : in RTEMS.Name; |
---|
| 747 | ID : out RTEMS.ID; |
---|
| 748 | Result : out RTEMS.Status_Codes |
---|
| 749 | ); |
---|
| 750 | |
---|
| 751 | procedure Extension_Delete ( |
---|
| 752 | ID : in RTEMS.ID; |
---|
| 753 | Result : out RTEMS.Status_Codes |
---|
| 754 | ); |
---|
| 755 | |
---|
| 756 | -- |
---|
| 757 | -- Timer Manager |
---|
| 758 | -- |
---|
| 759 | |
---|
| 760 | procedure Timer_Create ( |
---|
| 761 | Name : in RTEMS.Name; |
---|
| 762 | ID : out RTEMS.ID; |
---|
| 763 | Result : out RTEMS.Status_Codes |
---|
| 764 | ); |
---|
| 765 | |
---|
| 766 | procedure Timer_Ident ( |
---|
| 767 | Name : in RTEMS.Name; |
---|
| 768 | ID : out RTEMS.ID; |
---|
| 769 | Result : out RTEMS.Status_Codes |
---|
| 770 | ); |
---|
| 771 | |
---|
| 772 | procedure Timer_Delete ( |
---|
| 773 | ID : in RTEMS.ID; |
---|
| 774 | Result : out RTEMS.Status_Codes |
---|
| 775 | ); |
---|
| 776 | |
---|
| 777 | procedure Timer_Fire_After ( |
---|
| 778 | ID : in RTEMS.ID; |
---|
| 779 | Ticks : in RTEMS.Interval; |
---|
| 780 | Routine : in RTEMS.Timer_Service_Routine; |
---|
| 781 | User_Data : in RTEMS.Address; |
---|
| 782 | Result : out RTEMS.Status_Codes |
---|
| 783 | ); |
---|
| 784 | |
---|
[7003847] | 785 | procedure Timer_Server_Fire_After ( |
---|
| 786 | ID : in RTEMS.ID; |
---|
| 787 | Ticks : in RTEMS.Interval; |
---|
| 788 | Routine : in RTEMS.Timer_Service_Routine; |
---|
| 789 | User_Data : in RTEMS.Address; |
---|
| 790 | Result : out RTEMS.Status_Codes |
---|
| 791 | ); |
---|
| 792 | |
---|
[f3f06f79] | 793 | procedure Timer_Fire_When ( |
---|
| 794 | ID : in RTEMS.ID; |
---|
| 795 | Wall_Time : in RTEMS.Time_Of_Day; |
---|
| 796 | Routine : in RTEMS.Timer_Service_Routine; |
---|
| 797 | User_Data : in RTEMS.Address; |
---|
| 798 | Result : out RTEMS.Status_Codes |
---|
| 799 | ); |
---|
| 800 | |
---|
[7003847] | 801 | procedure Timer_Server_Fire_When ( |
---|
| 802 | ID : in RTEMS.ID; |
---|
| 803 | Wall_Time : in RTEMS.Time_Of_Day; |
---|
| 804 | Routine : in RTEMS.Timer_Service_Routine; |
---|
| 805 | User_Data : in RTEMS.Address; |
---|
| 806 | Result : out RTEMS.Status_Codes |
---|
| 807 | ); |
---|
| 808 | |
---|
[f3f06f79] | 809 | procedure Timer_Reset ( |
---|
| 810 | ID : in RTEMS.ID; |
---|
| 811 | Result : out RTEMS.Status_Codes |
---|
| 812 | ); |
---|
| 813 | |
---|
| 814 | procedure Timer_Cancel ( |
---|
| 815 | ID : in RTEMS.ID; |
---|
| 816 | Result : out RTEMS.Status_Codes |
---|
| 817 | ); |
---|
| 818 | |
---|
[7003847] | 819 | procedure Timer_Initiate_Server ( |
---|
| 820 | Server_Priority : in RTEMS.Task_Priority; |
---|
| 821 | Stack_Size : in Unsigned32; |
---|
| 822 | Attribute_Set : in RTEMS.Attribute; |
---|
| 823 | Result : out RTEMS.Status_Codes |
---|
| 824 | ); |
---|
| 825 | |
---|
[f3f06f79] | 826 | -- |
---|
| 827 | -- Semaphore Manager |
---|
| 828 | -- |
---|
| 829 | |
---|
| 830 | procedure Semaphore_Create ( |
---|
[d348ad96] | 831 | Name : in RTEMS.Name; |
---|
| 832 | Count : in RTEMS.Unsigned32; |
---|
| 833 | Attribute_Set : in RTEMS.Attribute; |
---|
| 834 | Priority_Ceiling : in RTEMS.Task_Priority; |
---|
| 835 | ID : out RTEMS.ID; |
---|
| 836 | Result : out RTEMS.Status_Codes |
---|
[f3f06f79] | 837 | ); |
---|
| 838 | |
---|
| 839 | procedure Semaphore_Delete ( |
---|
| 840 | ID : in RTEMS.ID; |
---|
| 841 | Result : out RTEMS.Status_Codes |
---|
| 842 | ); |
---|
| 843 | |
---|
| 844 | procedure Semaphore_Ident ( |
---|
| 845 | Name : in RTEMS.Name; |
---|
| 846 | Node : in RTEMS.Unsigned32; |
---|
| 847 | ID : out RTEMS.ID; |
---|
| 848 | Result : out RTEMS.Status_Codes |
---|
| 849 | ); |
---|
| 850 | |
---|
| 851 | procedure Semaphore_Obtain ( |
---|
| 852 | ID : in RTEMS.ID; |
---|
| 853 | Option_Set : in RTEMS.Option; |
---|
| 854 | Timeout : in RTEMS.Interval; |
---|
| 855 | Result : out RTEMS.Status_Codes |
---|
| 856 | ); |
---|
| 857 | |
---|
| 858 | procedure Semaphore_Release ( |
---|
| 859 | ID : in RTEMS.ID; |
---|
| 860 | Result : out RTEMS.Status_Codes |
---|
| 861 | ); |
---|
| 862 | |
---|
| 863 | -- |
---|
| 864 | -- Message Queue Manager |
---|
| 865 | -- |
---|
| 866 | |
---|
| 867 | procedure Message_Queue_Create ( |
---|
| 868 | Name : in RTEMS.Name; |
---|
| 869 | Count : in RTEMS.Unsigned32; |
---|
| 870 | Max_Message_Size : in RTEMS.Unsigned32; |
---|
| 871 | Attribute_Set : in RTEMS.Attribute; |
---|
| 872 | ID : out RTEMS.ID; |
---|
| 873 | Result : out RTEMS.Status_Codes |
---|
| 874 | ); |
---|
| 875 | |
---|
| 876 | procedure Message_Queue_Ident ( |
---|
| 877 | Name : in RTEMS.Name; |
---|
| 878 | Node : in RTEMS.Unsigned32; |
---|
| 879 | ID : out RTEMS.ID; |
---|
| 880 | Result : out RTEMS.Status_Codes |
---|
| 881 | ); |
---|
| 882 | |
---|
| 883 | procedure Message_Queue_Delete ( |
---|
| 884 | ID : in RTEMS.ID; |
---|
| 885 | Result : out RTEMS.Status_Codes |
---|
| 886 | ); |
---|
| 887 | |
---|
| 888 | procedure Message_Queue_Send ( |
---|
| 889 | ID : in RTEMS.ID; |
---|
| 890 | Buffer : in RTEMS.Address; |
---|
| 891 | Size : in RTEMS.Unsigned32; |
---|
| 892 | Result : out RTEMS.Status_Codes |
---|
| 893 | ); |
---|
| 894 | |
---|
| 895 | procedure Message_Queue_Urgent ( |
---|
| 896 | ID : in RTEMS.ID; |
---|
| 897 | Buffer : in RTEMS.Address; |
---|
| 898 | Size : in RTEMS.Unsigned32; |
---|
| 899 | Result : out RTEMS.Status_Codes |
---|
| 900 | ); |
---|
| 901 | |
---|
| 902 | procedure Message_Queue_Broadcast ( |
---|
| 903 | ID : in RTEMS.ID; |
---|
| 904 | Buffer : in RTEMS.Address; |
---|
| 905 | Size : in RTEMS.Unsigned32; |
---|
| 906 | Count : out RTEMS.Unsigned32; |
---|
| 907 | Result : out RTEMS.Status_Codes |
---|
| 908 | ); |
---|
| 909 | |
---|
| 910 | procedure Message_Queue_Receive ( |
---|
| 911 | ID : in RTEMS.ID; |
---|
| 912 | Buffer : in RTEMS.Address; |
---|
| 913 | Option_Set : in RTEMS.Option; |
---|
| 914 | Timeout : in RTEMS.Interval; |
---|
| 915 | Size : out RTEMS.Unsigned32; |
---|
| 916 | Result : out RTEMS.Status_Codes |
---|
| 917 | ); |
---|
| 918 | |
---|
| 919 | procedure Message_Queue_Flush ( |
---|
| 920 | ID : in RTEMS.ID; |
---|
| 921 | Count : out RTEMS.Unsigned32; |
---|
| 922 | Result : out RTEMS.Status_Codes |
---|
| 923 | ); |
---|
| 924 | |
---|
| 925 | -- |
---|
| 926 | -- Event Manager |
---|
| 927 | -- |
---|
| 928 | |
---|
| 929 | procedure Event_Send ( |
---|
| 930 | ID : in RTEMS.ID; |
---|
| 931 | Event_In : in RTEMS.Event_Set; |
---|
| 932 | Result : out RTEMS.Status_Codes |
---|
| 933 | ); |
---|
| 934 | |
---|
| 935 | procedure Event_Receive ( |
---|
| 936 | Event_In : in RTEMS.Event_Set; |
---|
| 937 | Option_Set : in RTEMS.Option; |
---|
| 938 | Ticks : in RTEMS.Interval; |
---|
| 939 | Event_Out : out RTEMS.Event_Set; |
---|
| 940 | Result : out RTEMS.Status_Codes |
---|
| 941 | ); |
---|
| 942 | |
---|
| 943 | -- |
---|
| 944 | -- Signal Manager |
---|
| 945 | -- |
---|
| 946 | |
---|
| 947 | procedure Signal_Catch ( |
---|
| 948 | ASR_Handler : in RTEMS.ASR_Handler; |
---|
| 949 | Mode_Set : in RTEMS.Mode; |
---|
| 950 | Result : out RTEMS.Status_Codes |
---|
| 951 | ); |
---|
| 952 | |
---|
| 953 | procedure Signal_Send ( |
---|
| 954 | ID : in RTEMS.ID; |
---|
| 955 | Signal_Set : in RTEMS.Signal_Set; |
---|
| 956 | Result : out RTEMS.Status_Codes |
---|
| 957 | ); |
---|
| 958 | |
---|
| 959 | -- |
---|
| 960 | -- Partition Manager |
---|
| 961 | -- |
---|
| 962 | |
---|
| 963 | procedure Partition_Create ( |
---|
| 964 | Name : in RTEMS.Name; |
---|
| 965 | Starting_Address : in RTEMS.Address; |
---|
| 966 | Length : in RTEMS.Unsigned32; |
---|
| 967 | Buffer_Size : in RTEMS.Unsigned32; |
---|
| 968 | Attribute_Set : in RTEMS.Attribute; |
---|
| 969 | ID : out RTEMS.ID; |
---|
| 970 | Result : out RTEMS.Status_Codes |
---|
| 971 | ); |
---|
| 972 | |
---|
| 973 | procedure Partition_Ident ( |
---|
| 974 | Name : in RTEMS.Name; |
---|
| 975 | Node : in RTEMS.Unsigned32; |
---|
| 976 | ID : out RTEMS.ID; |
---|
| 977 | Result : out RTEMS.Status_Codes |
---|
| 978 | ); |
---|
| 979 | |
---|
| 980 | procedure Partition_Delete ( |
---|
| 981 | ID : in RTEMS.ID; |
---|
| 982 | Result : out RTEMS.Status_Codes |
---|
| 983 | ); |
---|
| 984 | |
---|
| 985 | procedure Partition_Get_Buffer ( |
---|
| 986 | ID : in RTEMS.ID; |
---|
| 987 | Buffer : out RTEMS.Address; |
---|
| 988 | Result : out RTEMS.Status_Codes |
---|
| 989 | ); |
---|
| 990 | |
---|
| 991 | procedure Partition_Return_Buffer ( |
---|
| 992 | ID : in RTEMS.ID; |
---|
| 993 | Buffer : in RTEMS.Address; |
---|
| 994 | Result : out RTEMS.Status_Codes |
---|
| 995 | ); |
---|
| 996 | |
---|
| 997 | -- |
---|
| 998 | -- Region Manager |
---|
| 999 | -- |
---|
| 1000 | |
---|
| 1001 | procedure Region_Create ( |
---|
| 1002 | Name : in RTEMS.Name; |
---|
| 1003 | Starting_Address : in RTEMS.Address; |
---|
| 1004 | Length : in RTEMS.Unsigned32; |
---|
| 1005 | Page_Size : in RTEMS.Unsigned32; |
---|
| 1006 | Attribute_Set : in RTEMS.Attribute; |
---|
| 1007 | ID : out RTEMS.ID; |
---|
| 1008 | Result : out RTEMS.Status_Codes |
---|
| 1009 | ); |
---|
| 1010 | |
---|
| 1011 | procedure Region_Ident ( |
---|
| 1012 | Name : in RTEMS.Name; |
---|
| 1013 | ID : out RTEMS.ID; |
---|
| 1014 | Result : out RTEMS.Status_Codes |
---|
| 1015 | ); |
---|
| 1016 | |
---|
| 1017 | procedure Region_Delete ( |
---|
| 1018 | ID : in RTEMS.ID; |
---|
| 1019 | Result : out RTEMS.Status_Codes |
---|
| 1020 | ); |
---|
| 1021 | |
---|
| 1022 | procedure Region_Extend ( |
---|
| 1023 | ID : in RTEMS.ID; |
---|
| 1024 | Starting_Address : in RTEMS.Address; |
---|
| 1025 | Length : in RTEMS.Unsigned32; |
---|
| 1026 | Result : out RTEMS.Status_Codes |
---|
| 1027 | ); |
---|
| 1028 | |
---|
| 1029 | procedure Region_Get_Segment ( |
---|
| 1030 | ID : in RTEMS.ID; |
---|
| 1031 | Size : in RTEMS.Unsigned32; |
---|
| 1032 | Option_Set : in RTEMS.Option; |
---|
| 1033 | Timeout : in RTEMS.Interval; |
---|
| 1034 | Segment : out RTEMS.Address; |
---|
| 1035 | Result : out RTEMS.Status_Codes |
---|
| 1036 | ); |
---|
| 1037 | |
---|
| 1038 | procedure Region_Get_Segment_Size ( |
---|
| 1039 | ID : in RTEMS.ID; |
---|
| 1040 | Segment : in RTEMS.Address; |
---|
| 1041 | Size : out RTEMS.Unsigned32; |
---|
| 1042 | Result : out RTEMS.Status_Codes |
---|
| 1043 | ); |
---|
| 1044 | |
---|
| 1045 | procedure Region_Return_Segment ( |
---|
| 1046 | ID : in RTEMS.ID; |
---|
| 1047 | Segment : in RTEMS.Address; |
---|
| 1048 | Result : out RTEMS.Status_Codes |
---|
| 1049 | ); |
---|
| 1050 | |
---|
| 1051 | -- |
---|
| 1052 | -- Dual Ported Memory Manager |
---|
| 1053 | -- |
---|
| 1054 | |
---|
| 1055 | procedure Port_Create ( |
---|
| 1056 | Name : in RTEMS.Name; |
---|
| 1057 | Internal_Start : in RTEMS.Address; |
---|
| 1058 | External_Start : in RTEMS.Address; |
---|
| 1059 | Length : in RTEMS.Unsigned32; |
---|
| 1060 | ID : out RTEMS.ID; |
---|
| 1061 | Result : out RTEMS.Status_Codes |
---|
| 1062 | ); |
---|
| 1063 | |
---|
| 1064 | procedure Port_Ident ( |
---|
| 1065 | Name : in RTEMS.Name; |
---|
| 1066 | ID : out RTEMS.ID; |
---|
| 1067 | Result : out RTEMS.Status_Codes |
---|
| 1068 | ); |
---|
| 1069 | |
---|
| 1070 | procedure Port_Delete ( |
---|
| 1071 | ID : in RTEMS.ID; |
---|
| 1072 | Result : out RTEMS.Status_Codes |
---|
| 1073 | ); |
---|
| 1074 | |
---|
| 1075 | procedure Port_External_To_Internal ( |
---|
| 1076 | ID : in RTEMS.ID; |
---|
| 1077 | External : in RTEMS.Address; |
---|
| 1078 | Internal : out RTEMS.Address; |
---|
| 1079 | Result : out RTEMS.Status_Codes |
---|
| 1080 | ); |
---|
| 1081 | |
---|
| 1082 | procedure Port_Internal_To_External ( |
---|
| 1083 | ID : in RTEMS.ID; |
---|
| 1084 | Internal : in RTEMS.Address; |
---|
| 1085 | External : out RTEMS.Address; |
---|
| 1086 | Result : out RTEMS.Status_Codes |
---|
| 1087 | ); |
---|
| 1088 | |
---|
| 1089 | -- |
---|
| 1090 | -- Fatal Error Manager |
---|
| 1091 | -- |
---|
| 1092 | |
---|
| 1093 | procedure Fatal_Error_Occurred ( |
---|
| 1094 | The_Error : in RTEMS.Unsigned32 |
---|
| 1095 | ); |
---|
| 1096 | |
---|
| 1097 | -- |
---|
| 1098 | -- Rate Monotonic Manager |
---|
| 1099 | -- |
---|
| 1100 | |
---|
| 1101 | procedure Rate_Monotonic_Create ( |
---|
| 1102 | Name : in RTEMS.Name; |
---|
| 1103 | ID : out RTEMS.ID; |
---|
| 1104 | Result : out RTEMS.Status_Codes |
---|
| 1105 | ); |
---|
| 1106 | |
---|
| 1107 | procedure Rate_Monotonic_Ident ( |
---|
| 1108 | Name : in RTEMS.Name; |
---|
| 1109 | ID : out RTEMS.ID; |
---|
| 1110 | Result : out RTEMS.Status_Codes |
---|
| 1111 | ); |
---|
| 1112 | |
---|
| 1113 | procedure Rate_Monotonic_Delete ( |
---|
| 1114 | ID : in RTEMS.ID; |
---|
| 1115 | Result : out RTEMS.Status_Codes |
---|
| 1116 | ); |
---|
| 1117 | |
---|
| 1118 | procedure Rate_Monotonic_Cancel ( |
---|
| 1119 | ID : in RTEMS.ID; |
---|
| 1120 | Result : out RTEMS.Status_Codes |
---|
| 1121 | ); |
---|
| 1122 | |
---|
| 1123 | procedure Rate_Monotonic_Period ( |
---|
| 1124 | ID : in RTEMS.ID; |
---|
| 1125 | Length : in RTEMS.Interval; |
---|
| 1126 | Result : out RTEMS.Status_Codes |
---|
| 1127 | ); |
---|
| 1128 | |
---|
| 1129 | procedure Rate_Monotonic_Get_Status ( |
---|
| 1130 | ID : in RTEMS.ID; |
---|
| 1131 | Status : out RTEMS.Rate_Monotonic_Period_Status; |
---|
| 1132 | Result : out RTEMS.Status_Codes |
---|
| 1133 | ); |
---|
| 1134 | |
---|
| 1135 | -- |
---|
| 1136 | -- Debug Manager |
---|
| 1137 | -- |
---|
| 1138 | |
---|
[d348ad96] | 1139 | Debug_All_Mask : constant RTEMS.Debug_Set := 16#ffffffff#; |
---|
| 1140 | Debug_Region : constant RTEMS.Debug_Set := 16#00000001#; |
---|
| 1141 | |
---|
[f3f06f79] | 1142 | procedure Debug_Enable ( |
---|
| 1143 | To_Be_Enabled : in RTEMS.Debug_Set |
---|
| 1144 | ); |
---|
| 1145 | |
---|
| 1146 | procedure Debug_Disable ( |
---|
| 1147 | To_Be_Disabled : in RTEMS.Debug_Set |
---|
| 1148 | ); |
---|
| 1149 | |
---|
| 1150 | function Debug_Is_Enabled ( |
---|
| 1151 | Level : in RTEMS.Debug_Set |
---|
| 1152 | ) return RTEMS.Boolean; |
---|
| 1153 | |
---|
[aa57f84] | 1154 | end RTEMS; |
---|