From 0d5c795afaf9485a02d7de0bb3282407e91c2a38 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 24 Nov 2017 13:20:16 +0100 Subject: Move Ada includes Update #3254. --- cpukit/Makefile.am | 44 ++ cpukit/include/adainclude/preinstall.am | 177 +++++++ cpukit/include/adainclude/rtems-barrier.adb | 126 +++++ cpukit/include/adainclude/rtems-barrier.ads | 65 +++ cpukit/include/adainclude/rtems-clock.adb | 140 ++++++ cpukit/include/adainclude/rtems-clock.ads | 80 +++ cpukit/include/adainclude/rtems-cpu_usage.ads | 40 ++ cpukit/include/adainclude/rtems-event.adb | 70 +++ cpukit/include/adainclude/rtems-event.ads | 43 ++ cpukit/include/adainclude/rtems-extension.adb | 79 +++ cpukit/include/adainclude/rtems-extension.ads | 47 ++ cpukit/include/adainclude/rtems-fatal.adb | 36 ++ cpukit/include/adainclude/rtems-fatal.ads | 33 ++ cpukit/include/adainclude/rtems-interrupt.ads | 49 ++ cpukit/include/adainclude/rtems-io.adb | 167 +++++++ cpukit/include/adainclude/rtems-io.ads | 87 ++++ cpukit/include/adainclude/rtems-message_queue.adb | 243 +++++++++ cpukit/include/adainclude/rtems-message_queue.ads | 93 ++++ .../include/adainclude/rtems-multiprocessing.adb | 36 ++ .../include/adainclude/rtems-multiprocessing.ads | 28 ++ cpukit/include/adainclude/rtems-object.adb | 303 ++++++++++++ cpukit/include/adainclude/rtems-object.ads | 121 +++++ cpukit/include/adainclude/rtems-partition.adb | 134 +++++ cpukit/include/adainclude/rtems-partition.ads | 63 +++ cpukit/include/adainclude/rtems-port.adb | 135 +++++ cpukit/include/adainclude/rtems-port.ads | 63 +++ cpukit/include/adainclude/rtems-rate_monotonic.adb | 163 ++++++ cpukit/include/adainclude/rtems-rate_monotonic.ads | 114 +++++ cpukit/include/adainclude/rtems-region.adb | 206 ++++++++ cpukit/include/adainclude/rtems-region.ads | 87 ++++ cpukit/include/adainclude/rtems-semaphore.adb | 137 ++++++ cpukit/include/adainclude/rtems-semaphore.ads | 69 +++ cpukit/include/adainclude/rtems-signal.adb | 59 +++ cpukit/include/adainclude/rtems-signal.ads | 41 ++ cpukit/include/adainclude/rtems-stack_checker.ads | 41 ++ cpukit/include/adainclude/rtems-tasks.adb | 234 +++++++++ cpukit/include/adainclude/rtems-tasks.ads | 117 +++++ cpukit/include/adainclude/rtems-timer.adb | 208 ++++++++ cpukit/include/adainclude/rtems-timer.ads | 106 ++++ cpukit/include/adainclude/rtems.adb | 232 +++++++++ cpukit/include/adainclude/rtems.ads | 546 +++++++++++++++++++++ cpukit/preinstall.am | 162 ++++++ 42 files changed, 5024 insertions(+) create mode 100644 cpukit/include/adainclude/preinstall.am create mode 100644 cpukit/include/adainclude/rtems-barrier.adb create mode 100644 cpukit/include/adainclude/rtems-barrier.ads create mode 100644 cpukit/include/adainclude/rtems-clock.adb create mode 100644 cpukit/include/adainclude/rtems-clock.ads create mode 100644 cpukit/include/adainclude/rtems-cpu_usage.ads create mode 100644 cpukit/include/adainclude/rtems-event.adb create mode 100644 cpukit/include/adainclude/rtems-event.ads create mode 100644 cpukit/include/adainclude/rtems-extension.adb create mode 100644 cpukit/include/adainclude/rtems-extension.ads create mode 100644 cpukit/include/adainclude/rtems-fatal.adb create mode 100644 cpukit/include/adainclude/rtems-fatal.ads create mode 100644 cpukit/include/adainclude/rtems-interrupt.ads create mode 100644 cpukit/include/adainclude/rtems-io.adb create mode 100644 cpukit/include/adainclude/rtems-io.ads create mode 100644 cpukit/include/adainclude/rtems-message_queue.adb create mode 100644 cpukit/include/adainclude/rtems-message_queue.ads create mode 100644 cpukit/include/adainclude/rtems-multiprocessing.adb create mode 100644 cpukit/include/adainclude/rtems-multiprocessing.ads create mode 100644 cpukit/include/adainclude/rtems-object.adb create mode 100644 cpukit/include/adainclude/rtems-object.ads create mode 100644 cpukit/include/adainclude/rtems-partition.adb create mode 100644 cpukit/include/adainclude/rtems-partition.ads create mode 100644 cpukit/include/adainclude/rtems-port.adb create mode 100644 cpukit/include/adainclude/rtems-port.ads create mode 100644 cpukit/include/adainclude/rtems-rate_monotonic.adb create mode 100644 cpukit/include/adainclude/rtems-rate_monotonic.ads create mode 100644 cpukit/include/adainclude/rtems-region.adb create mode 100644 cpukit/include/adainclude/rtems-region.ads create mode 100644 cpukit/include/adainclude/rtems-semaphore.adb create mode 100644 cpukit/include/adainclude/rtems-semaphore.ads create mode 100644 cpukit/include/adainclude/rtems-signal.adb create mode 100644 cpukit/include/adainclude/rtems-signal.ads create mode 100644 cpukit/include/adainclude/rtems-stack_checker.ads create mode 100644 cpukit/include/adainclude/rtems-tasks.adb create mode 100644 cpukit/include/adainclude/rtems-tasks.ads create mode 100644 cpukit/include/adainclude/rtems-timer.adb create mode 100644 cpukit/include/adainclude/rtems-timer.ads create mode 100644 cpukit/include/adainclude/rtems.adb create mode 100644 cpukit/include/adainclude/rtems.ads (limited to 'cpukit') diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am index 8ccc1d4e9a..d905f2b73a 100644 --- a/cpukit/Makefile.am +++ b/cpukit/Makefile.am @@ -278,6 +278,50 @@ include_drvmgr_HEADERS += libdrvmgr/drvmgr_confdefs.h include_drvmgr_HEADERS += libdrvmgr/drvmgr_list.h endif +if LIBGNAT +include_adaincludedir = $(includedir)/adainclude +include_adainclude_HEADERS = +include_adainclude_HEADERS += include/adainclude/rtems.adb +include_adainclude_HEADERS += include/adainclude/rtems.ads +include_adainclude_HEADERS += include/adainclude/rtems-barrier.adb +include_adainclude_HEADERS += include/adainclude/rtems-barrier.ads +include_adainclude_HEADERS += include/adainclude/rtems-clock.adb +include_adainclude_HEADERS += include/adainclude/rtems-clock.ads +include_adainclude_HEADERS += include/adainclude/rtems-cpu_usage.ads +include_adainclude_HEADERS += include/adainclude/rtems-event.adb +include_adainclude_HEADERS += include/adainclude/rtems-event.ads +include_adainclude_HEADERS += include/adainclude/rtems-extension.adb +include_adainclude_HEADERS += include/adainclude/rtems-extension.ads +include_adainclude_HEADERS += include/adainclude/rtems-fatal.adb +include_adainclude_HEADERS += include/adainclude/rtems-fatal.ads +include_adainclude_HEADERS += include/adainclude/rtems-interrupt.ads +include_adainclude_HEADERS += include/adainclude/rtems-io.adb +include_adainclude_HEADERS += include/adainclude/rtems-io.ads +include_adainclude_HEADERS += include/adainclude/rtems-message_queue.adb +include_adainclude_HEADERS += include/adainclude/rtems-message_queue.ads +include_adainclude_HEADERS += include/adainclude/rtems-multiprocessing.adb +include_adainclude_HEADERS += include/adainclude/rtems-multiprocessing.ads +include_adainclude_HEADERS += include/adainclude/rtems-object.adb +include_adainclude_HEADERS += include/adainclude/rtems-object.ads +include_adainclude_HEADERS += include/adainclude/rtems-partition.adb +include_adainclude_HEADERS += include/adainclude/rtems-partition.ads +include_adainclude_HEADERS += include/adainclude/rtems-port.adb +include_adainclude_HEADERS += include/adainclude/rtems-port.ads +include_adainclude_HEADERS += include/adainclude/rtems-rate_monotonic.adb +include_adainclude_HEADERS += include/adainclude/rtems-rate_monotonic.ads +include_adainclude_HEADERS += include/adainclude/rtems-region.adb +include_adainclude_HEADERS += include/adainclude/rtems-region.ads +include_adainclude_HEADERS += include/adainclude/rtems-semaphore.adb +include_adainclude_HEADERS += include/adainclude/rtems-semaphore.ads +include_adainclude_HEADERS += include/adainclude/rtems-signal.adb +include_adainclude_HEADERS += include/adainclude/rtems-signal.ads +include_adainclude_HEADERS += include/adainclude/rtems-stack_checker.ads +include_adainclude_HEADERS += include/adainclude/rtems-tasks.adb +include_adainclude_HEADERS += include/adainclude/rtems-tasks.ads +include_adainclude_HEADERS += include/adainclude/rtems-timer.adb +include_adainclude_HEADERS += include/adainclude/rtems-timer.ads +endif + ## HACK: doxygen filter. EXTRA_DIST = doxy-filter diff --git a/cpukit/include/adainclude/preinstall.am b/cpukit/include/adainclude/preinstall.am new file mode 100644 index 0000000000..e41443a862 --- /dev/null +++ b/cpukit/include/adainclude/preinstall.am @@ -0,0 +1,177 @@ +## Automatically generated by ampolish3 - Do not edit + +if AMPOLISH3 +$(srcdir)/preinstall.am: Makefile.am + $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am +endif + +PREINSTALL_DIRS = +DISTCLEANFILES = $(PREINSTALL_DIRS) + +all-am: $(PREINSTALL_FILES) + +PREINSTALL_FILES = +CLEANFILES = $(PREINSTALL_FILES) + +if RTEMS_ADA +$(PROJECT_INCLUDE)/adainclude/$(dirstamp): + @$(MKDIR_P) $(PROJECT_INCLUDE)/adainclude + @: > $(PROJECT_INCLUDE)/adainclude/$(dirstamp) +PREINSTALL_DIRS += $(PROJECT_INCLUDE)/adainclude/$(dirstamp) + +$(PROJECT_INCLUDE)/adainclude/rtems.adb: rtems.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems.adb +PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems.adb + +$(PROJECT_INCLUDE)/adainclude/rtems.ads: rtems.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp) + $(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-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 + +$(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 diff --git a/cpukit/include/adainclude/rtems-barrier.adb b/cpukit/include/adainclude/rtems-barrier.adb new file mode 100644 index 0000000000..18f675bccb --- /dev/null +++ b/cpukit/include/adainclude/rtems-barrier.adb @@ -0,0 +1,126 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-barrier.ads b/cpukit/include/adainclude/rtems-barrier.ads new file mode 100644 index 0000000000..a84778f8da --- /dev/null +++ b/cpukit/include/adainclude/rtems-barrier.ads @@ -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.org/license/LICENSE. +-- + +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; + diff --git a/cpukit/include/adainclude/rtems-clock.adb b/cpukit/include/adainclude/rtems-clock.adb new file mode 100644 index 0000000000..d6f596a5d5 --- /dev/null +++ b/cpukit/include/adainclude/rtems-clock.adb @@ -0,0 +1,140 @@ +-- +-- 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.org/license/LICENSE. +-- + +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_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; + + function Get_Ticks_Since_Boot + return RTEMS.Interval + is + Watchdog_Ticks_since_boot : RTEMS.Interval; + pragma Import ( + C, + Watchdog_Ticks_since_boot, + "_Watchdog_Ticks_since_boot" + ); + begin + + return Watchdog_Ticks_since_boot; + + end Get_Ticks_Since_Boot; + +end RTEMS.Clock; diff --git a/cpukit/include/adainclude/rtems-clock.ads b/cpukit/include/adainclude/rtems-clock.ads new file mode 100644 index 0000000000..12afb42454 --- /dev/null +++ b/cpukit/include/adainclude/rtems-clock.ads @@ -0,0 +1,80 @@ +-- +-- 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.org/license/LICENSE. +-- + + +package RTEMS.Clock is + + -- + -- Clock Types + -- + + type Time_Value is + record + Seconds : RTEMS.Unsigned32; + Microseconds : RTEMS.Unsigned32; + end record; + + -- + -- Clock Manager + -- + + procedure Set ( + Time_Buffer : in RTEMS.Time_Of_Day; + 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; + + procedure Get_Uptime ( + Uptime : out RTEMS.Timespec; + Result : out RTEMS.Status_Codes + ); + + procedure Tick ( + Result : out RTEMS.Status_Codes + ); + +end RTEMS.Clock; + diff --git a/cpukit/include/adainclude/rtems-cpu_usage.ads b/cpukit/include/adainclude/rtems-cpu_usage.ads new file mode 100644 index 0000000000..97717587a4 --- /dev/null +++ b/cpukit/include/adainclude/rtems-cpu_usage.ads @@ -0,0 +1,40 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; + diff --git a/cpukit/include/adainclude/rtems-event.adb b/cpukit/include/adainclude/rtems-event.adb new file mode 100644 index 0000000000..4e92976903 --- /dev/null +++ b/cpukit/include/adainclude/rtems-event.adb @@ -0,0 +1,70 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-event.ads b/cpukit/include/adainclude/rtems-event.ads new file mode 100644 index 0000000000..1851336bba --- /dev/null +++ b/cpukit/include/adainclude/rtems-event.ads @@ -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.org/license/LICENSE. +-- + +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; + diff --git a/cpukit/include/adainclude/rtems-extension.adb b/cpukit/include/adainclude/rtems-extension.adb new file mode 100644 index 0000000000..a2540c74d4 --- /dev/null +++ b/cpukit/include/adainclude/rtems-extension.adb @@ -0,0 +1,79 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-extension.ads b/cpukit/include/adainclude/rtems-extension.ads new file mode 100644 index 0000000000..18111d99b3 --- /dev/null +++ b/cpukit/include/adainclude/rtems-extension.ads @@ -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.org/license/LICENSE. +-- + +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; + diff --git a/cpukit/include/adainclude/rtems-fatal.adb b/cpukit/include/adainclude/rtems-fatal.adb new file mode 100644 index 0000000000..5231d7d8c7 --- /dev/null +++ b/cpukit/include/adainclude/rtems-fatal.adb @@ -0,0 +1,36 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-fatal.ads b/cpukit/include/adainclude/rtems-fatal.ads new file mode 100644 index 0000000000..8518b7ba0e --- /dev/null +++ b/cpukit/include/adainclude/rtems-fatal.ads @@ -0,0 +1,33 @@ +-- +-- 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.org/license/LICENSE. +-- + +package RTEMS.Fatal is + + -- + -- Fatal Error Manager + -- + + procedure Error_Occurred ( + The_Error : in RTEMS.Unsigned32 + ); + +end RTEMS.Fatal; + diff --git a/cpukit/include/adainclude/rtems-interrupt.ads b/cpukit/include/adainclude/rtems-interrupt.ads new file mode 100644 index 0000000000..02b6c80a46 --- /dev/null +++ b/cpukit/include/adainclude/rtems-interrupt.ads @@ -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.org/license/LICENSE. +-- + +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; + diff --git a/cpukit/include/adainclude/rtems-io.adb b/cpukit/include/adainclude/rtems-io.adb new file mode 100644 index 0000000000..d6d4f0cd10 --- /dev/null +++ b/cpukit/include/adainclude/rtems-io.adb @@ -0,0 +1,167 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-io.ads b/cpukit/include/adainclude/rtems-io.ads new file mode 100644 index 0000000000..2a599023b5 --- /dev/null +++ b/cpukit/include/adainclude/rtems-io.ads @@ -0,0 +1,87 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; + diff --git a/cpukit/include/adainclude/rtems-message_queue.adb b/cpukit/include/adainclude/rtems-message_queue.adb new file mode 100644 index 0000000000..67abf48baf --- /dev/null +++ b/cpukit/include/adainclude/rtems-message_queue.adb @@ -0,0 +1,243 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-message_queue.ads b/cpukit/include/adainclude/rtems-message_queue.ads new file mode 100644 index 0000000000..d5efe54ffe --- /dev/null +++ b/cpukit/include/adainclude/rtems-message_queue.ads @@ -0,0 +1,93 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; + diff --git a/cpukit/include/adainclude/rtems-multiprocessing.adb b/cpukit/include/adainclude/rtems-multiprocessing.adb new file mode 100644 index 0000000000..805975814c --- /dev/null +++ b/cpukit/include/adainclude/rtems-multiprocessing.adb @@ -0,0 +1,36 @@ +-- +-- RTEMS Multiprocessing Manager/ Body +-- +-- DESCRIPTION: +-- +-- This package provides the interface to the Multiprocessing Manager +-- of the RTEMS API. +-- +-- DEPENDENCIES: +-- +-- +-- COPYRIGHT (c) 1997. +-- 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.org/license/LICENSE. +-- + +package body RTEMS.Multiprocessing is + + -- + -- Announce + -- + + procedure Announce is + procedure Multiprocessing_Announce_Base; + pragma Import (C, Multiprocessing_Announce_Base, + "rtems_multiprocessing_announce"); + begin + + Multiprocessing_Announce_Base; + + end Announce; + +end RTEMS.Multiprocessing; diff --git a/cpukit/include/adainclude/rtems-multiprocessing.ads b/cpukit/include/adainclude/rtems-multiprocessing.ads new file mode 100644 index 0000000000..cb462f1e94 --- /dev/null +++ b/cpukit/include/adainclude/rtems-multiprocessing.ads @@ -0,0 +1,28 @@ +-- +-- RTEMS Multiprocessing Manager/ Specification +-- +-- DESCRIPTION: +-- +-- This package provides the interface to the Multiprocessing Manager +-- of the RTEMS API. +-- +-- DEPENDENCIES: +-- +-- +-- COPYRIGHT (c) 1997. +-- 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.org/license/LICENSE. +-- + +package RTEMS.Multiprocessing is + + -- + -- Multiprocessing Manager + -- + + procedure Announce; + +end RTEMS.Multiprocessing; diff --git a/cpukit/include/adainclude/rtems-object.adb b/cpukit/include/adainclude/rtems-object.adb new file mode 100644 index 0000000000..7be02ecd4c --- /dev/null +++ b/cpukit/include/adainclude/rtems-object.adb @@ -0,0 +1,303 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-object.ads b/cpukit/include/adainclude/rtems-object.ads new file mode 100644 index 0000000000..93636eab74 --- /dev/null +++ b/cpukit/include/adainclude/rtems-object.ads @@ -0,0 +1,121 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-partition.adb b/cpukit/include/adainclude/rtems-partition.adb new file mode 100644 index 0000000000..84455d79cd --- /dev/null +++ b/cpukit/include/adainclude/rtems-partition.adb @@ -0,0 +1,134 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-partition.ads b/cpukit/include/adainclude/rtems-partition.ads new file mode 100644 index 0000000000..6e3ea44a9d --- /dev/null +++ b/cpukit/include/adainclude/rtems-partition.ads @@ -0,0 +1,63 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; + diff --git a/cpukit/include/adainclude/rtems-port.adb b/cpukit/include/adainclude/rtems-port.adb new file mode 100644 index 0000000000..dda655b8c2 --- /dev/null +++ b/cpukit/include/adainclude/rtems-port.adb @@ -0,0 +1,135 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-port.ads b/cpukit/include/adainclude/rtems-port.ads new file mode 100644 index 0000000000..cd29eb8a1e --- /dev/null +++ b/cpukit/include/adainclude/rtems-port.ads @@ -0,0 +1,63 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; + diff --git a/cpukit/include/adainclude/rtems-rate_monotonic.adb b/cpukit/include/adainclude/rtems-rate_monotonic.adb new file mode 100644 index 0000000000..2eb462b71a --- /dev/null +++ b/cpukit/include/adainclude/rtems-rate_monotonic.adb @@ -0,0 +1,163 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-rate_monotonic.ads b/cpukit/include/adainclude/rtems-rate_monotonic.ads new file mode 100644 index 0000000000..5830f1d6f8 --- /dev/null +++ b/cpukit/include/adainclude/rtems-rate_monotonic.ads @@ -0,0 +1,114 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; + diff --git a/cpukit/include/adainclude/rtems-region.adb b/cpukit/include/adainclude/rtems-region.adb new file mode 100644 index 0000000000..d03ca6a2b1 --- /dev/null +++ b/cpukit/include/adainclude/rtems-region.adb @@ -0,0 +1,206 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-region.ads b/cpukit/include/adainclude/rtems-region.ads new file mode 100644 index 0000000000..d75a939b8b --- /dev/null +++ b/cpukit/include/adainclude/rtems-region.ads @@ -0,0 +1,87 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; + diff --git a/cpukit/include/adainclude/rtems-semaphore.adb b/cpukit/include/adainclude/rtems-semaphore.adb new file mode 100644 index 0000000000..4dad4556f3 --- /dev/null +++ b/cpukit/include/adainclude/rtems-semaphore.adb @@ -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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-semaphore.ads b/cpukit/include/adainclude/rtems-semaphore.ads new file mode 100644 index 0000000000..916ef0489e --- /dev/null +++ b/cpukit/include/adainclude/rtems-semaphore.ads @@ -0,0 +1,69 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; + diff --git a/cpukit/include/adainclude/rtems-signal.adb b/cpukit/include/adainclude/rtems-signal.adb new file mode 100644 index 0000000000..873e73fbb8 --- /dev/null +++ b/cpukit/include/adainclude/rtems-signal.adb @@ -0,0 +1,59 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-signal.ads b/cpukit/include/adainclude/rtems-signal.ads new file mode 100644 index 0000000000..92ca921fa2 --- /dev/null +++ b/cpukit/include/adainclude/rtems-signal.ads @@ -0,0 +1,41 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; + diff --git a/cpukit/include/adainclude/rtems-stack_checker.ads b/cpukit/include/adainclude/rtems-stack_checker.ads new file mode 100644 index 0000000000..6e14bd5d46 --- /dev/null +++ b/cpukit/include/adainclude/rtems-stack_checker.ads @@ -0,0 +1,41 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; + diff --git a/cpukit/include/adainclude/rtems-tasks.adb b/cpukit/include/adainclude/rtems-tasks.adb new file mode 100644 index 0000000000..1fc7fcdd1e --- /dev/null +++ b/cpukit/include/adainclude/rtems-tasks.adb @@ -0,0 +1,234 @@ +-- +-- 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.org/license/LICENSE. +-- + +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 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; diff --git a/cpukit/include/adainclude/rtems-tasks.ads b/cpukit/include/adainclude/rtems-tasks.ads new file mode 100644 index 0000000000..cdd95ea309 --- /dev/null +++ b/cpukit/include/adainclude/rtems-tasks.ads @@ -0,0 +1,117 @@ +-- +-- 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.org/license/LICENSE. +-- + +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 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; + diff --git a/cpukit/include/adainclude/rtems-timer.adb b/cpukit/include/adainclude/rtems-timer.adb new file mode 100644 index 0000000000..706b07cb4f --- /dev/null +++ b/cpukit/include/adainclude/rtems-timer.adb @@ -0,0 +1,208 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems-timer.ads b/cpukit/include/adainclude/rtems-timer.ads new file mode 100644 index 0000000000..a6d1f9b0f8 --- /dev/null +++ b/cpukit/include/adainclude/rtems-timer.ads @@ -0,0 +1,106 @@ +-- +-- 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.org/license/LICENSE. +-- + +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; diff --git a/cpukit/include/adainclude/rtems.adb b/cpukit/include/adainclude/rtems.adb new file mode 100644 index 0000000000..e717f42bab --- /dev/null +++ b/cpukit/include/adainclude/rtems.adb @@ -0,0 +1,232 @@ +-- 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.org/license/LICENSE. +-- + +with Ada; +with Ada.Unchecked_Conversion; +with Interfaces; use Interfaces; +with Interfaces.C; use Interfaces.C; + +package body RTEMS is + + -- + -- Utility Functions + -- + + function From_Ada_Boolean + (Ada_Boolean : Standard.Boolean) + return RTEMS.Boolean + is + begin + + if Ada_Boolean then + return RTEMS.True; + end if; + + return RTEMS.False; + + end From_Ada_Boolean; + + function To_Ada_Boolean + (RTEMS_Boolean : RTEMS.Boolean) + return Standard.Boolean + is + begin + + if RTEMS_Boolean = RTEMS.True then + return Standard.True; + end if; + + return Standard.False; + + end To_Ada_Boolean; + + function Milliseconds_To_Microseconds + (Milliseconds : RTEMS.Unsigned32) + return RTEMS.Unsigned32 + is + begin + + return Milliseconds * 1000; + + end Milliseconds_To_Microseconds; + + function Microseconds_To_Ticks + (Microseconds : RTEMS.Unsigned32) + return RTEMS.Interval + is + function Microseconds_Per_Tick return RTEMS.Unsigned32; + pragma Import (C, Microseconds_Per_Tick, "_ada_microseconds_per_tick"); + begin + + return Microseconds / Microseconds_Per_Tick; + + end Microseconds_To_Ticks; + + function Milliseconds_To_Ticks + (Milliseconds : RTEMS.Unsigned32) + return RTEMS.Interval + is + begin + + return Microseconds_To_Ticks + (Milliseconds_To_Microseconds (Milliseconds)); + + end Milliseconds_To_Ticks; + + procedure Name_To_Characters + (Name : in RTEMS.Name; + C1 : out Character; + C2 : out Character; + C3 : out Character; + C4 : out Character) + is + C1_Value : RTEMS.Unsigned32; + C2_Value : RTEMS.Unsigned32; + C3_Value : RTEMS.Unsigned32; + C4_Value : RTEMS.Unsigned32; + begin + + C1_Value := Interfaces.Shift_Right (Name, 24); + C2_Value := Interfaces.Shift_Right (Name, 16); + C3_Value := Interfaces.Shift_Right (Name, 8); + C4_Value := Name; + + C1_Value := C1_Value and 16#00FF#; + C2_Value := C2_Value and 16#00FF#; + C3_Value := C3_Value and 16#00FF#; + C4_Value := C4_Value and 16#00FF#; + + C1 := Character'Val (C1_Value); + C2 := Character'Val (C2_Value); + C3 := Character'Val (C3_Value); + C4 := Character'Val (C4_Value); + + end Name_To_Characters; + + function Get_Node (ID : in RTEMS.ID) return RTEMS.Unsigned32 is + begin + + -- May not be right + return Interfaces.Shift_Right (ID, 16); + + end Get_Node; + + function Get_Index (ID : in RTEMS.ID) return RTEMS.Unsigned32 is + begin + + -- May not be right + return ID and 16#FFFF#; + + end Get_Index; + + function Are_Statuses_Equal + (Status : in RTEMS.Status_Codes; + Desired : in RTEMS.Status_Codes) + return Standard.Boolean + is + begin + + if Status = Desired then + return Standard.True; + end if; + + return Standard.False; + + end Are_Statuses_Equal; + + function Is_Status_Successful + (Status : in RTEMS.Status_Codes) + return Standard.Boolean + is + begin + + if Status = RTEMS.Successful then + return Standard.True; + end if; + + return Standard.False; + + end Is_Status_Successful; + + function Subtract + (Left : in RTEMS.Address; + Right : in RTEMS.Address) + return RTEMS.Unsigned32 + is + function To_Unsigned32 is new Ada.Unchecked_Conversion ( + System.Address, + RTEMS.Unsigned32); + + begin + return To_Unsigned32 (Left) - To_Unsigned32 (Right); + end Subtract; + + function Are_Equal + (Left : in RTEMS.Address; + Right : in RTEMS.Address) + return Standard.Boolean + is + function To_Unsigned32 is new Ada.Unchecked_Conversion ( + System.Address, + RTEMS.Unsigned32); + + begin + return (To_Unsigned32 (Left) = To_Unsigned32 (Right)); + end Are_Equal; + + -- + -- + -- RTEMS API + -- + + 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; + + -- + -- Initialization Manager -- Shutdown Only + -- + procedure Shutdown_Executive (Status : in RTEMS.Unsigned32) is + procedure Shutdown_Executive_Base (Status : RTEMS.Unsigned32); + pragma Import (C, Shutdown_Executive_Base, "rtems_shutdown_executive"); + begin + Shutdown_Executive_Base (Status); + end Shutdown_Executive; + +end RTEMS; diff --git a/cpukit/include/adainclude/rtems.ads b/cpukit/include/adainclude/rtems.ads new file mode 100644 index 0000000000..2b59c74186 --- /dev/null +++ b/cpukit/include/adainclude/rtems.ads @@ -0,0 +1,546 @@ +-- 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.org/license/LICENSE. +-- + +with System; +with System.Storage_Elements; use System.Storage_Elements; +with Interfaces; +with Interfaces.C; + +package RTEMS is +pragma Elaborate_Body (RTEMS); + + Structure_Alignment : constant := 8; + + -- + -- RTEMS Base Types + -- + + subtype Unsigned8 is Interfaces.Unsigned_8; + subtype Unsigned16 is Interfaces.Unsigned_16; + subtype Unsigned32 is Interfaces.Unsigned_32; + subtype Signed32 is Interfaces.Integer_32; + + type Unsigned32_Pointer is access all RTEMS.Unsigned32; + type Unsigned16_Pointer is access all RTEMS.Unsigned16; + type Unsigned8_Pointer is access all RTEMS.Unsigned8; + type Signed32_Pointer is access all RTEMS.Signed32; + + subtype Boolean is RTEMS.Unsigned8; + subtype Address is System.Address; + subtype Single is Interfaces.C.C_float; + subtype Double is Interfaces.C.Double; + + -- + -- The following define the size of each of the base types in + -- both bits and system units. + -- + + Unsigned8_Bits : constant := 7; + Unsigned16_Bits : constant := 15; + Unsigned32_Bits : constant := 31; + Boolean_Bits : constant := 7; + Address_Bits : constant := 31; + Single_Bits : constant := 31; + Double_Bits : constant := 63; + + Unsigned8_Units : constant := 1; + Unsigned16_Units : constant := 2; + Unsigned32_Units : constant := 4; + Boolean_Units : constant := 1; + Address_Units : constant := 4; + Single_Units : constant := 4; + Double_Units : constant := 8; + + Null_Address : constant RTEMS.Address := + System.Storage_Elements.To_Address(0); + + True : constant RTEMS.Boolean := 1; + False : constant RTEMS.Boolean := 0; + + -- + -- More Types + -- + + subtype Name is RTEMS.Unsigned32; + subtype ID is RTEMS.Unsigned32; + subtype Interval is RTEMS.Unsigned32; + subtype Attribute is RTEMS.Unsigned32; + subtype Mode is RTEMS.Unsigned32; + subtype Option is RTEMS.Unsigned32; + subtype Notepad_Index is RTEMS.Unsigned32 range 0 .. 15; + + subtype Event_Set is RTEMS.Unsigned32; + subtype Signal_Set is RTEMS.Unsigned32; + subtype Device_Major_Number is RTEMS.Unsigned32; + subtype Device_Minor_Number is RTEMS.Unsigned32; + subtype ISR_Level is RTEMS.Unsigned32; + + subtype Node is RTEMS.Unsigned32; + + type Driver_Name_t is + record + Device_Name : RTEMS.Address; + Device_Name_Length : RTEMS.Unsigned32; + Major : RTEMS.Device_Major_Number; + Minor : RTEMS.Device_Minor_Number; + + end record; + + + -- + -- Task Related Types + -- + + subtype TCB is RTEMS.Unsigned32; + type TCB_Pointer is access all RTEMS.TCB; + + -- + -- Time of Day Type + -- + + type Time_Of_Day is + record + Year : RTEMS.Unsigned32; -- year, A.D. + Month : RTEMS.Unsigned32; -- month, 1 .. 12 + Day : RTEMS.Unsigned32; -- day, 1 .. 31 + Hour : RTEMS.Unsigned32; -- hour, 0 .. 23 + Minute : RTEMS.Unsigned32; -- minute, 0 .. 59 + Second : RTEMS.Unsigned32; -- second, 0 .. 59 + Ticks : RTEMS.Unsigned32; -- elapsed ticks between seconds + end record; + + type Time_T is new Interfaces.C.Long; + + type Timespec is record + TV_Sec : Time_T; + TV_Nsec : Interfaces.C.Long; + end record; + pragma Convention (C, Timespec); + + type Time_Value is + record + Seconds : RTEMS.Unsigned32; + Microseconds : RTEMS.Unsigned32; + end record; + + -- + -- Ident Options + -- + + Search_All_Nodes : constant RTEMS.Node := 0; + Search_Other_Nodes : constant RTEMS.Node := 16#7FFFFFFE#; + Search_Local_Node : constant RTEMS.Node := 16#7FFFFFFF#; + Who_Am_I : constant RTEMS.Node := 0; + + -- + -- Options + -- + + Default_Options : constant RTEMS.Option := 16#0000#; + + Wait : constant RTEMS.Option := 16#0000#; + No_Wait : constant RTEMS.Option := 16#0001#; + + Event_All : constant RTEMS.Option := 16#0000#; + Event_Any : constant RTEMS.Option := 16#0002#; + + -- + -- Mode constants + -- + + Default_Modes : constant RTEMS.Mode := 16#0000#; + + All_Mode_Masks : constant RTEMS.Mode := 16#0000_ffff#; + Current_Mode : constant RTEMS.Mode := 16#0000_0000#; + Preempt_Mask : constant RTEMS.Mode := 16#0000_0100#; + Timeslice_Mask : constant RTEMS.Mode := 16#0000_0200#; + ASR_Mask : constant RTEMS.Mode := 16#0000_0400#; + Interrupt_Mask : RTEMS.Mode; + Preempt : constant RTEMS.Mode := 16#0000_0000#; + No_Preempt : constant RTEMS.Mode := 16#0000_0100#; + No_Timeslice : constant RTEMS.Mode := 16#0000_0000#; + Timeslice : constant RTEMS.Mode := 16#0000_0200#; + ASR : constant RTEMS.Mode := 16#0000_0000#; + No_ASR : constant RTEMS.Mode := 16#0000_0400#; + + pragma Import (C, Interrupt_Mask, "rtems_interrupt_mask"); + + -- + -- Attribute constants + -- + + Default_Attributes : constant RTEMS.Attribute := 16#00000000#; + No_Floating_Point : constant RTEMS.Attribute := 16#00000000#; + Floating_Point : constant RTEMS.Attribute := 16#00000001#; + Local : constant RTEMS.Attribute := 16#00000000#; + Global : constant RTEMS.Attribute := 16#00000002#; + FIFO : constant RTEMS.Attribute := 16#00000000#; + Priority : constant RTEMS.Attribute := 16#00000004#; + Counting_Semaphore : constant RTEMS.Attribute := 16#00000000#; + Binary_Semaphore : constant RTEMS.Attribute := 16#00000010#; + Simple_Binary_Semaphore : constant RTEMS.Attribute := 16#00000020#; + No_Inherit_Priority : constant RTEMS.Attribute := 16#00000000#; + Inherit_Priority : constant RTEMS.Attribute := 16#00000040#; + No_Priority_Ceiling : constant RTEMS.Attribute := 16#00000000#; + Priority_Ceiling : constant RTEMS.Attribute := 16#00000080#; + + function Interrupt_Level ( + Level : in RTEMS.Unsigned32 + ) return RTEMS.Mode; + pragma Import (C, Interrupt_Level, "rtems_interrupt_level_body"); + + Minimum_Stack_Size : RTEMS.Unsigned32; + pragma Import (C, Minimum_Stack_Size, "rtems_minimum_stack_size"); + + -- + -- Notepad index constants + -- + + Notepad_0 : constant RTEMS.Unsigned32 := 0; + Notepad_1 : constant RTEMS.Unsigned32 := 1; + Notepad_2 : constant RTEMS.Unsigned32 := 2; + Notepad_3 : constant RTEMS.Unsigned32 := 3; + Notepad_4 : constant RTEMS.Unsigned32 := 4; + Notepad_5 : constant RTEMS.Unsigned32 := 5; + Notepad_6 : constant RTEMS.Unsigned32 := 6; + Notepad_7 : constant RTEMS.Unsigned32 := 7; + Notepad_8 : constant RTEMS.Unsigned32 := 8; + Notepad_9 : constant RTEMS.Unsigned32 := 9; + Notepad_10 : constant RTEMS.Unsigned32 := 10; + Notepad_11 : constant RTEMS.Unsigned32 := 11; + Notepad_12 : constant RTEMS.Unsigned32 := 12; + Notepad_13 : constant RTEMS.Unsigned32 := 13; + Notepad_14 : constant RTEMS.Unsigned32 := 14; + Notepad_15 : constant RTEMS.Unsigned32 := 15; + + -- + -- Miscellaneous + -- + + No_Timeout : constant RTEMS.Interval := 0; + Self : constant RTEMS.ID := 0; + Yield_Processor : constant RTEMS.Interval := 0; + Rate_Monotonic_Period_Status : constant RTEMS.Interval := 0; + + + -- + -- Extension Callouts and Table + -- + + type Thread_Create_Extension is access function ( + Current_Task : in RTEMS.TCB_Pointer; + New_Task : in RTEMS.TCB_Pointer + ) return RTEMS.Boolean; + pragma Convention (C, Thread_Create_Extension); + + type Thread_Start_Extension is access procedure ( + Current_Task : in RTEMS.TCB_Pointer; + Started_Task : in RTEMS.TCB_Pointer + ); + pragma Convention (C, Thread_Start_Extension); + + type Thread_Restart_Extension is access procedure ( + Current_Task : in RTEMS.TCB_Pointer; + Restarted_Task : in RTEMS.TCB_Pointer + ); + pragma Convention (C, Thread_Restart_Extension); + + type Thread_Delete_Extension is access procedure ( + Current_Task : in RTEMS.TCB_Pointer; + Deleted_Task : in RTEMS.TCB_Pointer + ); + pragma Convention (C, Thread_Delete_Extension); + + type Thread_Switch_Extension is access procedure ( + Current_Task : in RTEMS.TCB_Pointer; + Heir_Task : in RTEMS.TCB_Pointer + ); + pragma Convention (C, Thread_Switch_Extension); + + type Thread_Post_Switch_Extension is access procedure ( + Current_Task : in RTEMS.TCB_Pointer + ); + pragma Convention (C, Thread_Post_Switch_Extension); + + type Thread_Begin_Extension is access procedure ( + Current_Task : in RTEMS.TCB_Pointer + ); + pragma Convention (C, Thread_Begin_Extension); + + type Thread_Exitted_Extension is access procedure ( + Current_Task : in RTEMS.TCB_Pointer + ); + pragma Convention (C, Thread_Exitted_Extension); + + type Fatal_Error_Extension is access procedure ( + Error : in RTEMS.Unsigned32 + ); + pragma Convention (C, Fatal_Error_Extension); + + type Extensions_Table is + record + Thread_Create : RTEMS.Thread_Create_Extension; + Thread_Start : RTEMS.Thread_Start_Extension; + Thread_Restart : RTEMS.Thread_Restart_Extension; + Thread_Delete : RTEMS.Thread_Delete_Extension; + Thread_Switch : RTEMS.Thread_Switch_Extension; + Thread_Post_Switch : RTEMS.Thread_Post_Switch_Extension; + Thread_Begin : RTEMS.Thread_Begin_Extension; + Thread_Exitted : RTEMS.Thread_Exitted_Extension; + Fatal : RTEMS.Fatal_Error_Extension; + end record; + + type Extensions_Table_Pointer is access all Extensions_Table; + + -- + -- The following type define a pointer to a signal service routine. + -- + + type ASR_Handler is access procedure ( + Signals : in RTEMS.Signal_Set + ); + pragma Convention (C, ASR_Handler); + + -- + -- Method Completions Status Codes + -- + + type Status_Codes is ( + Successful, -- successful completion + Task_Exitted, -- returned from a task + MP_Not_Configured, -- multiprocessing not configured + Invalid_Name, -- invalid object name + Invalid_ID, -- invalid object id + Too_Many, -- too many + Timeout, -- timed out waiting + Object_Was_Deleted, -- object deleted while waiting + Invalid_Size, -- specified size was invalid + Invalid_Address, -- address specified is invalid + Invalid_Number, -- number was invalid + Not_Defined, -- item has not been initialized + Resource_In_Use, -- resources still outstanding + Unsatisfied, -- request not satisfied + Incorrect_State, -- task is in wrong state + Already_Suspended, -- task already in state + Illegal_On_Self, -- illegal on calling task + Illegal_On_Remote_Object, -- illegal for remote object + Called_From_ISR, -- called from wrong environment + Invalid_Priority, -- invalid task priority + Invalid_Clock, -- invalid date/time + Invalid_Node, -- invalid node id + Not_Configured, -- directive not configured + Not_Owner_Of_Resource, -- not owner of resource + Not_Implemented, -- directive not implemented + Internal_Error, -- RTEMS inconsistency detected + No_Memory, -- no memory left in heap + IO_Error, -- driver IO error + Proxy_Blocking -- internal multiprocessing only + ); + + for Status_Codes'Size use 32; + + for Status_Codes use ( + Successful => 0, + Task_Exitted => 1, + MP_Not_Configured => 2, + Invalid_Name => 3, + Invalid_ID => 4, + Too_Many => 5, + Timeout => 6, + Object_Was_Deleted => 7, + Invalid_Size => 8, + Invalid_Address => 9, + Invalid_NumbeR => 10, + Not_Defined => 11, + Resource_In_Use => 12, + Unsatisfied => 13, + Incorrect_State => 14, + Already_Suspended => 15, + Illegal_On_Self => 16, + Illegal_On_Remote_Object => 17, + Called_From_ISR => 18, + Invalid_Priority => 19, + Invalid_Clock => 20, + Invalid_Node => 21, + Not_Configured => 22, + Not_Owner_Of_Resource => 23, + Not_ImplementeD => 24, + Internal_Error => 25, + No_Memory => 26, + IO_Error => 27, + Proxy_Blocking => 28 + ); + + -- + -- RTEMS Events + -- + + Pending_Events : constant RTEMS.Event_Set := 16#0000_0000#; + All_Events : constant RTEMS.Event_Set := 16#FFFF_FFFF#; + Event_0 : constant RTEMS.Event_Set := 16#0000_0001#; + Event_1 : constant RTEMS.Event_Set := 16#0000_0002#; + Event_2 : constant RTEMS.Event_Set := 16#0000_0004#; + Event_3 : constant RTEMS.Event_Set := 16#0000_0008#; + Event_4 : constant RTEMS.Event_Set := 16#0000_0010#; + Event_5 : constant RTEMS.Event_Set := 16#0000_0020#; + Event_6 : constant RTEMS.Event_Set := 16#0000_0040#; + Event_7 : constant RTEMS.Event_Set := 16#0000_0080#; + Event_8 : constant RTEMS.Event_Set := 16#0000_0100#; + Event_9 : constant RTEMS.Event_Set := 16#0000_0200#; + Event_10 : constant RTEMS.Event_Set := 16#0000_0400#; + Event_11 : constant RTEMS.Event_Set := 16#0000_0800#; + Event_12 : constant RTEMS.Event_Set := 16#0000_1000#; + Event_13 : constant RTEMS.Event_Set := 16#0000_2000#; + Event_14 : constant RTEMS.Event_Set := 16#0000_4000#; + Event_15 : constant RTEMS.Event_Set := 16#0000_8000#; + Event_16 : constant RTEMS.Event_Set := 16#0001_0000#; + Event_17 : constant RTEMS.Event_Set := 16#0002_0000#; + Event_18 : constant RTEMS.Event_Set := 16#0004_0000#; + Event_19 : constant RTEMS.Event_Set := 16#0008_0000#; + Event_20 : constant RTEMS.Event_Set := 16#0010_0000#; + Event_21 : constant RTEMS.Event_Set := 16#0020_0000#; + Event_22 : constant RTEMS.Event_Set := 16#0040_0000#; + Event_23 : constant RTEMS.Event_Set := 16#0080_0000#; + Event_24 : constant RTEMS.Event_Set := 16#0100_0000#; + Event_25 : constant RTEMS.Event_Set := 16#0200_0000#; + Event_26 : constant RTEMS.Event_Set := 16#0400_0000#; + Event_27 : constant RTEMS.Event_Set := 16#0800_0000#; + Event_28 : constant RTEMS.Event_Set := 16#1000_0000#; + Event_29 : constant RTEMS.Event_Set := 16#2000_0000#; + Event_30 : constant RTEMS.Event_Set := 16#4000_0000#; + Event_31 : constant RTEMS.Event_Set := 16#8000_0000#; + + -- + -- RTEMS Signals + -- + + All_Signals : constant RTEMS.Signal_Set := 16#7FFFFFFF#; + Signal_0 : constant RTEMS.Signal_Set := 16#00000001#; + Signal_1 : constant RTEMS.Signal_Set := 16#00000002#; + Signal_2 : constant RTEMS.Signal_Set := 16#00000004#; + Signal_3 : constant RTEMS.Signal_Set := 16#00000008#; + Signal_4 : constant RTEMS.Signal_Set := 16#00000010#; + Signal_5 : constant RTEMS.Signal_Set := 16#00000020#; + Signal_6 : constant RTEMS.Signal_Set := 16#00000040#; + Signal_7 : constant RTEMS.Signal_Set := 16#00000080#; + Signal_8 : constant RTEMS.Signal_Set := 16#00000100#; + Signal_9 : constant RTEMS.Signal_Set := 16#00000200#; + Signal_10 : constant RTEMS.Signal_Set := 16#00000400#; + Signal_11 : constant RTEMS.Signal_Set := 16#00000800#; + Signal_12 : constant RTEMS.Signal_Set := 16#00001000#; + Signal_13 : constant RTEMS.Signal_Set := 16#00002000#; + Signal_14 : constant RTEMS.Signal_Set := 16#00004000#; + Signal_15 : constant RTEMS.Signal_Set := 16#00008000#; + Signal_16 : constant RTEMS.Signal_Set := 16#00010000#; + Signal_17 : constant RTEMS.Signal_Set := 16#00020000#; + Signal_18 : constant RTEMS.Signal_Set := 16#00040000#; + Signal_19 : constant RTEMS.Signal_Set := 16#00080000#; + Signal_20 : constant RTEMS.Signal_Set := 16#00100000#; + Signal_21 : constant RTEMS.Signal_Set := 16#00200000#; + Signal_22 : constant RTEMS.Signal_Set := 16#00400000#; + Signal_23 : constant RTEMS.Signal_Set := 16#00800000#; + Signal_24 : constant RTEMS.Signal_Set := 16#01000000#; + Signal_25 : constant RTEMS.Signal_Set := 16#02000000#; + Signal_26 : constant RTEMS.Signal_Set := 16#04000000#; + Signal_27 : constant RTEMS.Signal_Set := 16#08000000#; + Signal_28 : constant RTEMS.Signal_Set := 16#10000000#; + Signal_29 : constant RTEMS.Signal_Set := 16#20000000#; + Signal_30 : constant RTEMS.Signal_Set := 16#40000000#; + Signal_31 : constant RTEMS.Signal_Set := 16#80000000#; + + -- + -- Utility Functions + -- + + function From_Ada_Boolean ( + Ada_Boolean : Standard.Boolean + ) return RTEMS.Boolean; + + function To_Ada_Boolean ( + RTEMS_Boolean : RTEMS.Boolean + ) return Standard.Boolean; + + function Milliseconds_To_Microseconds ( + Milliseconds : RTEMS.Unsigned32 + ) return RTEMS.Unsigned32; + + function Microseconds_To_Ticks ( + Microseconds : RTEMS.Unsigned32 + ) return RTEMS.Interval; + + function Milliseconds_To_Ticks ( + Milliseconds : RTEMS.Unsigned32 + ) return RTEMS.Interval; + + procedure Name_To_Characters ( + Name : in RTEMS.Name; + C1 : out Character; + C2 : out Character; + C3 : out Character; + C4 : out Character + ); + + function Get_Node ( + ID : in RTEMS.ID + ) return RTEMS.Unsigned32; + + function Get_Index ( + ID : in RTEMS.ID + ) return RTEMS.Unsigned32; + + function Are_Statuses_Equal ( + Status : in RTEMS.Status_Codes; + Desired : in RTEMS.Status_Codes + ) return Standard.Boolean; + + function Is_Status_Successful ( + Status : in RTEMS.Status_Codes + ) return Standard.Boolean; + + function Subtract ( + Left : in RTEMS.Address; + Right : in RTEMS.Address + ) return RTEMS.Unsigned32; + + function Are_Equal ( + Left : in RTEMS.Address; + Right : in RTEMS.Address + ) return Standard.Boolean; + + -- + -- RTEMS API + -- + + function Build_Name ( + C1 : in Character; + C2 : in Character; + C3 : in Character; + C4 : in Character + ) return RTEMS.Name; + + -- + -- Initialization Manager -- Shutdown Only + -- + procedure Shutdown_Executive ( + Status : in RTEMS.Unsigned32 + ); + +end RTEMS; + diff --git a/cpukit/preinstall.am b/cpukit/preinstall.am index 7936de2ebb..d595085ebe 100644 --- a/cpukit/preinstall.am +++ b/cpukit/preinstall.am @@ -620,3 +620,165 @@ $(PROJECT_INCLUDE)/drvmgr/drvmgr_list.h: libdrvmgr/drvmgr_list.h $(PROJECT_INCLU $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/drvmgr/drvmgr_list.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/drvmgr/drvmgr_list.h endif +if LIBGNAT +$(PROJECT_INCLUDE)/adainclude/$(dirstamp): + @$(MKDIR_P) $(PROJECT_INCLUDE)/adainclude + @: > $(PROJECT_INCLUDE)/adainclude/$(dirstamp) +PREINSTALL_DIRS += $(PROJECT_INCLUDE)/adainclude/$(dirstamp) + +$(PROJECT_INCLUDE)/adainclude/rtems.adb: include/adainclude/rtems.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems.adb +PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems.adb + +$(PROJECT_INCLUDE)/adainclude/rtems.ads: include/adainclude/rtems.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems.ads +PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems.ads + +$(PROJECT_INCLUDE)/adainclude/rtems-barrier.adb: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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-event.adb: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/rtems-multiprocessing.adb $(PROJECT_INCLUDE)/adainclude/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-multiprocessing.adb +PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-multiprocessing.adb + +$(PROJECT_INCLUDE)/adainclude/rtems-multiprocessing.ads: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/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: include/adainclude/rtems-timer.ads $(PROJECT_INCLUDE)/adainclude/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/adainclude/rtems-timer.ads +PREINSTALL_FILES += $(PROJECT_INCLUDE)/adainclude/rtems-timer.ads +endif -- cgit v1.2.3