mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 19:15:44 +08:00
2011-02-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* ada/Makefile.am, ada/preinstall.am, ada/rtems.adb, ada/rtems.ads: Split RTEMS Ada95 binding into a master package and a child package per Manager. This is better Ada style. * ada/rtems-barrier.adb, ada/rtems-barrier.ads, ada/rtems-clock.adb, ada/rtems-clock.ads, ada/rtems-cpu_usage.ads, ada/rtems-debug.adb, ada/rtems-debug.ads, ada/rtems-event.adb, ada/rtems-event.ads, ada/rtems-extension.adb, ada/rtems-extension.ads, ada/rtems-fatal.adb, ada/rtems-fatal.ads, ada/rtems-interrupt.ads, ada/rtems-io.adb, ada/rtems-io.ads, ada/rtems-message_queue.adb, ada/rtems-message_queue.ads, ada/rtems-object.adb, ada/rtems-object.ads, ada/rtems-partition.adb, ada/rtems-partition.ads, ada/rtems-port.adb, ada/rtems-port.ads, ada/rtems-rate_monotonic.adb, ada/rtems-rate_monotonic.ads, ada/rtems-region.adb, ada/rtems-region.ads, ada/rtems-semaphore.adb, ada/rtems-semaphore.ads, ada/rtems-signal.adb, ada/rtems-signal.ads, ada/rtems-stack_checker.ads, ada/rtems-tasks.adb, ada/rtems-tasks.ads, ada/rtems-timer.adb, ada/rtems-timer.ads: New files.
This commit is contained in:
@@ -1,3 +1,24 @@
|
||||
2011-02-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* ada/Makefile.am, ada/preinstall.am, ada/rtems.adb, ada/rtems.ads:
|
||||
Split RTEMS Ada95 binding into a master package and a child package
|
||||
per Manager. This is better Ada style.
|
||||
* ada/rtems-barrier.adb, ada/rtems-barrier.ads, ada/rtems-clock.adb,
|
||||
ada/rtems-clock.ads, ada/rtems-cpu_usage.ads, ada/rtems-debug.adb,
|
||||
ada/rtems-debug.ads, ada/rtems-event.adb, ada/rtems-event.ads,
|
||||
ada/rtems-extension.adb, ada/rtems-extension.ads,
|
||||
ada/rtems-fatal.adb, ada/rtems-fatal.ads, ada/rtems-interrupt.ads,
|
||||
ada/rtems-io.adb, ada/rtems-io.ads, ada/rtems-message_queue.adb,
|
||||
ada/rtems-message_queue.ads, ada/rtems-object.adb,
|
||||
ada/rtems-object.ads, ada/rtems-partition.adb,
|
||||
ada/rtems-partition.ads, ada/rtems-port.adb, ada/rtems-port.ads,
|
||||
ada/rtems-rate_monotonic.adb, ada/rtems-rate_monotonic.ads,
|
||||
ada/rtems-region.adb, ada/rtems-region.ads, ada/rtems-semaphore.adb,
|
||||
ada/rtems-semaphore.ads, ada/rtems-signal.adb, ada/rtems-signal.ads,
|
||||
ada/rtems-stack_checker.ads, ada/rtems-tasks.adb,
|
||||
ada/rtems-tasks.ads, ada/rtems-timer.adb, ada/rtems-timer.ads: New
|
||||
files.
|
||||
|
||||
2011-02-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||
|
||||
* libchip/serial/ns16550.c: Revert previous commit and extend existing
|
||||
|
||||
+22
-1
@@ -5,7 +5,28 @@
|
||||
if RTEMS_ADA
|
||||
include_adadir = $(includedir)/adainclude
|
||||
include_ada_HEADERS = rtems.adb rtems.ads
|
||||
include_ada_HEADERS += rtems-multiprocessing.adb rtems-multiprocessing.ads
|
||||
include_ada_HEADERS += \
|
||||
rtems-barrier.adb rtems-barrier.ads \
|
||||
rtems-clock.adb rtems-clock.ads \
|
||||
rtems-cpu_usage.ads \
|
||||
rtems-debug.adb rtems-debug.ads \
|
||||
rtems-event.adb rtems-event.ads \
|
||||
rtems-extension.adb rtems-extension.ads \
|
||||
rtems-fatal.adb rtems-fatal.ads \
|
||||
rtems-interrupt.ads \
|
||||
rtems-io.adb rtems-io.ads \
|
||||
rtems-message_queue.adb rtems-message_queue.ads \
|
||||
rtems-multiprocessing.adb rtems-multiprocessing.ads \
|
||||
rtems-object.adb rtems-object.ads \
|
||||
rtems-partition.adb rtems-partition.ads \
|
||||
rtems-port.adb rtems-port.ads \
|
||||
rtems-rate_monotonic.adb rtems-rate_monotonic.ads \
|
||||
rtems-region.adb rtems-region.ads \
|
||||
rtems-semaphore.adb rtems-semaphore.ads \
|
||||
rtems-signal.adb rtems-signal.ads \
|
||||
rtems-stack_checker.ads \
|
||||
rtems-tasks.adb rtems-tasks.ads \
|
||||
rtems-timer.adb rtems-timer.ads
|
||||
endif
|
||||
|
||||
include $(srcdir)/preinstall.am
|
||||
|
||||
@@ -27,6 +27,78 @@ $(PROJECT_INCLUDE)/adainclude/rtems.ads: rtems.ads $(PROJECT_INCLUDE)/adainclude
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-barrier.adb: rtems-barrier.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-barrier.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-barrier.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-barrier.ads: rtems-barrier.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-barrier.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-barrier.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-clock.adb: rtems-clock.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-clock.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-clock.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-clock.ads: rtems-clock.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-clock.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-clock.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-cpu_usage.ads: rtems-cpu_usage.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-cpu_usage.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-cpu_usage.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-debug.adb: rtems-debug.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-debug.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-debug.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-debug.ads: rtems-debug.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-debug.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-debug.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-event.adb: rtems-event.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-event.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-event.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-event.ads: rtems-event.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-event.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-event.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-extension.adb: rtems-extension.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-extension.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-extension.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-extension.ads: rtems-extension.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-extension.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-extension.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-fatal.adb: rtems-fatal.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-fatal.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-fatal.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-fatal.ads: rtems-fatal.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-fatal.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-fatal.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-interrupt.ads: rtems-interrupt.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-interrupt.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-interrupt.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-io.adb: rtems-io.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-io.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-io.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-io.ads: rtems-io.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-io.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-io.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-message_queue.adb: rtems-message_queue.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-message_queue.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-message_queue.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-message_queue.ads: rtems-message_queue.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-message_queue.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-message_queue.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-multiprocessing.adb: rtems-multiprocessing.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-multiprocessing.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-multiprocessing.adb
|
||||
@@ -34,4 +106,80 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-multiprocessing.adb
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-multiprocessing.ads: rtems-multiprocessing.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-multiprocessing.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-multiprocessing.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-object.adb: rtems-object.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-object.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-object.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-object.ads: rtems-object.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-object.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-object.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-partition.adb: rtems-partition.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-partition.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-partition.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-partition.ads: rtems-partition.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-partition.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-partition.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-port.adb: rtems-port.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-port.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-port.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-port.ads: rtems-port.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-port.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-port.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-rate_monotonic.adb: rtems-rate_monotonic.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-rate_monotonic.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-rate_monotonic.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-rate_monotonic.ads: rtems-rate_monotonic.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-rate_monotonic.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-rate_monotonic.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-region.adb: rtems-region.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-region.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-region.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-region.ads: rtems-region.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-region.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-region.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-semaphore.adb: rtems-semaphore.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-semaphore.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-semaphore.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-semaphore.ads: rtems-semaphore.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-semaphore.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-semaphore.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-signal.adb: rtems-signal.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-signal.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-signal.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-signal.ads: rtems-signal.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-signal.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-signal.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-stack_checker.ads: rtems-stack_checker.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-stack_checker.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-stack_checker.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-tasks.adb: rtems-tasks.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-tasks.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-tasks.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-tasks.ads: rtems-tasks.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-tasks.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-tasks.ads
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-timer.adb: rtems-timer.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-timer.adb
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-timer.adb
|
||||
|
||||
$(PROJECT_INCLUDE)/adainclude/rtems-timer.ads: rtems-timer.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-timer.ads
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-timer.ads
|
||||
endif
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
with Ada;
|
||||
with Ada.Unchecked_Conversion;
|
||||
with Interfaces; use Interfaces;
|
||||
with Interfaces.C; use Interfaces.C;
|
||||
with Interfaces.C.Strings; use Interfaces.C.Strings;
|
||||
|
||||
package body RTEMS.Barrier is
|
||||
|
||||
--
|
||||
-- Barrier Manager
|
||||
--
|
||||
|
||||
procedure Create
|
||||
(Name : in RTEMS.Name;
|
||||
Attribute_Set : in RTEMS.Attribute;
|
||||
Maximum_Waiters : in RTEMS.Unsigned32;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Create_Base
|
||||
(Name : RTEMS.Name;
|
||||
Attribute_Set : RTEMS.Attribute;
|
||||
Maximum_Waiters : RTEMS.Unsigned32;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Create_Base, "rtems_barrier_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Create_Base
|
||||
(Name,
|
||||
Attribute_Set,
|
||||
Maximum_Waiters,
|
||||
ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Create;
|
||||
|
||||
procedure Ident
|
||||
(Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Ident_Base
|
||||
(Name : RTEMS.Name;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Ident_Base, "rtems_barrier_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result := Ident_Base (Name, ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Ident;
|
||||
|
||||
procedure Delete
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Delete_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Delete_Base, "rtems_barrier_delete");
|
||||
begin
|
||||
|
||||
Result := Delete_Base (ID);
|
||||
|
||||
end Delete;
|
||||
|
||||
procedure Wait
|
||||
(ID : in RTEMS.ID;
|
||||
Timeout : in RTEMS.Interval;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Wait_Base
|
||||
(ID : RTEMS.ID;
|
||||
Timeout : RTEMS.Interval)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Wait_Base, "rtems_barrier_wait");
|
||||
begin
|
||||
|
||||
Result := Wait_Base (ID, Timeout);
|
||||
|
||||
end Wait;
|
||||
|
||||
procedure Release
|
||||
(ID : in RTEMS.ID;
|
||||
Released : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Release_Base
|
||||
(ID : RTEMS.ID;
|
||||
Released : access RTEMS.Unsigned32)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Release_Base, "rtems_barrier_release");
|
||||
Released_Base : aliased RTEMS.Unsigned32;
|
||||
begin
|
||||
|
||||
Result := Release_Base (ID, Released_Base'Access);
|
||||
Released := Released_Base;
|
||||
|
||||
end Release;
|
||||
|
||||
end RTEMS.Barrier;
|
||||
@@ -0,0 +1,67 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
with System;
|
||||
with System.Storage_Elements; use System.Storage_Elements;
|
||||
with Interfaces;
|
||||
with Interfaces.C;
|
||||
|
||||
package RTEMS.Barrier is
|
||||
|
||||
--
|
||||
-- Barrier Manager
|
||||
--
|
||||
|
||||
procedure Barrier_Create (
|
||||
Name : in RTEMS.Name;
|
||||
Attribute_Set : in RTEMS.Attribute;
|
||||
Maximum_Waiters : in RTEMS.Unsigned32;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Barrier_Ident (
|
||||
Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Barrier_Delete (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Barrier_Wait (
|
||||
ID : in RTEMS.ID;
|
||||
Timeout : in RTEMS.Interval;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Barrier_Release (
|
||||
ID : in RTEMS.ID;
|
||||
Released : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
end RTEMS.Barrier;
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package body RTEMS.Clock is
|
||||
|
||||
--
|
||||
-- Clock Manager
|
||||
--
|
||||
|
||||
procedure Set
|
||||
(Time_Buffer : in RTEMS.Time_Of_Day;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Set_Base
|
||||
(Time_Buffer : access RTEMS.Time_Of_Day)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Set_Base, "rtems_clock_set");
|
||||
|
||||
Tmp_Time : aliased RTEMS.Time_Of_Day;
|
||||
begin
|
||||
|
||||
Tmp_Time := Time_Buffer;
|
||||
Result := Set_Base (Tmp_Time'Access);
|
||||
|
||||
end Set;
|
||||
|
||||
procedure Get
|
||||
(Option : in RTEMS.Clock.Get_Options;
|
||||
Time_Buffer : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Get_Base
|
||||
(Option : RTEMS.Clock.Get_Options;
|
||||
Time_Buffer : RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Get_Base, "rtems_clock_get");
|
||||
begin
|
||||
|
||||
Result := Get_Base (Option, Time_Buffer);
|
||||
|
||||
end Get;
|
||||
|
||||
procedure Get_TOD
|
||||
(Time : out RTEMS.Time_Of_Day;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Get_TOD_Base
|
||||
(Time : access RTEMS.Time_Of_Day)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Get_TOD_Base, "rtems_clock_get_tod");
|
||||
|
||||
Tmp_Time : aliased RTEMS.Time_Of_Day;
|
||||
begin
|
||||
Result := Get_TOD_Base (Tmp_Time'Access);
|
||||
Time := Tmp_Time;
|
||||
end Get_TOD;
|
||||
|
||||
procedure Get_TOD_Time_Value
|
||||
(Time : out RTEMS.Time_Value;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Get_TOD_Time_Value_Base
|
||||
(Time : access RTEMS.Time_Value)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Get_TOD_Time_Value_Base,
|
||||
"rtems_clock_get_tod_timeval");
|
||||
|
||||
Tmp_Time : aliased RTEMS.Time_Value;
|
||||
begin
|
||||
Result := Get_TOD_Time_Value_Base (Tmp_Time'Access);
|
||||
Time := Tmp_Time;
|
||||
end Get_TOD_Time_Value;
|
||||
|
||||
procedure Get_Seconds_Since_Epoch
|
||||
(The_Interval : out RTEMS.Interval;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Get_Seconds_Since_Epoch_Base
|
||||
(The_Interval : access RTEMS.Interval)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Get_Seconds_Since_Epoch_Base,
|
||||
"rtems_clock_get_seconds_since_epoch");
|
||||
|
||||
Tmp_Interval : aliased RTEMS.Interval;
|
||||
begin
|
||||
Result :=
|
||||
Get_Seconds_Since_Epoch_Base (Tmp_Interval'Access);
|
||||
The_Interval := Tmp_Interval;
|
||||
end Get_Seconds_Since_Epoch;
|
||||
|
||||
-- Get_Ticks_Per_Second is in rtems.ads
|
||||
|
||||
-- Get_Ticks_Since_Boot is in rtems.ads
|
||||
|
||||
procedure Get_Uptime
|
||||
(Uptime : out RTEMS.Timespec;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Get_Uptime_Base
|
||||
(Uptime : access RTEMS.Timespec)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Get_Uptime_Base, "rtems_clock_get_uptime");
|
||||
Uptime_Base : aliased RTEMS.Timespec;
|
||||
begin
|
||||
|
||||
Result := Get_Uptime_Base (Uptime_Base'Access);
|
||||
Uptime := Uptime_Base;
|
||||
|
||||
end Get_Uptime;
|
||||
|
||||
procedure Tick (Result : out RTEMS.Status_Codes) is
|
||||
function Tick_Base return RTEMS.Status_Codes;
|
||||
pragma Import (C, Tick_Base, "rtems_clock_tick");
|
||||
begin
|
||||
|
||||
Result := Tick_Base;
|
||||
|
||||
end Tick;
|
||||
|
||||
end RTEMS.Clock;
|
||||
@@ -0,0 +1,109 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
|
||||
package RTEMS.Clock is
|
||||
|
||||
--
|
||||
-- Clock Types
|
||||
--
|
||||
|
||||
type Time_Value is
|
||||
record
|
||||
Seconds : RTEMS.Unsigned32;
|
||||
Microseconds : RTEMS.Unsigned32;
|
||||
end record;
|
||||
|
||||
type Clock_Get_Options is (
|
||||
Clock_Get_TOD,
|
||||
Clock_Get_Seconds_Since_Epoch,
|
||||
Clock_Get_Ticks_Since_Boot,
|
||||
Clock_Get_Ticks_Per_Second,
|
||||
Clock_Get_Time_Value
|
||||
);
|
||||
|
||||
type Get_Options is (
|
||||
Get_TOD,
|
||||
Get_Seconds_Since_Epoch,
|
||||
Get_Ticks_Since_Boot,
|
||||
Get_Ticks_Per_Second,
|
||||
Get_Time_Value
|
||||
);
|
||||
|
||||
--
|
||||
-- Clock Manager
|
||||
--
|
||||
|
||||
procedure Set (
|
||||
Time_Buffer : in RTEMS.Time_Of_Day;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Get (
|
||||
Option : in RTEMS.Clock.Get_Options;
|
||||
Time_Buffer : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Get_TOD (
|
||||
Time : out RTEMS.Time_Of_Day;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Get_TOD_Time_Value (
|
||||
Time : out RTEMS.Time_Value;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Get_Seconds_Since_Epoch(
|
||||
The_Interval : out RTEMS.Interval;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
function Get_Ticks_Per_Second
|
||||
return RTEMS.Interval;
|
||||
pragma Import (
|
||||
C,
|
||||
Get_Ticks_Per_Second,
|
||||
"rtems_clock_get_ticks_per_second"
|
||||
);
|
||||
|
||||
function Get_Ticks_Since_Boot
|
||||
return RTEMS.Interval;
|
||||
pragma Import (
|
||||
C,
|
||||
Get_Ticks_Since_Boot,
|
||||
"rtems_clock_get_ticks_since_boot"
|
||||
);
|
||||
|
||||
procedure Get_Uptime (
|
||||
Uptime : out RTEMS.Timespec;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Tick (
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
end RTEMS.Clock;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
with System;
|
||||
with System.Storage_Elements; use System.Storage_Elements;
|
||||
with Interfaces;
|
||||
with Interfaces.C;
|
||||
|
||||
package RTEMS.CPU_Usage is
|
||||
|
||||
--
|
||||
-- CPU Usage Statistics
|
||||
--
|
||||
|
||||
procedure Report;
|
||||
pragma Import (C, Report, "rtems_cpu_usage_report");
|
||||
|
||||
procedure Reset;
|
||||
pragma Import (C, Reset, "rtems_cpu_usage_reset");
|
||||
|
||||
end RTEMS.CPU_Usage;
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package body RTEMS.Debug is
|
||||
|
||||
--
|
||||
-- Debug Manager
|
||||
--
|
||||
|
||||
procedure Enable (To_Be_Enabled : in Set) is
|
||||
procedure Enable_Base (To_Be_Enabled : Set);
|
||||
pragma Import (C, Enable_Base, "rtems_debug_enable");
|
||||
begin
|
||||
|
||||
Enable_Base (To_Be_Enabled);
|
||||
|
||||
end Enable;
|
||||
|
||||
procedure Disable (To_Be_Disabled : in Set) is
|
||||
procedure Disable_Base (To_Be_Disabled : Set);
|
||||
pragma Import (C, Disable_Base, "rtems_debug_disable");
|
||||
begin
|
||||
|
||||
Disable_Base (To_Be_Disabled);
|
||||
|
||||
end Disable;
|
||||
|
||||
function Is_Enabled
|
||||
(Level : in Set)
|
||||
return RTEMS.Boolean
|
||||
is
|
||||
function Is_Enabled_Base
|
||||
(Level : Set)
|
||||
return RTEMS.Boolean;
|
||||
pragma Import (C, Is_Enabled_Base, "rtems_debug_is_enabled");
|
||||
begin
|
||||
|
||||
return Is_Enabled_Base (Level);
|
||||
|
||||
end Is_Enabled;
|
||||
|
||||
end RTEMS.Debug;
|
||||
@@ -0,0 +1,47 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package RTEMS.Debug is
|
||||
|
||||
subtype Set is RTEMS.Unsigned32;
|
||||
|
||||
--
|
||||
-- Debug Manager
|
||||
--
|
||||
|
||||
All_Mask : constant Set := 16#ffffffff#;
|
||||
Region : constant Set := 16#00000001#;
|
||||
|
||||
procedure Enable (
|
||||
To_Be_Enabled : in Set
|
||||
);
|
||||
|
||||
procedure Disable (
|
||||
To_Be_Disabled : in Set
|
||||
);
|
||||
|
||||
function Is_Enabled (
|
||||
Level : in Set
|
||||
) return RTEMS.Boolean;
|
||||
|
||||
end RTEMS.Debug;
|
||||
@@ -0,0 +1,72 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package body RTEMS.Event is
|
||||
|
||||
--
|
||||
-- Event Manager
|
||||
--
|
||||
|
||||
procedure Send
|
||||
(ID : in RTEMS.ID;
|
||||
Event_In : in RTEMS.Event_Set;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Send_Base
|
||||
(ID : RTEMS.ID;
|
||||
Event_In : RTEMS.Event_Set)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Send_Base, "rtems_event_send");
|
||||
begin
|
||||
|
||||
Result := Send_Base (ID, Event_In);
|
||||
|
||||
end Send;
|
||||
|
||||
procedure Receive
|
||||
(Event_In : in RTEMS.Event_Set;
|
||||
Option_Set : in RTEMS.Option;
|
||||
Ticks : in RTEMS.Interval;
|
||||
Event_Out : out RTEMS.Event_Set;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Receive_Base
|
||||
(Event_In : RTEMS.Event_Set;
|
||||
Option_Set : RTEMS.Option;
|
||||
Ticks : RTEMS.Interval;
|
||||
Event_Out : access RTEMS.Event_Set)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Receive_Base, "rtems_event_receive");
|
||||
Event_Out_Base : aliased RTEMS.Event_Set;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Receive_Base
|
||||
(Event_In,
|
||||
Option_Set,
|
||||
Ticks,
|
||||
Event_Out_Base'Access);
|
||||
Event_Out := Event_Out_Base;
|
||||
|
||||
end Receive;
|
||||
|
||||
end RTEMS.Event;
|
||||
@@ -0,0 +1,45 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package RTEMS.Event is
|
||||
|
||||
--
|
||||
-- Event Manager
|
||||
--
|
||||
|
||||
procedure Send (
|
||||
ID : in RTEMS.ID;
|
||||
Event_In : in RTEMS.Event_Set;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Receive (
|
||||
Event_In : in RTEMS.Event_Set;
|
||||
Option_Set : in RTEMS.Option;
|
||||
Ticks : in RTEMS.Interval;
|
||||
Event_Out : out RTEMS.Event_Set;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
end RTEMS.Event;
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package body RTEMS.Extension is
|
||||
|
||||
--
|
||||
-- Extension Manager
|
||||
--
|
||||
|
||||
procedure Create
|
||||
(Name : in RTEMS.Name;
|
||||
Table : in RTEMS.Extensions_Table_Pointer;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Create_Base
|
||||
(Name : RTEMS.Name;
|
||||
Table : RTEMS.Extensions_Table_Pointer;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Create_Base, "rtems_extension_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result := Create_Base (Name, Table, ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Create;
|
||||
|
||||
procedure Ident
|
||||
(Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Ident_Base
|
||||
(Name : RTEMS.Name;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Ident_Base, "rtems_extension_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result := Ident_Base (Name, ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Ident;
|
||||
|
||||
procedure Delete
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Delete_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Delete_Base, "rtems_extension_delete");
|
||||
begin
|
||||
|
||||
Result := Delete_Base (ID);
|
||||
|
||||
end Delete;
|
||||
|
||||
end RTEMS.Extension;
|
||||
@@ -0,0 +1,49 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package RTEMS.Extension is
|
||||
|
||||
--
|
||||
-- Extension Manager
|
||||
--
|
||||
|
||||
procedure Create (
|
||||
Name : in RTEMS.Name;
|
||||
Table : in RTEMS.Extensions_Table_Pointer;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Ident (
|
||||
Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Delete (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
end RTEMS.Extension;
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package body RTEMS.Fatal is
|
||||
|
||||
--
|
||||
-- Fatal Error Manager
|
||||
--
|
||||
|
||||
procedure Error_Occurred (The_Error : in RTEMS.Unsigned32) is
|
||||
procedure Error_Occurred_Base (The_Error : RTEMS.Unsigned32);
|
||||
pragma Import (C, Error_Occurred_Base, "rtems_fatal_error_occurred");
|
||||
begin
|
||||
|
||||
Error_Occurred_Base (The_Error);
|
||||
|
||||
end Error_Occurred;
|
||||
|
||||
end RTEMS.Fatal;
|
||||
@@ -0,0 +1,35 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package RTEMS.Fatal is
|
||||
|
||||
--
|
||||
-- Fatal Error Manager
|
||||
--
|
||||
|
||||
procedure Error_Occurred (
|
||||
The_Error : in RTEMS.Unsigned32
|
||||
);
|
||||
|
||||
end RTEMS.Fatal;
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package RTEMS.Interrupt is
|
||||
|
||||
--
|
||||
-- Interrupt Manager
|
||||
--
|
||||
|
||||
function Disable return RTEMS.ISR_Level;
|
||||
pragma Interface (C, Disable);
|
||||
pragma Interface_Name (Disable, "rtems_interrupt_disable");
|
||||
|
||||
procedure Enable (
|
||||
Level : in RTEMS.ISR_Level
|
||||
);
|
||||
pragma Interface (C, Enable);
|
||||
pragma Interface_Name (Enable, "rtems_interrupt_enable");
|
||||
|
||||
procedure Flash (
|
||||
Level : in RTEMS.ISR_Level
|
||||
);
|
||||
pragma Interface (C, Flash);
|
||||
pragma Interface_Name (Flash, "rtems_interrupt_flash");
|
||||
|
||||
function Is_In_Progress return RTEMS.Boolean;
|
||||
pragma Interface (C, Is_In_Progress);
|
||||
pragma Interface_Name (Is_In_Progress, "rtems_interrupt_is_in_progress");
|
||||
|
||||
end RTEMS.Interrupt;
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
with Ada;
|
||||
with Ada.Unchecked_Conversion;
|
||||
with Interfaces; use Interfaces;
|
||||
with Interfaces.C; use Interfaces.C;
|
||||
with Interfaces.C.Strings; use Interfaces.C.Strings;
|
||||
|
||||
package body RTEMS.IO is
|
||||
|
||||
--
|
||||
-- Input/Output Manager
|
||||
--
|
||||
|
||||
procedure Register_Name
|
||||
(Name : in String;
|
||||
Major : in RTEMS.Device_Major_Number;
|
||||
Minor : in RTEMS.Device_Minor_Number;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Register_Name_Base
|
||||
(Name : Interfaces.C.char_array;
|
||||
Major : RTEMS.Device_Major_Number;
|
||||
Minor : RTEMS.Device_Minor_Number)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Register_Name_Base, "rtems_io_register_name");
|
||||
begin
|
||||
|
||||
Result := Register_Name_Base (Interfaces.C.To_C (Name), Major, Minor);
|
||||
|
||||
end Register_Name;
|
||||
|
||||
procedure Lookup_Name
|
||||
(Name : in String;
|
||||
Device_Info : out RTEMS.Driver_Name_t;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Lookup_Name_Base
|
||||
(Name : Interfaces.C.char_array;
|
||||
Device_Info : access RTEMS.Driver_Name_t)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Lookup_Name_Base, "rtems_io_lookup_name");
|
||||
Device_Info_Base : aliased RTEMS.Driver_Name_t;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Lookup_Name_Base
|
||||
(Interfaces.C.To_C (Name),
|
||||
Device_Info_Base'Unchecked_Access);
|
||||
Device_Info := Device_Info_Base;
|
||||
|
||||
end Lookup_Name;
|
||||
|
||||
procedure Open
|
||||
(Major : in RTEMS.Device_Major_Number;
|
||||
Minor : in RTEMS.Device_Minor_Number;
|
||||
Argument : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Open_Base
|
||||
(Major : RTEMS.Device_Major_Number;
|
||||
Minor : RTEMS.Device_Minor_Number;
|
||||
Argument : RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Open_Base, "rtems_io_open");
|
||||
begin
|
||||
|
||||
Result := Open_Base (Major, Minor, Argument);
|
||||
|
||||
end Open;
|
||||
pragma Inline (Open);
|
||||
|
||||
procedure Close
|
||||
(Major : in RTEMS.Device_Major_Number;
|
||||
Minor : in RTEMS.Device_Minor_Number;
|
||||
Argument : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Close_Base
|
||||
(Major : RTEMS.Device_Major_Number;
|
||||
Minor : RTEMS.Device_Minor_Number;
|
||||
Argument : RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Close_Base, "rtems_io_close");
|
||||
begin
|
||||
|
||||
Result := Close_Base (Major, Minor, Argument);
|
||||
|
||||
end Close;
|
||||
pragma Inline (Close);
|
||||
|
||||
procedure Read
|
||||
(Major : in RTEMS.Device_Major_Number;
|
||||
Minor : in RTEMS.Device_Minor_Number;
|
||||
Argument : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Read_Base
|
||||
(Major : RTEMS.Device_Major_Number;
|
||||
Minor : RTEMS.Device_Minor_Number;
|
||||
Argument : RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Read_Base, "rtems_io_read");
|
||||
begin
|
||||
|
||||
Result := Read_Base (Major, Minor, Argument);
|
||||
|
||||
end Read;
|
||||
pragma Inline (Read);
|
||||
|
||||
procedure Write
|
||||
(Major : in RTEMS.Device_Major_Number;
|
||||
Minor : in RTEMS.Device_Minor_Number;
|
||||
Argument : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Write_Base
|
||||
(Major : RTEMS.Device_Major_Number;
|
||||
Minor : RTEMS.Device_Minor_Number;
|
||||
Argument : RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Write_Base, "rtems_io_write");
|
||||
begin
|
||||
|
||||
Result := Write_Base (Major, Minor, Argument);
|
||||
|
||||
end Write;
|
||||
pragma Inline (Write);
|
||||
|
||||
procedure Control
|
||||
(Major : in RTEMS.Device_Major_Number;
|
||||
Minor : in RTEMS.Device_Minor_Number;
|
||||
Argument : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Control_Base
|
||||
(Major : RTEMS.Device_Major_Number;
|
||||
Minor : RTEMS.Device_Minor_Number;
|
||||
Argument : RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Control_Base, "rtems_io_control");
|
||||
begin
|
||||
|
||||
Result := Control_Base (Major, Minor, Argument);
|
||||
|
||||
end Control;
|
||||
pragma Inline (Control);
|
||||
|
||||
end RTEMS.IO;
|
||||
@@ -0,0 +1,89 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
with System;
|
||||
with System.Storage_Elements; use System.Storage_Elements;
|
||||
with Interfaces;
|
||||
with Interfaces.C;
|
||||
|
||||
package RTEMS.IO is
|
||||
|
||||
--
|
||||
-- Input/Output Manager
|
||||
--
|
||||
|
||||
procedure Register_Name (
|
||||
Name : in String;
|
||||
Major : in RTEMS.Device_Major_Number;
|
||||
Minor : in RTEMS.Device_Minor_Number;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Lookup_Name (
|
||||
Name : in String;
|
||||
Device_Info : out RTEMS.Driver_Name_t;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Open (
|
||||
Major : in RTEMS.Device_Major_Number;
|
||||
Minor : in RTEMS.Device_Minor_Number;
|
||||
Argument : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
pragma Inline (Open);
|
||||
|
||||
procedure Close (
|
||||
Major : in RTEMS.Device_Major_Number;
|
||||
Minor : in RTEMS.Device_Minor_Number;
|
||||
Argument : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
pragma Inline (Close);
|
||||
|
||||
procedure Read (
|
||||
Major : in RTEMS.Device_Major_Number;
|
||||
Minor : in RTEMS.Device_Minor_Number;
|
||||
Argument : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
pragma Inline (Read);
|
||||
|
||||
procedure Write (
|
||||
Major : in RTEMS.Device_Major_Number;
|
||||
Minor : in RTEMS.Device_Minor_Number;
|
||||
Argument : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
pragma Inline (Write);
|
||||
|
||||
procedure Control (
|
||||
Major : in RTEMS.Device_Major_Number;
|
||||
Minor : in RTEMS.Device_Minor_Number;
|
||||
Argument : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
pragma Inline (Control);
|
||||
|
||||
end RTEMS.IO;
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package body RTEMS.Message_Queue is
|
||||
|
||||
--
|
||||
-- Message Queue Manager
|
||||
--
|
||||
|
||||
procedure Create
|
||||
(Name : in RTEMS.Name;
|
||||
Count : in RTEMS.Unsigned32;
|
||||
Max_Message_Size : in RTEMS.Unsigned32;
|
||||
Attribute_Set : in RTEMS.Attribute;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
-- XXX broken
|
||||
function Create_Base
|
||||
(Name : RTEMS.Name;
|
||||
Count : RTEMS.Unsigned32;
|
||||
Max_Message_Size : RTEMS.Unsigned32;
|
||||
Attribute_Set : RTEMS.Attribute;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Create_Base,
|
||||
"rtems_message_queue_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Create_Base
|
||||
(Name,
|
||||
Count,
|
||||
Max_Message_Size,
|
||||
Attribute_Set,
|
||||
ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Create;
|
||||
|
||||
procedure Ident
|
||||
(Name : in RTEMS.Name;
|
||||
Node : in RTEMS.Unsigned32;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Ident_Base
|
||||
(Name : RTEMS.Name;
|
||||
Node : RTEMS.Unsigned32;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Ident_Base,
|
||||
"rtems_message_queue_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result := Ident_Base (Name, Node, ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Ident;
|
||||
|
||||
procedure Delete
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Delete_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Delete_Base,
|
||||
"rtems_message_queue_delete");
|
||||
begin
|
||||
|
||||
Result := Delete_Base (ID);
|
||||
|
||||
end Delete;
|
||||
|
||||
procedure Send
|
||||
(ID : in RTEMS.ID;
|
||||
Buffer : in RTEMS.Address;
|
||||
Size : in RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Send_Base
|
||||
(ID : RTEMS.ID;
|
||||
Buffer : RTEMS.Address;
|
||||
Size : RTEMS.Unsigned32)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Send_Base, "rtems_message_queue_send");
|
||||
begin
|
||||
|
||||
Result := Send_Base (ID, Buffer, Size);
|
||||
|
||||
end Send;
|
||||
|
||||
procedure Urgent
|
||||
(ID : in RTEMS.ID;
|
||||
Buffer : in RTEMS.Address;
|
||||
Size : in RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Urgent_Base
|
||||
(ID : RTEMS.ID;
|
||||
Buffer : RTEMS.Address;
|
||||
Size : RTEMS.Unsigned32)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Urgent_Base,
|
||||
"rtems_message_queue_urgent");
|
||||
begin
|
||||
|
||||
Result := Urgent_Base (ID, Buffer, Size);
|
||||
|
||||
end Urgent;
|
||||
|
||||
procedure Broadcast
|
||||
(ID : in RTEMS.ID;
|
||||
Buffer : in RTEMS.Address;
|
||||
Size : in RTEMS.Unsigned32;
|
||||
Count : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Broadcast_Base
|
||||
(ID : RTEMS.ID;
|
||||
Buffer : RTEMS.Address;
|
||||
Size : RTEMS.Unsigned32;
|
||||
Count : access RTEMS.Unsigned32)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Broadcast_Base,
|
||||
"rtems_message_queue_broadcast");
|
||||
Count_Base : aliased RTEMS.Unsigned32;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Broadcast_Base (ID, Buffer, Size, Count_Base'Access);
|
||||
Count := Count_Base;
|
||||
|
||||
end Broadcast;
|
||||
|
||||
procedure Receive
|
||||
(ID : in RTEMS.ID;
|
||||
Buffer : in RTEMS.Address;
|
||||
Option_Set : in RTEMS.Option;
|
||||
Timeout : in RTEMS.Interval;
|
||||
Size : in out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Receive_Base
|
||||
(ID : RTEMS.ID;
|
||||
Buffer : RTEMS.Address;
|
||||
Size : access RTEMS.Unsigned32;
|
||||
Option_Set : RTEMS.Option;
|
||||
Timeout : RTEMS.Interval)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Receive_Base,
|
||||
"rtems_message_queue_receive");
|
||||
Size_Base : aliased RTEMS.Unsigned32;
|
||||
begin
|
||||
|
||||
Size_Base := Size;
|
||||
|
||||
Result :=
|
||||
Receive_Base
|
||||
(ID,
|
||||
Buffer,
|
||||
Size_Base'Access,
|
||||
Option_Set,
|
||||
Timeout);
|
||||
Size := Size_Base;
|
||||
|
||||
end Receive;
|
||||
|
||||
procedure Get_Number_Pending
|
||||
(ID : in RTEMS.ID;
|
||||
Count : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Get_Number_Pending_Base
|
||||
(ID : RTEMS.ID;
|
||||
Count : access RTEMS.Unsigned32)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Get_Number_Pending_Base,
|
||||
"rtems_message_queue_get_number_pending");
|
||||
COUNT_Base : aliased RTEMS.Unsigned32;
|
||||
begin
|
||||
|
||||
Result := Get_Number_Pending_Base (ID, COUNT_Base'Access);
|
||||
Count := COUNT_Base;
|
||||
|
||||
end Get_Number_Pending;
|
||||
|
||||
procedure Flush
|
||||
(ID : in RTEMS.ID;
|
||||
Count : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Flush_Base
|
||||
(ID : RTEMS.ID;
|
||||
Count : access RTEMS.Unsigned32)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Flush_Base,
|
||||
"rtems_message_queue_flush");
|
||||
COUNT_Base : aliased RTEMS.Unsigned32;
|
||||
begin
|
||||
|
||||
Result := Flush_Base (ID, COUNT_Base'Access);
|
||||
Count := COUNT_Base;
|
||||
|
||||
end Flush;
|
||||
|
||||
end RTEMS.Message_Queue;
|
||||
@@ -0,0 +1,95 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package RTEMS.Message_Queue is
|
||||
|
||||
--
|
||||
-- Message Queue Manager
|
||||
--
|
||||
|
||||
procedure Create (
|
||||
Name : in RTEMS.Name;
|
||||
Count : in RTEMS.Unsigned32;
|
||||
Max_Message_Size : in RTEMS.Unsigned32;
|
||||
Attribute_Set : in RTEMS.Attribute;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Ident (
|
||||
Name : in RTEMS.Name;
|
||||
Node : in RTEMS.Unsigned32;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Delete (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Send (
|
||||
ID : in RTEMS.ID;
|
||||
Buffer : in RTEMS.Address;
|
||||
Size : in RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Urgent (
|
||||
ID : in RTEMS.ID;
|
||||
Buffer : in RTEMS.Address;
|
||||
Size : in RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Broadcast (
|
||||
ID : in RTEMS.ID;
|
||||
Buffer : in RTEMS.Address;
|
||||
Size : in RTEMS.Unsigned32;
|
||||
Count : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Receive (
|
||||
ID : in RTEMS.ID;
|
||||
Buffer : in RTEMS.Address;
|
||||
Option_Set : in RTEMS.Option;
|
||||
Timeout : in RTEMS.Interval;
|
||||
Size : in out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Get_Number_Pending (
|
||||
ID : in RTEMS.ID;
|
||||
Count : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Flush (
|
||||
ID : in RTEMS.ID;
|
||||
Count : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
end RTEMS.Message_Queue;
|
||||
|
||||
@@ -0,0 +1,305 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
with Interfaces; use Interfaces;
|
||||
with Interfaces.C.Strings; use Interfaces.C.Strings;
|
||||
|
||||
package body RTEMS.Object is
|
||||
|
||||
--
|
||||
-- Object Services
|
||||
--
|
||||
|
||||
function Build_Name
|
||||
(C1 : in Character;
|
||||
C2 : in Character;
|
||||
C3 : in Character;
|
||||
C4 : in Character)
|
||||
return RTEMS.Name
|
||||
is
|
||||
C1_Value : RTEMS.Unsigned32;
|
||||
C2_Value : RTEMS.Unsigned32;
|
||||
C3_Value : RTEMS.Unsigned32;
|
||||
C4_Value : RTEMS.Unsigned32;
|
||||
begin
|
||||
|
||||
C1_Value := Character'Pos (C1);
|
||||
C2_Value := Character'Pos (C2);
|
||||
C3_Value := Character'Pos (C3);
|
||||
C4_Value := Character'Pos (C4);
|
||||
|
||||
return Interfaces.Shift_Left (C1_Value, 24) or
|
||||
Interfaces.Shift_Left (C2_Value, 16) or
|
||||
Interfaces.Shift_Left (C3_Value, 8) or
|
||||
C4_Value;
|
||||
|
||||
end Build_Name;
|
||||
|
||||
procedure Get_Classic_Name
|
||||
(ID : in RTEMS.ID;
|
||||
Name : out RTEMS.Name;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Get_Classic_Name_Base
|
||||
(ID : RTEMS.ID;
|
||||
Name : access RTEMS.Name)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Get_Classic_Name_Base,
|
||||
"rtems_object_get_classic_name");
|
||||
Tmp_Name : aliased RTEMS.Name;
|
||||
begin
|
||||
Result := Get_Classic_Name_Base (ID, Tmp_Name'Access);
|
||||
Name := Tmp_Name;
|
||||
end Get_Classic_Name;
|
||||
|
||||
procedure Get_Name
|
||||
(ID : in RTEMS.ID;
|
||||
Name : out String;
|
||||
Result : out RTEMS.Address)
|
||||
is
|
||||
function Get_Name_Base
|
||||
(ID : RTEMS.ID;
|
||||
Length : RTEMS.Unsigned32;
|
||||
Name : RTEMS.Address)
|
||||
return RTEMS.Address;
|
||||
pragma Import (C, Get_Name_Base, "rtems_object_get_name");
|
||||
begin
|
||||
Name := (others => ASCII.NUL);
|
||||
Result :=
|
||||
Get_Name_Base (ID, Name'Length, Name (Name'First)'Address);
|
||||
end Get_Name;
|
||||
|
||||
procedure Set_Name
|
||||
(ID : in RTEMS.ID;
|
||||
Name : in String;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Set_Name_Base
|
||||
(ID : RTEMS.ID;
|
||||
Name : chars_ptr)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Set_Name_Base, "rtems_object_set_name");
|
||||
NameAsCString : constant chars_ptr := New_String (Name);
|
||||
begin
|
||||
Result := Set_Name_Base (ID, NameAsCString);
|
||||
end Set_Name;
|
||||
|
||||
procedure Id_Get_API
|
||||
(ID : in RTEMS.ID;
|
||||
API : out RTEMS.Unsigned32)
|
||||
is
|
||||
function Id_Get_API_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Unsigned32;
|
||||
pragma Import (C, Id_Get_API_Base, "rtems_object_id_get_api");
|
||||
begin
|
||||
API := Id_Get_API_Base (ID);
|
||||
end Id_Get_API;
|
||||
|
||||
procedure Id_Get_Class
|
||||
(ID : in RTEMS.ID;
|
||||
The_Class : out RTEMS.Unsigned32)
|
||||
is
|
||||
function Id_Get_Class_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Unsigned32;
|
||||
pragma Import
|
||||
(C,
|
||||
Id_Get_Class_Base,
|
||||
"rtems_object_id_get_class");
|
||||
begin
|
||||
The_Class := Id_Get_Class_Base (ID);
|
||||
end Id_Get_Class;
|
||||
|
||||
procedure Id_Get_Node
|
||||
(ID : in RTEMS.ID;
|
||||
Node : out RTEMS.Unsigned32)
|
||||
is
|
||||
function Id_Get_Node_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Unsigned32;
|
||||
pragma Import (C, Id_Get_Node_Base, "rtems_object_id_get_node");
|
||||
begin
|
||||
Node := Id_Get_Node_Base (ID);
|
||||
end Id_Get_Node;
|
||||
|
||||
procedure Id_Get_Index
|
||||
(ID : in RTEMS.ID;
|
||||
Index : out RTEMS.Unsigned32)
|
||||
is
|
||||
function Id_Get_Index_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Unsigned32;
|
||||
pragma Import
|
||||
(C,
|
||||
Id_Get_Index_Base,
|
||||
"rtems_object_id_get_index");
|
||||
begin
|
||||
Index := Id_Get_Index_Base (ID);
|
||||
end Id_Get_Index;
|
||||
|
||||
function Build_Id
|
||||
(The_API : in RTEMS.Unsigned32;
|
||||
The_Class : in RTEMS.Unsigned32;
|
||||
The_Node : in RTEMS.Unsigned32;
|
||||
The_Index : in RTEMS.Unsigned32)
|
||||
return RTEMS.ID
|
||||
is
|
||||
function Build_Id_Base
|
||||
(The_API : RTEMS.Unsigned32;
|
||||
The_Class : RTEMS.Unsigned32;
|
||||
The_Node : RTEMS.Unsigned32;
|
||||
The_Index : RTEMS.Unsigned32)
|
||||
return RTEMS.ID;
|
||||
pragma Import (C, Build_Id_Base, "rtems_build_id");
|
||||
begin
|
||||
return Build_Id_Base (The_API, The_Class, The_Node, The_Index);
|
||||
end Build_Id;
|
||||
|
||||
function Id_API_Minimum return RTEMS.Unsigned32 is
|
||||
function Id_API_Minimum_Base return RTEMS.Unsigned32;
|
||||
pragma Import
|
||||
(C,
|
||||
Id_API_Minimum_Base,
|
||||
"rtems_object_id_api_minimum");
|
||||
begin
|
||||
return Id_API_Minimum_Base;
|
||||
end Id_API_Minimum;
|
||||
|
||||
function Id_API_Maximum return RTEMS.Unsigned32 is
|
||||
function Id_API_Maximum_Base return RTEMS.Unsigned32;
|
||||
pragma Import
|
||||
(C,
|
||||
Id_API_Maximum_Base,
|
||||
"rtems_object_id_api_maximum");
|
||||
begin
|
||||
return Id_API_Maximum_Base;
|
||||
end Id_API_Maximum;
|
||||
|
||||
procedure API_Minimum_Class
|
||||
(API : in RTEMS.Unsigned32;
|
||||
Minimum : out RTEMS.Unsigned32)
|
||||
is
|
||||
function API_Minimum_Class_Base
|
||||
(API : RTEMS.Unsigned32)
|
||||
return RTEMS.Unsigned32;
|
||||
pragma Import
|
||||
(C,
|
||||
API_Minimum_Class_Base,
|
||||
"rtems_object_api_minimum_class");
|
||||
begin
|
||||
Minimum := API_Minimum_Class_Base (API);
|
||||
end API_Minimum_Class;
|
||||
|
||||
procedure API_Maximum_Class
|
||||
(API : in RTEMS.Unsigned32;
|
||||
Maximum : out RTEMS.Unsigned32)
|
||||
is
|
||||
function API_Maximum_Class_Base
|
||||
(API : RTEMS.Unsigned32)
|
||||
return RTEMS.Unsigned32;
|
||||
pragma Import
|
||||
(C,
|
||||
API_Maximum_Class_Base,
|
||||
"rtems_object_api_maximum_class");
|
||||
begin
|
||||
Maximum := API_Maximum_Class_Base (API);
|
||||
end API_Maximum_Class;
|
||||
|
||||
-- Translate S from a C-style char* into an Ada String.
|
||||
-- If S is Null_Ptr, return "", don't raise an exception.
|
||||
-- Copied from Lovelace Tutorial
|
||||
function Value_Without_Exception (S : chars_ptr) return String is
|
||||
begin
|
||||
if S = Null_Ptr then
|
||||
return "";
|
||||
else
|
||||
return Value (S);
|
||||
end if;
|
||||
end Value_Without_Exception;
|
||||
pragma Inline (Value_Without_Exception);
|
||||
|
||||
procedure Get_API_Name
|
||||
(API : in RTEMS.Unsigned32;
|
||||
Name : out String)
|
||||
is
|
||||
function Get_API_Name_Base
|
||||
(API : RTEMS.Unsigned32)
|
||||
return chars_ptr;
|
||||
pragma Import
|
||||
(C,
|
||||
Get_API_Name_Base,
|
||||
"rtems_object_get_api_name");
|
||||
Result : constant chars_ptr := Get_API_Name_Base (API);
|
||||
APIName : constant String := Value_Without_Exception (Result);
|
||||
begin
|
||||
Name := APIName;
|
||||
end Get_API_Name;
|
||||
|
||||
procedure Get_API_Class_Name
|
||||
(The_API : in RTEMS.Unsigned32;
|
||||
The_Class : in RTEMS.Unsigned32;
|
||||
Name : out String)
|
||||
is
|
||||
function Get_API_Class_Name_Base
|
||||
(API : RTEMS.Unsigned32;
|
||||
Class : RTEMS.Unsigned32)
|
||||
return chars_ptr;
|
||||
pragma Import
|
||||
(C,
|
||||
Get_API_Class_Name_Base,
|
||||
"rtems_object_get_api_class_name");
|
||||
Result : constant chars_ptr :=
|
||||
Get_API_Class_Name_Base (The_API, The_Class);
|
||||
ClassName : constant String := Value_Without_Exception (Result);
|
||||
begin
|
||||
Name := ClassName;
|
||||
end Get_API_Class_Name;
|
||||
|
||||
procedure Get_Class_Information
|
||||
(The_API : in RTEMS.Unsigned32;
|
||||
The_Class : in RTEMS.Unsigned32;
|
||||
Info : out API_Class_Information;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Get_Class_Information_Base
|
||||
(The_API : RTEMS.Unsigned32;
|
||||
The_Class : RTEMS.Unsigned32;
|
||||
Info : access API_Class_Information)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Get_Class_Information_Base,
|
||||
"rtems_object_get_class_information");
|
||||
TmpInfo : aliased API_Class_Information;
|
||||
begin
|
||||
Result :=
|
||||
Get_Class_Information_Base
|
||||
(The_API,
|
||||
The_Class,
|
||||
TmpInfo'Access);
|
||||
Info := TmpInfo;
|
||||
end Get_Class_Information;
|
||||
|
||||
end RTEMS.Object;
|
||||
@@ -0,0 +1,123 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package RTEMS.Object is
|
||||
|
||||
--
|
||||
-- Object Services
|
||||
--
|
||||
|
||||
function Build_Name (
|
||||
C1 : in Character;
|
||||
C2 : in Character;
|
||||
C3 : in Character;
|
||||
C4 : in Character
|
||||
) return RTEMS.Name;
|
||||
|
||||
procedure Get_Classic_Name(
|
||||
ID : in RTEMS.ID;
|
||||
Name : out RTEMS.Name;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Get_Name(
|
||||
ID : in RTEMS.ID;
|
||||
Name : out String;
|
||||
Result : out RTEMS.Address
|
||||
);
|
||||
|
||||
procedure Set_Name(
|
||||
ID : in RTEMS.ID;
|
||||
Name : in String;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Id_Get_API(
|
||||
ID : in RTEMS.ID;
|
||||
API : out RTEMS.Unsigned32
|
||||
);
|
||||
|
||||
procedure Id_Get_Class(
|
||||
ID : in RTEMS.ID;
|
||||
The_Class : out RTEMS.Unsigned32
|
||||
);
|
||||
|
||||
procedure Id_Get_Node(
|
||||
ID : in RTEMS.ID;
|
||||
Node : out RTEMS.Unsigned32
|
||||
);
|
||||
|
||||
procedure Id_Get_Index(
|
||||
ID : in RTEMS.ID;
|
||||
Index : out RTEMS.Unsigned32
|
||||
);
|
||||
|
||||
function Build_Id(
|
||||
The_API : in RTEMS.Unsigned32;
|
||||
The_Class : in RTEMS.Unsigned32;
|
||||
The_Node : in RTEMS.Unsigned32;
|
||||
The_Index : in RTEMS.Unsigned32
|
||||
) return RTEMS.Id;
|
||||
|
||||
function Id_API_Minimum return RTEMS.Unsigned32;
|
||||
|
||||
function Id_API_Maximum return RTEMS.Unsigned32;
|
||||
|
||||
procedure API_Minimum_Class(
|
||||
API : in RTEMS.Unsigned32;
|
||||
Minimum : out RTEMS.Unsigned32
|
||||
);
|
||||
|
||||
procedure API_Maximum_Class(
|
||||
API : in RTEMS.Unsigned32;
|
||||
Maximum : out RTEMS.Unsigned32
|
||||
);
|
||||
|
||||
procedure Get_API_Name(
|
||||
API : in RTEMS.Unsigned32;
|
||||
Name : out String
|
||||
);
|
||||
|
||||
procedure Get_API_Class_Name(
|
||||
The_API : in RTEMS.Unsigned32;
|
||||
The_Class : in RTEMS.Unsigned32;
|
||||
Name : out String
|
||||
);
|
||||
|
||||
type API_Class_Information is
|
||||
record
|
||||
Minimum_Id : RTEMS.Id;
|
||||
Maximum_Id : RTEMS.Id;
|
||||
Maximum : RTEMS.Unsigned32;
|
||||
AutoExtend : RTEMS.Boolean;
|
||||
Unallocated : RTEMS.Unsigned32;
|
||||
end record;
|
||||
|
||||
procedure Get_Class_Information(
|
||||
The_API : in RTEMS.Unsigned32;
|
||||
The_Class : in RTEMS.Unsigned32;
|
||||
Info : out API_Class_Information;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
end RTEMS.Object;
|
||||
@@ -0,0 +1,136 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package body RTEMS.Partition is
|
||||
|
||||
--
|
||||
-- Partition Manager
|
||||
--
|
||||
|
||||
procedure Create
|
||||
(Name : in RTEMS.Name;
|
||||
Starting_Address : in RTEMS.Address;
|
||||
Length : in RTEMS.Unsigned32;
|
||||
Buffer_Size : in RTEMS.Unsigned32;
|
||||
Attribute_Set : in RTEMS.Attribute;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Create_Base
|
||||
(Name : RTEMS.Name;
|
||||
Starting_Address : RTEMS.Address;
|
||||
Length : RTEMS.Unsigned32;
|
||||
Buffer_Size : RTEMS.Unsigned32;
|
||||
Attribute_Set : RTEMS.Attribute;
|
||||
ID : access RTEMS.Event_Set)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Create_Base, "rtems_partition_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Create_Base
|
||||
(Name,
|
||||
Starting_Address,
|
||||
Length,
|
||||
Buffer_Size,
|
||||
Attribute_Set,
|
||||
ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Create;
|
||||
|
||||
procedure Ident
|
||||
(Name : in RTEMS.Name;
|
||||
Node : in RTEMS.Unsigned32;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Ident_Base
|
||||
(Name : RTEMS.Name;
|
||||
Node : RTEMS.Unsigned32;
|
||||
ID : access RTEMS.Event_Set)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Ident_Base, "rtems_partition_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result := Ident_Base (Name, Node, ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Ident;
|
||||
|
||||
procedure Delete
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Delete_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Delete_Base, "rtems_partition_delete");
|
||||
begin
|
||||
|
||||
Result := Delete_Base (ID);
|
||||
|
||||
end Delete;
|
||||
|
||||
procedure Get_Buffer
|
||||
(ID : in RTEMS.ID;
|
||||
Buffer : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Get_Buffer_Base
|
||||
(ID : RTEMS.ID;
|
||||
Buffer : access RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Get_Buffer_Base,
|
||||
"rtems_partition_get_buffer");
|
||||
Buffer_Base : aliased RTEMS.Address;
|
||||
begin
|
||||
|
||||
Result := Get_Buffer_Base (ID, Buffer_Base'Access);
|
||||
Buffer := Buffer_Base;
|
||||
|
||||
end Get_Buffer;
|
||||
|
||||
procedure Return_Buffer
|
||||
(ID : in RTEMS.ID;
|
||||
Buffer : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Return_Buffer_Base
|
||||
(ID : RTEMS.Name;
|
||||
Buffer : RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Return_Buffer_Base,
|
||||
"rtems_partition_return_buffer");
|
||||
begin
|
||||
|
||||
Result := Return_Buffer_Base (ID, Buffer);
|
||||
|
||||
end Return_Buffer;
|
||||
|
||||
end RTEMS.Partition;
|
||||
@@ -0,0 +1,65 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package RTEMS.Partition is
|
||||
|
||||
--
|
||||
-- Partition Manager
|
||||
--
|
||||
|
||||
procedure Create (
|
||||
Name : in RTEMS.Name;
|
||||
Starting_Address : in RTEMS.Address;
|
||||
Length : in RTEMS.Unsigned32;
|
||||
Buffer_Size : in RTEMS.Unsigned32;
|
||||
Attribute_Set : in RTEMS.Attribute;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Ident (
|
||||
Name : in RTEMS.Name;
|
||||
Node : in RTEMS.Unsigned32;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Delete (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Get_Buffer (
|
||||
ID : in RTEMS.ID;
|
||||
Buffer : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Return_Buffer (
|
||||
ID : in RTEMS.ID;
|
||||
Buffer : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
end RTEMS.Partition;
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package body RTEMS.Port is
|
||||
|
||||
--
|
||||
-- Dual Ported Memory Manager
|
||||
--
|
||||
|
||||
procedure Create
|
||||
(Name : in RTEMS.Name;
|
||||
Internal_Start : in RTEMS.Address;
|
||||
External_Start : in RTEMS.Address;
|
||||
Length : in RTEMS.Unsigned32;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Create_Base
|
||||
(Name : RTEMS.Name;
|
||||
Internal_Start : RTEMS.Address;
|
||||
External_Start : RTEMS.Address;
|
||||
Length : RTEMS.Unsigned32;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Create_Base, "rtems_port_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Create_Base
|
||||
(Name,
|
||||
Internal_Start,
|
||||
External_Start,
|
||||
Length,
|
||||
ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Create;
|
||||
|
||||
procedure Ident
|
||||
(Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Ident_Base
|
||||
(Name : RTEMS.Name;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Ident_Base, "rtems_port_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result := Ident_Base (Name, ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Ident;
|
||||
|
||||
procedure Delete
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Delete_Base (ID : RTEMS.ID) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Delete_Base, "rtems_port_delete");
|
||||
begin
|
||||
|
||||
Result := Delete_Base (ID);
|
||||
|
||||
end Delete;
|
||||
|
||||
procedure External_To_Internal
|
||||
(ID : in RTEMS.ID;
|
||||
External : in RTEMS.Address;
|
||||
Internal : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function External_To_Internal_Base
|
||||
(ID : RTEMS.ID;
|
||||
External : RTEMS.Address;
|
||||
Internal : access RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
External_To_Internal_Base,
|
||||
"rtems_port_external_to_internal");
|
||||
Internal_Base : aliased RTEMS.Address;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
External_To_Internal_Base (ID, External, Internal_Base'Access);
|
||||
Internal := Internal_Base;
|
||||
|
||||
end External_To_Internal;
|
||||
|
||||
procedure Internal_To_External
|
||||
(ID : in RTEMS.ID;
|
||||
Internal : in RTEMS.Address;
|
||||
External : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Internal_To_External_Base
|
||||
(ID : RTEMS.ID;
|
||||
Internal : RTEMS.Address;
|
||||
External : access RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Internal_To_External_Base,
|
||||
"rtems_port_internal_to_external");
|
||||
External_Base : aliased RTEMS.Address;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Internal_To_External_Base (ID, Internal, External_Base'Access);
|
||||
External := External_Base;
|
||||
|
||||
end Internal_To_External;
|
||||
|
||||
end RTEMS.Port;
|
||||
@@ -0,0 +1,65 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package RTEMS.Port is
|
||||
|
||||
--
|
||||
-- Dual Ported Memory Manager
|
||||
--
|
||||
|
||||
procedure Create (
|
||||
Name : in RTEMS.Name;
|
||||
Internal_Start : in RTEMS.Address;
|
||||
External_Start : in RTEMS.Address;
|
||||
Length : in RTEMS.Unsigned32;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Ident (
|
||||
Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Delete (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure External_To_Internal (
|
||||
ID : in RTEMS.ID;
|
||||
External : in RTEMS.Address;
|
||||
Internal : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Internal_To_External (
|
||||
ID : in RTEMS.ID;
|
||||
Internal : in RTEMS.Address;
|
||||
External : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
end RTEMS.Port;
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package body RTEMS.Rate_Monotonic is
|
||||
|
||||
--
|
||||
-- Rate Monotonic Manager
|
||||
--
|
||||
|
||||
procedure Create
|
||||
(Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Create_Base
|
||||
(Name : RTEMS.Name;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Create_Base,
|
||||
"rtems_rate_monotonic_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result := Create_Base (Name, ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Create;
|
||||
|
||||
procedure Ident
|
||||
(Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Ident_Base
|
||||
(Name : RTEMS.Name;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Ident_Base,
|
||||
"rtems_rate_monotonic_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result := Ident_Base (Name, ID_Base'Access);
|
||||
|
||||
ID := ID_Base;
|
||||
|
||||
end Ident;
|
||||
|
||||
procedure Delete
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Delete_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Delete_Base,
|
||||
"rtems_rate_monotonic_delete");
|
||||
begin
|
||||
|
||||
Result := Delete_Base (ID);
|
||||
|
||||
end Delete;
|
||||
|
||||
procedure Cancel
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Cancel_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Cancel_Base,
|
||||
"rtems_rate_monotonic_cancel");
|
||||
begin
|
||||
|
||||
Result := Cancel_Base (ID);
|
||||
|
||||
end Cancel;
|
||||
|
||||
procedure Period
|
||||
(ID : in RTEMS.ID;
|
||||
Length : in RTEMS.Interval;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Period_Base
|
||||
(ID : RTEMS.ID;
|
||||
Length : RTEMS.Interval)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Period_Base,
|
||||
"rtems_rate_monotonic_period");
|
||||
begin
|
||||
|
||||
Result := Period_Base (ID, Length);
|
||||
|
||||
end Period;
|
||||
|
||||
procedure Get_Status
|
||||
(ID : in RTEMS.ID;
|
||||
Status : out RTEMS.Rate_Monotonic.Period_Status;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Get_Status_Base
|
||||
(ID : RTEMS.ID;
|
||||
Status : access RTEMS.Rate_Monotonic.Period_Status)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Get_Status_Base,
|
||||
"rtems_rate_monotonic_get_status");
|
||||
|
||||
Status_Base : aliased RTEMS.Rate_Monotonic.Period_Status;
|
||||
begin
|
||||
|
||||
Result := Get_Status_Base (ID, Status_Base'Access);
|
||||
|
||||
Status := Status_Base;
|
||||
|
||||
end Get_Status;
|
||||
|
||||
procedure Reset_Statistics
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Reset_Statistics_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Reset_Statistics_Base,
|
||||
"rtems_rate_monotonic_reset_statistics");
|
||||
begin
|
||||
|
||||
Result := Reset_Statistics_Base (ID);
|
||||
|
||||
end Reset_Statistics;
|
||||
|
||||
end RTEMS.Rate_Monotonic;
|
||||
@@ -0,0 +1,116 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package RTEMS.Rate_Monotonic is
|
||||
|
||||
--
|
||||
-- The following type defines the status information returned
|
||||
-- about a period.
|
||||
--
|
||||
|
||||
type Period_States is (
|
||||
Inactive, -- off chain, never initialized
|
||||
Owner_Is_Blocking, -- on chain, owner is blocking on it
|
||||
Active, -- on chain, running continuously
|
||||
Expired_While_Blocking, -- on chain, expired while owner was was blocking
|
||||
Expired -- off chain, will be reset by next
|
||||
-- rtems_rate_monotonic_period
|
||||
);
|
||||
|
||||
for Period_States'Size use 32;
|
||||
|
||||
for Period_States use (
|
||||
Inactive => 0,
|
||||
Owner_Is_Blocking => 1,
|
||||
Active => 2,
|
||||
Expired_While_Blocking => 3,
|
||||
Expired => 4
|
||||
);
|
||||
|
||||
type Period_Status is
|
||||
record
|
||||
Owner : RTEMS.ID;
|
||||
State : RTEMS.Rate_Monotonic.Period_States;
|
||||
Ticks_Since_Last_Period : RTEMS.Unsigned32;
|
||||
Ticks_Executed_Since_Last_Period : RTEMS.Unsigned32;
|
||||
end record;
|
||||
|
||||
--
|
||||
-- Rate Monotonic Manager
|
||||
--
|
||||
|
||||
procedure Create (
|
||||
Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Ident (
|
||||
Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Delete (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Cancel (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Period (
|
||||
ID : in RTEMS.ID;
|
||||
Length : in RTEMS.Interval;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Get_Status (
|
||||
ID : in RTEMS.ID;
|
||||
Status : out RTEMS.Rate_Monotonic.Period_Status;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Reset_Statistics (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Reset_All_Statistics;
|
||||
pragma Import (
|
||||
C,
|
||||
Reset_All_Statistics,
|
||||
"rtems_rate_monotonic_reset_all_statistics"
|
||||
);
|
||||
|
||||
procedure Report_Statistics;
|
||||
pragma Import (
|
||||
C,
|
||||
Report_Statistics,
|
||||
"rtems_rate_monotonic_report_statistics"
|
||||
);
|
||||
|
||||
end RTEMS.Rate_Monotonic;
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package body RTEMS.Region is
|
||||
|
||||
--
|
||||
-- Region Manager
|
||||
--
|
||||
|
||||
procedure Create
|
||||
(Name : in RTEMS.Name;
|
||||
Starting_Address : in RTEMS.Address;
|
||||
Length : in RTEMS.Unsigned32;
|
||||
Page_Size : in RTEMS.Unsigned32;
|
||||
Attribute_Set : in RTEMS.Attribute;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Create_Base
|
||||
(Name : RTEMS.Name;
|
||||
Starting_Address : RTEMS.Address;
|
||||
Length : RTEMS.Unsigned32;
|
||||
Page_Size : RTEMS.Unsigned32;
|
||||
Attribute_Set : RTEMS.Attribute;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Create_Base, "rtems_region_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Create_Base
|
||||
(Name,
|
||||
Starting_Address,
|
||||
Length,
|
||||
Page_Size,
|
||||
Attribute_Set,
|
||||
ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Create;
|
||||
|
||||
procedure Ident
|
||||
(Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Ident_Base
|
||||
(Name : RTEMS.Name;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Ident_Base, "rtems_region_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result := Ident_Base (Name, ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Ident;
|
||||
|
||||
procedure Delete
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Delete_Base (ID : RTEMS.ID) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Delete_Base, "rtems_region_delete");
|
||||
begin
|
||||
|
||||
Result := Delete_Base (ID);
|
||||
|
||||
end Delete;
|
||||
|
||||
procedure Extend
|
||||
(ID : in RTEMS.ID;
|
||||
Starting_Address : in RTEMS.Address;
|
||||
Length : in RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Extend_Base
|
||||
(ID : RTEMS.ID;
|
||||
Starting_Address : RTEMS.Address;
|
||||
Length : RTEMS.Unsigned32)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Extend_Base, "rtems_region_extend");
|
||||
begin
|
||||
|
||||
Result := Extend_Base (ID, Starting_Address, Length);
|
||||
|
||||
end Extend;
|
||||
|
||||
procedure Get_Segment
|
||||
(ID : in RTEMS.ID;
|
||||
Size : in RTEMS.Unsigned32;
|
||||
Option_Set : in RTEMS.Option;
|
||||
Timeout : in RTEMS.Interval;
|
||||
Segment : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Get_Segment_Base
|
||||
(ID : RTEMS.ID;
|
||||
Size : RTEMS.Unsigned32;
|
||||
Option_Set : RTEMS.Option;
|
||||
Timeout : RTEMS.Interval;
|
||||
Segment : access RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Get_Segment_Base, "rtems_region_get_segment");
|
||||
Segment_Base : aliased RTEMS.Address;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Get_Segment_Base
|
||||
(ID,
|
||||
Size,
|
||||
Option_Set,
|
||||
Timeout,
|
||||
Segment_Base'Access);
|
||||
Segment := Segment_Base;
|
||||
|
||||
end Get_Segment;
|
||||
|
||||
procedure Get_Segment_Size
|
||||
(ID : in RTEMS.ID;
|
||||
Segment : in RTEMS.Address;
|
||||
Size : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Get_Segment_Size_Base
|
||||
(ID : RTEMS.ID;
|
||||
Segment : RTEMS.Address;
|
||||
Size : access RTEMS.Unsigned32)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Get_Segment_Size_Base,
|
||||
"rtems_region_get_segment_size");
|
||||
Size_Base : aliased RTEMS.Unsigned32;
|
||||
begin
|
||||
|
||||
Result := Get_Segment_Size_Base (ID, Segment, Size_Base'Access);
|
||||
Size := Size_Base;
|
||||
|
||||
end Get_Segment_Size;
|
||||
|
||||
procedure Return_Segment
|
||||
(ID : in RTEMS.ID;
|
||||
Segment : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Return_Segment_Base
|
||||
(ID : RTEMS.ID;
|
||||
Segment : RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Return_Segment_Base,
|
||||
"rtems_region_return_segment");
|
||||
begin
|
||||
|
||||
Result := Return_Segment_Base (ID, Segment);
|
||||
|
||||
end Return_Segment;
|
||||
|
||||
procedure Resize_Segment
|
||||
(ID : in RTEMS.ID;
|
||||
Segment : in RTEMS.Address;
|
||||
Size : in RTEMS.Unsigned32;
|
||||
Old_Size : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Resize_Segment_Base
|
||||
(ID : RTEMS.ID;
|
||||
Segment : RTEMS.Address;
|
||||
Size : RTEMS.Unsigned32;
|
||||
Old_Size : access RTEMS.Unsigned32)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Resize_Segment_Base,
|
||||
"rtems_region_resize_segment");
|
||||
Old_Size_Base : aliased RTEMS.Unsigned32;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Resize_Segment_Base (ID, Segment, Size, Old_Size_Base'Access);
|
||||
Old_Size := Old_Size_Base;
|
||||
|
||||
end Resize_Segment;
|
||||
|
||||
end RTEMS.Region;
|
||||
@@ -0,0 +1,89 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package RTEMS.Region is
|
||||
|
||||
--
|
||||
-- Region Manager
|
||||
--
|
||||
|
||||
procedure Create (
|
||||
Name : in RTEMS.Name;
|
||||
Starting_Address : in RTEMS.Address;
|
||||
Length : in RTEMS.Unsigned32;
|
||||
Page_Size : in RTEMS.Unsigned32;
|
||||
Attribute_Set : in RTEMS.Attribute;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Ident (
|
||||
Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Delete (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Extend (
|
||||
ID : in RTEMS.ID;
|
||||
Starting_Address : in RTEMS.Address;
|
||||
Length : in RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Get_Segment (
|
||||
ID : in RTEMS.ID;
|
||||
Size : in RTEMS.Unsigned32;
|
||||
Option_Set : in RTEMS.Option;
|
||||
Timeout : in RTEMS.Interval;
|
||||
Segment : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Get_Segment_Size (
|
||||
ID : in RTEMS.ID;
|
||||
Segment : in RTEMS.Address;
|
||||
Size : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Return_Segment (
|
||||
ID : in RTEMS.ID;
|
||||
Segment : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Resize_Segment (
|
||||
ID : in RTEMS.ID;
|
||||
Segment : in RTEMS.Address;
|
||||
Size : in RTEMS.Unsigned32;
|
||||
Old_Size : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
end RTEMS.Region;
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package body RTEMS.Semaphore is
|
||||
|
||||
--
|
||||
-- Semaphore Manager
|
||||
--
|
||||
|
||||
procedure Create
|
||||
(Name : in RTEMS.Name;
|
||||
Count : in RTEMS.Unsigned32;
|
||||
Attribute_Set : in RTEMS.Attribute;
|
||||
Priority_Ceiling : in RTEMS.Tasks.Priority;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Create_Base
|
||||
(Name : RTEMS.Name;
|
||||
Count : RTEMS.Unsigned32;
|
||||
Attribute_Set : RTEMS.Attribute;
|
||||
Priority_Ceiling : RTEMS.Tasks.Priority;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Create_Base, "rtems_semaphore_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Create_Base
|
||||
(Name,
|
||||
Count,
|
||||
Attribute_Set,
|
||||
Priority_Ceiling,
|
||||
ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Create;
|
||||
|
||||
procedure Delete
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Delete_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Delete_Base, "rtems_semaphore_delete");
|
||||
begin
|
||||
|
||||
Result := Delete_Base (ID);
|
||||
|
||||
end Delete;
|
||||
|
||||
procedure Ident
|
||||
(Name : in RTEMS.Name;
|
||||
Node : in RTEMS.Unsigned32;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Ident_Base
|
||||
(Name : RTEMS.Name;
|
||||
Node : RTEMS.Unsigned32;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Ident_Base, "rtems_semaphore_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result := Ident_Base (Name, Node, ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Ident;
|
||||
|
||||
procedure Obtain
|
||||
(ID : in RTEMS.ID;
|
||||
Option_Set : in RTEMS.Option;
|
||||
Timeout : in RTEMS.Interval;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Obtain_Base
|
||||
(ID : RTEMS.ID;
|
||||
Option_Set : RTEMS.Option;
|
||||
Timeout : RTEMS.Interval)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Obtain_Base, "rtems_semaphore_obtain");
|
||||
begin
|
||||
|
||||
Result := Obtain_Base (ID, Option_Set, Timeout);
|
||||
|
||||
end Obtain;
|
||||
|
||||
procedure Release
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Release_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Release_Base, "rtems_semaphore_release");
|
||||
begin
|
||||
|
||||
Result := Release_Base (ID);
|
||||
|
||||
end Release;
|
||||
|
||||
procedure Flush
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Flush_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Flush_Base, "rtems_semaphore_flush");
|
||||
begin
|
||||
|
||||
Result := Flush_Base (ID);
|
||||
|
||||
end Flush;
|
||||
|
||||
end RTEMS.Semaphore;
|
||||
@@ -0,0 +1,71 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
with RTEMS.Tasks;
|
||||
|
||||
package RTEMS.Semaphore is
|
||||
|
||||
--
|
||||
-- Semaphore Manager
|
||||
--
|
||||
|
||||
procedure Create (
|
||||
Name : in RTEMS.Name;
|
||||
Count : in RTEMS.Unsigned32;
|
||||
Attribute_Set : in RTEMS.Attribute;
|
||||
Priority_Ceiling : in RTEMS.Tasks.Priority;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Delete (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Ident (
|
||||
Name : in RTEMS.Name;
|
||||
Node : in RTEMS.Unsigned32;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Obtain (
|
||||
ID : in RTEMS.ID;
|
||||
Option_Set : in RTEMS.Option;
|
||||
Timeout : in RTEMS.Interval;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Release (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Flush (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
end RTEMS.Semaphore;
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package body RTEMS.Signal is
|
||||
|
||||
--
|
||||
-- Signal Manager
|
||||
--
|
||||
|
||||
procedure Catch
|
||||
(ASR_Handler : in RTEMS.ASR_Handler;
|
||||
Mode_Set : in RTEMS.Mode;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Catch_Base
|
||||
(ASR_Handler : RTEMS.ASR_Handler;
|
||||
Mode_Set : RTEMS.Mode)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Catch_Base, "rtems_signal_catch");
|
||||
begin
|
||||
|
||||
Result := Catch_Base (ASR_Handler, Mode_Set);
|
||||
|
||||
end Catch;
|
||||
|
||||
procedure Send
|
||||
(ID : in RTEMS.ID;
|
||||
Signal_Set : in RTEMS.Signal_Set;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Send_Base
|
||||
(ID : RTEMS.ID;
|
||||
Signal_Set : RTEMS.Signal_Set)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Send_Base, "rtems_signal_send");
|
||||
begin
|
||||
|
||||
Result := Send_Base (ID, Signal_Set);
|
||||
|
||||
end Send;
|
||||
|
||||
end RTEMS.Signal;
|
||||
@@ -0,0 +1,43 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package RTEMS.Signal is
|
||||
|
||||
--
|
||||
-- Signal Manager
|
||||
--
|
||||
|
||||
procedure Catch (
|
||||
ASR_Handler : in RTEMS.ASR_Handler;
|
||||
Mode_Set : in RTEMS.Mode;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Send (
|
||||
ID : in RTEMS.ID;
|
||||
Signal_Set : in RTEMS.Signal_Set;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
end RTEMS.Signal;
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2011.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
with System;
|
||||
with System.Storage_Elements; use System.Storage_Elements;
|
||||
with Interfaces;
|
||||
with Interfaces.C;
|
||||
|
||||
package RTEMS.Stack_Checker is
|
||||
|
||||
--
|
||||
-- Stack Bounds Checker
|
||||
--
|
||||
|
||||
function Is_Blown return RTEMS.Boolean;
|
||||
pragma Interface (C, Is_Blown);
|
||||
pragma Interface_Name (Is_Blown, "rtems_stack_checker_is_blown");
|
||||
|
||||
procedure Report_Usage;
|
||||
pragma Import (C, Report_Usage, "rtems_stack_checker_report_usage");
|
||||
|
||||
end RTEMS.Stack_Checker;
|
||||
|
||||
@@ -0,0 +1,339 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2008.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package body RTEMS.Tasks is
|
||||
|
||||
--
|
||||
-- Task Manager
|
||||
--
|
||||
|
||||
procedure Create
|
||||
(Name : in RTEMS.Name;
|
||||
Initial_Priority : in Priority;
|
||||
Stack_Size : in RTEMS.Unsigned32;
|
||||
Initial_Modes : in RTEMS.Mode;
|
||||
Attribute_Set : in RTEMS.Attribute;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Create_Base
|
||||
(Name : RTEMS.Name;
|
||||
Initial_Priority : Priority;
|
||||
Stack_Size : RTEMS.Unsigned32;
|
||||
Initial_Modes : RTEMS.Mode;
|
||||
Attribute_Set : RTEMS.Attribute;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Create_Base, "rtems_task_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
Result :=
|
||||
Create_Base
|
||||
(Name,
|
||||
Initial_Priority,
|
||||
Stack_Size,
|
||||
Initial_Modes,
|
||||
Attribute_Set,
|
||||
ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
end Create;
|
||||
|
||||
procedure Ident
|
||||
(Name : in RTEMS.Name;
|
||||
Node : in RTEMS.Node;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
|
||||
function Ident_Base
|
||||
(Name : RTEMS.Name;
|
||||
Node : RTEMS.Node;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Ident_Base, "rtems_task_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
|
||||
begin
|
||||
|
||||
Result := Ident_Base (Name, Node, ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Ident;
|
||||
|
||||
procedure Start
|
||||
(ID : in RTEMS.ID;
|
||||
Entry_Point : in RTEMS.Tasks.Entry_Point;
|
||||
Argument : in RTEMS.Tasks.Argument;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Start_Base
|
||||
(ID : RTEMS.ID;
|
||||
Entry_Point : RTEMS.Tasks.Entry_Point;
|
||||
Argument : RTEMS.Tasks.Argument)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Start_Base, "rtems_task_start");
|
||||
begin
|
||||
|
||||
Result := Start_Base (ID, Entry_Point, Argument);
|
||||
|
||||
end Start;
|
||||
|
||||
procedure Restart
|
||||
(ID : in RTEMS.ID;
|
||||
Argument : in RTEMS.Tasks.Argument;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Restart_Base
|
||||
(ID : RTEMS.ID;
|
||||
Argument : RTEMS.Tasks.Argument)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Restart_Base, "rtems_task_restart");
|
||||
begin
|
||||
|
||||
Result := Restart_Base (ID, Argument);
|
||||
|
||||
end Restart;
|
||||
|
||||
procedure Delete
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Delete_Base (ID : RTEMS.ID) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Delete_Base, "rtems_task_delete");
|
||||
begin
|
||||
|
||||
Result := Delete_Base (ID);
|
||||
|
||||
end Delete;
|
||||
|
||||
procedure Suspend
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Suspend_Base (ID : RTEMS.ID) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Suspend_Base, "rtems_task_suspend");
|
||||
begin
|
||||
|
||||
Result := Suspend_Base (ID);
|
||||
|
||||
end Suspend;
|
||||
|
||||
procedure Resume
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Resume_Base (ID : RTEMS.ID) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Resume_Base, "rtems_task_resume");
|
||||
begin
|
||||
|
||||
Result := Resume_Base (ID);
|
||||
|
||||
end Resume;
|
||||
|
||||
procedure Is_Suspended
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Is_Suspended_Base
|
||||
(ID : RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Is_Suspended_Base, "rtems_task_is_suspended");
|
||||
begin
|
||||
|
||||
Result := Is_Suspended_Base (ID);
|
||||
|
||||
end Is_Suspended;
|
||||
|
||||
procedure Set_Priority
|
||||
(ID : in RTEMS.ID;
|
||||
New_Priority : in Priority;
|
||||
Old_Priority : out Priority;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Set_Priority_Base
|
||||
(ID : RTEMS.ID;
|
||||
New_Priority : Priority;
|
||||
Old_Priority : access Priority)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Set_Priority_Base, "rtems_task_set_priority");
|
||||
Old_Priority_Base : aliased Priority;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Set_Priority_Base (ID, New_Priority, Old_Priority_Base'Access);
|
||||
Old_Priority := Old_Priority_Base;
|
||||
|
||||
end Set_Priority;
|
||||
|
||||
procedure Mode
|
||||
(Mode_Set : in RTEMS.Mode;
|
||||
Mask : in RTEMS.Mode;
|
||||
Previous_Mode_Set : out RTEMS.Mode;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Mode_Base
|
||||
(Mode_Set : RTEMS.Mode;
|
||||
Mask : RTEMS.Mode;
|
||||
Previous_Mode_Set : access RTEMS.Mode)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Mode_Base, "rtems_task_mode");
|
||||
Previous_Mode_Set_Base : aliased RTEMS.Mode;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Mode_Base (Mode_Set, Mask, Previous_Mode_Set_Base'Access);
|
||||
Previous_Mode_Set := Previous_Mode_Set_Base;
|
||||
|
||||
end Mode;
|
||||
|
||||
procedure Get_Note
|
||||
(ID : in RTEMS.ID;
|
||||
Notepad : in RTEMS.Notepad_Index;
|
||||
Note : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Get_Note_Base
|
||||
(ID : RTEMS.ID;
|
||||
Notepad : RTEMS.Notepad_Index;
|
||||
Note : access RTEMS.Unsigned32)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Get_Note_Base, "rtems_task_get_note");
|
||||
Note_Base : aliased RTEMS.Unsigned32;
|
||||
begin
|
||||
|
||||
Result := Get_Note_Base (ID, Notepad, Note_Base'Access);
|
||||
Note := Note_Base;
|
||||
|
||||
end Get_Note;
|
||||
|
||||
procedure Set_Note
|
||||
(ID : in RTEMS.ID;
|
||||
Notepad : in RTEMS.Notepad_Index;
|
||||
Note : in RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Set_Note_Base
|
||||
(ID : RTEMS.ID;
|
||||
Notepad : RTEMS.Notepad_Index;
|
||||
Note : RTEMS.Unsigned32)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Set_Note_Base, "rtems_task_set_note");
|
||||
begin
|
||||
|
||||
Result := Set_Note_Base (ID, Notepad, Note);
|
||||
|
||||
end Set_Note;
|
||||
|
||||
procedure Variable_Add
|
||||
(ID : in RTEMS.ID;
|
||||
Task_Variable : in RTEMS.Address;
|
||||
Dtor : in Variable_Dtor;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Variable_Add_Base
|
||||
(ID : RTEMS.ID;
|
||||
Task_Variable : RTEMS.Address;
|
||||
Dtor : Variable_Dtor)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Variable_Add_Base, "rtems_task_variable_add");
|
||||
begin
|
||||
|
||||
Result := Variable_Add_Base (ID, Task_Variable, Dtor);
|
||||
|
||||
end Variable_Add;
|
||||
|
||||
procedure Variable_Get
|
||||
(ID : in RTEMS.ID;
|
||||
Task_Variable : out RTEMS.Address;
|
||||
Task_Variable_Value : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Variable_Get_Base
|
||||
(ID : RTEMS.ID;
|
||||
Task_Variable : access RTEMS.Address;
|
||||
Task_Variable_Value : access RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Variable_Get_Base, "rtems_task_variable_get");
|
||||
Task_Variable_Base : aliased RTEMS.Address;
|
||||
Task_Variable_Value_Base : aliased RTEMS.Address;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Variable_Get_Base
|
||||
(ID,
|
||||
Task_Variable_Base'Access,
|
||||
Task_Variable_Value_Base'Access);
|
||||
Task_Variable := Task_Variable_Base;
|
||||
Task_Variable_Value := Task_Variable_Value_Base;
|
||||
|
||||
end Variable_Get;
|
||||
|
||||
procedure Variable_Delete
|
||||
(ID : in RTEMS.ID;
|
||||
Task_Variable : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Variable_Delete_Base
|
||||
(ID : RTEMS.ID;
|
||||
Task_Variable : access RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Variable_Delete_Base,
|
||||
"rtems_task_variable_delete");
|
||||
Task_Variable_Base : aliased RTEMS.Address;
|
||||
begin
|
||||
|
||||
Result := Variable_Delete_Base (ID, Task_Variable_Base'Access);
|
||||
Task_Variable := Task_Variable_Base;
|
||||
|
||||
end Variable_Delete;
|
||||
|
||||
procedure Wake_When
|
||||
(Time_Buffer : in RTEMS.Time_Of_Day;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Wake_When_Base
|
||||
(Time_Buffer : RTEMS.Time_Of_Day)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Wake_When_Base, "rtems_task_wake_when");
|
||||
begin
|
||||
|
||||
Result := Wake_When_Base (Time_Buffer);
|
||||
|
||||
end Wake_When;
|
||||
|
||||
procedure Wake_After
|
||||
(Ticks : in RTEMS.Interval;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Wake_After_Base
|
||||
(Ticks : RTEMS.Interval)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Wake_After_Base, "rtems_task_wake_after");
|
||||
begin
|
||||
|
||||
Result := Wake_After_Base (Ticks);
|
||||
|
||||
end Wake_After;
|
||||
|
||||
end RTEMS.Tasks;
|
||||
@@ -0,0 +1,158 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2008.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package RTEMS.Tasks is
|
||||
|
||||
subtype Priority is RTEMS.Unsigned32;
|
||||
|
||||
Current_Priority : constant Priority := 0;
|
||||
No_Priority : constant Priority := 0;
|
||||
|
||||
subtype Argument is RTEMS.Unsigned32;
|
||||
type Argument_PTR is access all Argument;
|
||||
|
||||
type Entry_Point is access procedure (
|
||||
Argument : RTEMS.Unsigned32
|
||||
);
|
||||
pragma Convention (C, Entry_Point);
|
||||
|
||||
|
||||
--
|
||||
-- Task Manager
|
||||
--
|
||||
|
||||
procedure Create (
|
||||
Name : in RTEMS.Name;
|
||||
Initial_Priority : in Priority;
|
||||
Stack_Size : in Unsigned32;
|
||||
Initial_Modes : in RTEMS.Mode;
|
||||
Attribute_Set : in RTEMS.Attribute;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Ident (
|
||||
Name : in RTEMS.Name;
|
||||
Node : in RTEMS.Node;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Start (
|
||||
ID : in RTEMS.ID;
|
||||
Entry_Point : in RTEMS.Tasks.Entry_Point;
|
||||
Argument : in RTEMS.Tasks.Argument;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Restart (
|
||||
ID : in RTEMS.ID;
|
||||
Argument : in RTEMS.Tasks.Argument;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Delete (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Suspend (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Resume (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Is_Suspended (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Set_Priority (
|
||||
ID : in RTEMS.ID;
|
||||
New_Priority : in Priority;
|
||||
Old_Priority : out Priority;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Mode (
|
||||
Mode_Set : in RTEMS.Mode;
|
||||
Mask : in RTEMS.Mode;
|
||||
Previous_Mode_Set : out RTEMS.Mode;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Get_Note (
|
||||
ID : in RTEMS.ID;
|
||||
Notepad : in RTEMS.Notepad_Index;
|
||||
Note : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Set_Note (
|
||||
ID : in RTEMS.ID;
|
||||
Notepad : in RTEMS.Notepad_Index;
|
||||
Note : in RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
type Variable_Dtor is access procedure (
|
||||
Argument : in RTEMS.Address
|
||||
);
|
||||
pragma Convention (C, Variable_Dtor);
|
||||
|
||||
procedure Variable_Add (
|
||||
ID : in RTEMS.ID;
|
||||
Task_Variable : in RTEMS.Address;
|
||||
Dtor : in Variable_Dtor;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Variable_Get (
|
||||
ID : in RTEMS.ID;
|
||||
Task_Variable : out RTEMS.Address;
|
||||
Task_Variable_Value : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Variable_Delete (
|
||||
ID : in RTEMS.ID;
|
||||
Task_Variable : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Wake_When (
|
||||
Time_Buffer : in RTEMS.Time_Of_Day;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Wake_After (
|
||||
Ticks : in RTEMS.Interval;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
end RTEMS.Tasks;
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
--
|
||||
-- RTEMS / Body
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2008.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
package body RTEMS.Timer is
|
||||
|
||||
--
|
||||
-- Timer Manager
|
||||
--
|
||||
|
||||
procedure Create
|
||||
(Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Create_Base
|
||||
(Name : RTEMS.Name;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Create_Base, "rtems_timer_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result := Create_Base (Name, ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Create;
|
||||
|
||||
procedure Ident
|
||||
(Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Ident_Base
|
||||
(Name : RTEMS.Name;
|
||||
ID : access RTEMS.ID)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Ident_Base, "rtems_timer_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
begin
|
||||
|
||||
Result := Ident_Base (Name, ID_Base'Access);
|
||||
ID := ID_Base;
|
||||
|
||||
end Ident;
|
||||
|
||||
procedure Delete
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Delete_Base (ID : RTEMS.ID) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Delete_Base, "rtems_timer_delete");
|
||||
begin
|
||||
|
||||
Result := Delete_Base (ID);
|
||||
|
||||
end Delete;
|
||||
|
||||
procedure Fire_After
|
||||
(ID : in RTEMS.ID;
|
||||
Ticks : in RTEMS.Interval;
|
||||
Routine : in RTEMS.Timer.Service_Routine;
|
||||
User_Data : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Fire_After_Base
|
||||
(ID : RTEMS.ID;
|
||||
Ticks : RTEMS.Interval;
|
||||
Routine : RTEMS.Timer.Service_Routine;
|
||||
User_Data : RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Fire_After_Base, "rtems_timer_fire_after");
|
||||
begin
|
||||
|
||||
Result := Fire_After_Base (ID, Ticks, Routine, User_Data);
|
||||
|
||||
end Fire_After;
|
||||
|
||||
procedure Server_Fire_After
|
||||
(ID : in RTEMS.ID;
|
||||
Ticks : in RTEMS.Interval;
|
||||
Routine : in RTEMS.Timer.Service_Routine;
|
||||
User_Data : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Server_Fire_After_Base
|
||||
(ID : RTEMS.ID;
|
||||
Ticks : RTEMS.Interval;
|
||||
Routine : RTEMS.Timer.Service_Routine;
|
||||
User_Data : RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Server_Fire_After_Base,
|
||||
"rtems_timer_server_fire_after");
|
||||
begin
|
||||
|
||||
Result := Server_Fire_After_Base (ID, Ticks, Routine, User_Data);
|
||||
|
||||
end Server_Fire_After;
|
||||
|
||||
procedure Fire_When
|
||||
(ID : in RTEMS.ID;
|
||||
Wall_Time : in RTEMS.Time_Of_Day;
|
||||
Routine : in RTEMS.Timer.Service_Routine;
|
||||
User_Data : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Fire_When_Base
|
||||
(ID : RTEMS.ID;
|
||||
Wall_Time : RTEMS.Time_Of_Day;
|
||||
Routine : RTEMS.Timer.Service_Routine;
|
||||
User_Data : RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import (C, Fire_When_Base, "rtems_timer_fire_when");
|
||||
begin
|
||||
|
||||
Result := Fire_When_Base (ID, Wall_Time, Routine, User_Data);
|
||||
|
||||
end Fire_When;
|
||||
|
||||
procedure Server_Fire_When
|
||||
(ID : in RTEMS.ID;
|
||||
Wall_Time : in RTEMS.Time_Of_Day;
|
||||
Routine : in RTEMS.Timer.Service_Routine;
|
||||
User_Data : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Server_Fire_When_Base
|
||||
(ID : RTEMS.ID;
|
||||
Wall_Time : RTEMS.Time_Of_Day;
|
||||
Routine : RTEMS.Timer.Service_Routine;
|
||||
User_Data : RTEMS.Address)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Server_Fire_When_Base,
|
||||
"rtems_timer_server_fire_when");
|
||||
begin
|
||||
|
||||
Result :=
|
||||
Server_Fire_When_Base (ID, Wall_Time, Routine, User_Data);
|
||||
end Server_Fire_When;
|
||||
|
||||
procedure Reset
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Reset_Base (ID : RTEMS.ID) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Reset_Base, "rtems_timer_reset");
|
||||
begin
|
||||
|
||||
Result := Reset_Base (ID);
|
||||
|
||||
end Reset;
|
||||
|
||||
procedure Cancel
|
||||
(ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Cancel_Base (ID : RTEMS.ID) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Cancel_Base, "rtems_timer_cancel");
|
||||
begin
|
||||
|
||||
Result := Cancel_Base (ID);
|
||||
|
||||
end Cancel;
|
||||
|
||||
procedure Initiate_Server
|
||||
(Server_Priority : in RTEMS.Tasks.Priority;
|
||||
Stack_Size : in RTEMS.Unsigned32;
|
||||
Attribute_Set : in RTEMS.Attribute;
|
||||
Result : out RTEMS.Status_Codes)
|
||||
is
|
||||
function Initiate_Server_Base
|
||||
(Server_Priority : RTEMS.Tasks.Priority;
|
||||
Stack_Size : RTEMS.Unsigned32;
|
||||
Attribute_Set : RTEMS.Attribute)
|
||||
return RTEMS.Status_Codes;
|
||||
pragma Import
|
||||
(C,
|
||||
Initiate_Server_Base,
|
||||
"rtems_timer_initiate_server");
|
||||
begin
|
||||
Result :=
|
||||
Initiate_Server_Base
|
||||
(Server_Priority,
|
||||
Stack_Size,
|
||||
Attribute_Set);
|
||||
end Initiate_Server;
|
||||
|
||||
end RTEMS.Timer;
|
||||
@@ -0,0 +1,108 @@
|
||||
--
|
||||
-- RTEMS / Specification
|
||||
--
|
||||
-- DESCRIPTION:
|
||||
--
|
||||
-- This package provides the interface to the RTEMS API.
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2008.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
|
||||
with RTEMS.Tasks;
|
||||
|
||||
package RTEMS.Timer is
|
||||
|
||||
--
|
||||
-- The following type define a pointer to a watchdog/timer service routine.
|
||||
--
|
||||
|
||||
type Service_Routine is access procedure (
|
||||
ID : in RTEMS.ID;
|
||||
User_Data : in RTEMS.Address
|
||||
);
|
||||
pragma Convention (C, Service_Routine);
|
||||
|
||||
--
|
||||
-- Timer Manager
|
||||
--
|
||||
|
||||
procedure Create (
|
||||
Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Ident (
|
||||
Name : in RTEMS.Name;
|
||||
ID : out RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Delete (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Fire_After (
|
||||
ID : in RTEMS.ID;
|
||||
Ticks : in RTEMS.Interval;
|
||||
Routine : in RTEMS.Timer.Service_Routine;
|
||||
User_Data : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Server_Fire_After (
|
||||
ID : in RTEMS.ID;
|
||||
Ticks : in RTEMS.Interval;
|
||||
Routine : in RTEMS.Timer.Service_Routine;
|
||||
User_Data : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Fire_When (
|
||||
ID : in RTEMS.ID;
|
||||
Wall_Time : in RTEMS.Time_Of_Day;
|
||||
Routine : in RTEMS.Timer.Service_Routine;
|
||||
User_Data : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Server_Fire_When (
|
||||
ID : in RTEMS.ID;
|
||||
Wall_Time : in RTEMS.Time_Of_Day;
|
||||
Routine : in RTEMS.Timer.Service_Routine;
|
||||
User_Data : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Reset (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Cancel (
|
||||
ID : in RTEMS.ID;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Initiate_Server (
|
||||
Server_Priority : in RTEMS.Tasks.Priority;
|
||||
Stack_Size : in Unsigned32;
|
||||
Attribute_Set : in RTEMS.Attribute;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
end RTEMS.Timer;
|
||||
+84
-2269
File diff suppressed because it is too large
Load Diff
+20
-942
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user