summaryrefslogtreecommitdiffstats
path: root/b~super_saw.adb
blob: 423a1574dd547c13bc500eaf9e7826c6015a1a75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
pragma Ada_95;
pragma Warnings (Off);
pragma Source_File_Name (ada_main, Spec_File_Name => "b~super_saw.ads");
pragma Source_File_Name (ada_main, Body_File_Name => "b~super_saw.adb");
pragma Suppress (Overflow_Check);

package body ada_main is

   E11 : Short_Integer; pragma Import (Ada, E11, "system__soft_links_E");
   E09 : Short_Integer; pragma Import (Ada, E09, "system__exception_table_E");
   E06 : Short_Integer; pragma Import (Ada, E06, "ada__numerics_E");
   E61 : Short_Integer; pragma Import (Ada, E61, "interfaces__c_E");
   E23 : Short_Integer; pragma Import (Ada, E23, "system__exceptions_E");
   E15 : Short_Integer; pragma Import (Ada, E15, "system__secondary_stack_E");
   E02 : Short_Integer; pragma Import (Ada, E02, "super_saw_E");

   Local_Priority_Specific_Dispatching : constant String := "";
   Local_Interrupt_States : constant String := "";

   Is_Elaborated : Boolean := False;

   procedure adafinal is

      procedure Runtime_Finalize;
      pragma Import (C, Runtime_Finalize, "__gnat_runtime_finalize");

   begin
      if not Is_Elaborated then
         return;
      end if;
      Is_Elaborated := False;
      Runtime_Finalize;
      null;
   end adafinal;

   type No_Param_Proc is access procedure;

   procedure adainit is
      Main_Priority : Integer;
      pragma Import (C, Main_Priority, "__gl_main_priority");
      Time_Slice_Value : Integer;
      pragma Import (C, Time_Slice_Value, "__gl_time_slice_val");
      WC_Encoding : Character;
      pragma Import (C, WC_Encoding, "__gl_wc_encoding");
      Locking_Policy : Character;
      pragma Import (C, Locking_Policy, "__gl_locking_policy");
      Queuing_Policy : Character;
      pragma Import (C, Queuing_Policy, "__gl_queuing_policy");
      Task_Dispatching_Policy : Character;
      pragma Import (C, Task_Dispatching_Policy, "__gl_task_dispatching_policy");
      Priority_Specific_Dispatching : System.Address;
      pragma Import (C, Priority_Specific_Dispatching, "__gl_priority_specific_dispatching");
      Num_Specific_Dispatching : Integer;
      pragma Import (C, Num_Specific_Dispatching, "__gl_num_specific_dispatching");
      Main_CPU : Integer;
      pragma Import (C, Main_CPU, "__gl_main_cpu");
      Interrupt_States : System.Address;
      pragma Import (C, Interrupt_States, "__gl_interrupt_states");
      Num_Interrupt_States : Integer;
      pragma Import (C, Num_Interrupt_States, "__gl_num_interrupt_states");
      Unreserve_All_Interrupts : Integer;
      pragma Import (C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
      Detect_Blocking : Integer;
      pragma Import (C, Detect_Blocking, "__gl_detect_blocking");
      Default_Stack_Size : Integer;
      pragma Import (C, Default_Stack_Size, "__gl_default_stack_size");
      Leap_Seconds_Support : Integer;
      pragma Import (C, Leap_Seconds_Support, "__gl_leap_seconds_support");
      Bind_Env_Addr : System.Address;
      pragma Import (C, Bind_Env_Addr, "__gl_bind_env_addr");

      procedure Runtime_Initialize (Install_Handler : Integer);
      pragma Import (C, Runtime_Initialize, "__gnat_runtime_initialize");

      Finalize_Library_Objects : No_Param_Proc;
      pragma Import (C, Finalize_Library_Objects, "__gnat_finalize_library_objects");
   begin
      if Is_Elaborated then
         return;
      end if;
      Is_Elaborated := True;
      Main_Priority := -1;
      Time_Slice_Value := -1;
      WC_Encoding := 'b';
      Locking_Policy := ' ';
      Queuing_Policy := ' ';
      Task_Dispatching_Policy := ' ';
      Priority_Specific_Dispatching :=
        Local_Priority_Specific_Dispatching'Address;
      Num_Specific_Dispatching := 0;
      Main_CPU := -1;
      Interrupt_States := Local_Interrupt_States'Address;
      Num_Interrupt_States := 0;
      Unreserve_All_Interrupts := 0;
      Detect_Blocking := 0;
      Default_Stack_Size := -1;
      Leap_Seconds_Support := 0;

      Runtime_Initialize (1);

      if E11 = 0 then
         System.Soft_Links'Elab_Spec;
      end if;
      if E09 = 0 then
         System.Exception_Table'Elab_Body;
      end if;
      E09 := E09 + 1;
      if E06 = 0 then
         Ada.Numerics'Elab_Spec;
      end if;
      E06 := E06 + 1;
      if E61 = 0 then
         Interfaces.C'Elab_Spec;
      end if;
      if E23 = 0 then
         System.Exceptions'Elab_Spec;
      end if;
      E23 := E23 + 1;
      E61 := E61 + 1;
      if E11 = 0 then
         System.Soft_Links'Elab_Body;
      end if;
      E11 := E11 + 1;
      if E15 = 0 then
         System.Secondary_Stack'Elab_Body;
      end if;
      E15 := E15 + 1;
      E02 := E02 + 1;
   end adainit;

--  BEGIN Object file/option list
   --   ./super_saw.o
   --   -L./
   --   -L/usr/lib/gcc/x86_64-redhat-linux/6.3.1/adalib/
   --   -static
   --   -lgnat
--  END Object file/option list   

end ada_main;