]> rtime.felk.cvut.cz Git - frescor/fosa.git/commitdiff
Removed fosa/marte_non_local_jump directory (now part of MaRTE OS)
authormgh <mgh@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Tue, 27 Jan 2009 12:53:05 +0000 (12:53 +0000)
committermgh <mgh@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Tue, 27 Jan 2009 12:53:05 +0000 (12:53 +0000)
git-svn-id: http://www.frescor.org/private/svn/frescor/fosa/trunk@1495 35b4ef3e-fd22-0410-ab77-dab3279adceb

marte_non_local_jump/Makefile [deleted file]
marte_non_local_jump/Makefile.omk [deleted file]
marte_non_local_jump/context.adb [deleted file]
marte_non_local_jump/context.ads [deleted file]
marte_non_local_jump/execute_context.h [deleted file]
marte_non_local_jump/non_local_jump_test.adb [deleted file]

diff --git a/marte_non_local_jump/Makefile b/marte_non_local_jump/Makefile
deleted file mode 100644 (file)
index 58eb743..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-all:  non_local_jump_test.exe
-
-non_local_jump_test.exe:  non_local_jump_test.adb
-       mgnatmake -Imarte_src_dirs -o $@ $<
-
-
-clean:
-       rm -f *.o *.exe *.ali b~* mprogram*
-
diff --git a/marte_non_local_jump/Makefile.omk b/marte_non_local_jump/Makefile.omk
deleted file mode 100644 (file)
index 9aa9efe..0000000
+++ /dev/null
@@ -1 +0,0 @@
-include_HEADERS = $(notdir $(wildcard $(SOURCES_DIR)/*.h))
diff --git a/marte_non_local_jump/context.adb b/marte_non_local_jump/context.adb
deleted file mode 100644 (file)
index 2b0a972..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-------------------------------------------------------------------------------\r
---  ------------------         M a R T E   O S         -------------------  --\r
-------------------------------------------------------------------------------\r
---                                                             {MARTE_VERSION}\r
---\r
---                            'C o n t e x t'\r
---\r
---                                  Body\r
---\r
---  File 'context.adb'                                          By MAR\r
---\r
---  Processor context for non-local jumps\r
---\r
---  IMPORTANT: it must be compiled without any optimization!!\r
---\r
---  {MARTE_COPYRIGHT}\r
---\r
-------------------------------------------------------------------------------\r
---  {<MAR}\r
---\r
---  02-08-07:version operativa.\r
---\r
---  {MAR>} -------------------------------------------------------------------\r
-with Text_IO; use Text_IO;\r
-with Marte.Integer_Types;\r
-with Non_Local_Jump;\r
-with System;\r
-\r
-use type Marte.Integer_Types.Unsigned_32;\r
-\r
-package body Context is\r
-\r
-   Jmp_Buff : aliased Non_Local_Jump.Jmp_Context;\r
-   pragma Volatile (Jmp_Buff);\r
-\r
-   TCB : System.Address := System.Null_Address;\r
-   pragma Volatile (TCB);\r
-\r
-   function Pthread_Self return System.Address;\r
-   pragma Import (C, Pthread_Self, "pthread_self");\r
-\r
-   function Execute_Work(Work : Work_Acc) return Integer is\r
-   begin\r
-      Put_Line ("Start work");\r
-      TCB := Pthread_Self;\r
-      Non_Local_Jump.Save_Context(Jmp_Buff'Access);\r
-      if Non_Local_Jump.After_Jump (Jmp_Buff'Access) = 0 then\r
-         Put_Line ("---Not After Jump---");\r
-         Work.all;\r
-         return 0;\r
-      else\r
-         Put_Line ("---After Jump---");\r
-         return 1;\r
-      end if;\r
-   end Execute_Work;\r
-\r
-   procedure Restore_Work is\r
-   begin\r
-      Non_Local_Jump.Restore_Context (TCB, Jmp_Buff'Access);\r
-   end Restore_Work;\r
-\r
-end Context;\r
diff --git a/marte_non_local_jump/context.ads b/marte_non_local_jump/context.ads
deleted file mode 100644 (file)
index c01e67e..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-------------------------------------------------------------------------------\r
---  ------------------         M a R T E   O S         -------------------  --\r
-------------------------------------------------------------------------------\r
---                                                             {MARTE_VERSION}\r
---\r
---                            'C o n t e x t'\r
---\r
---                                  Spec\r
---\r
---  File 'context.ads'                                          By MAR\r
---\r
---  Processor context for non-local jumps\r
---\r
---  IMPORTANT: it must be compiled without any optimization!!\r
---\r
---  {MARTE_COPYRIGHT}\r
---\r
-------------------------------------------------------------------------------\r
---  {<MAR}\r
---\r
---  02-08-07:version operativa.\r
---\r
---  {MAR>} -------------------------------------------------------------------\r
-package Context is\r
-\r
-   type Work_Acc is access procedure;\r
-   pragma Convention (C, Work_Acc);\r
-\r
-   function Execute_Work(Work : Work_Acc) return Integer;\r
-   pragma export(C,Execute_Work, "execute_work");\r
-\r
-   procedure Restore_Work;\r
-   pragma export(C,Restore_Work, "restore_work");\r
-\r
-end Context;\r
diff --git a/marte_non_local_jump/execute_context.h b/marte_non_local_jump/execute_context.h
deleted file mode 100644 (file)
index 0948010..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _EXECUTE_WORK\r
-#define _EXECUTE_WORK\r
-\r
-\r
-int execute_work (void (*func)());\r
-\r
-void restore_work();\r
-\r
-#endif // _EXECUTE_WORK\r
diff --git a/marte_non_local_jump/non_local_jump_test.adb b/marte_non_local_jump/non_local_jump_test.adb
deleted file mode 100644 (file)
index bde516c..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-------------------------------------------------------------------------------\r
---  ------------------         M a R T E   O S         -------------------  --\r
-------------------------------------------------------------------------------\r
---                                                             {MARTE_VERSION}\r
---\r
---                      'N o n _ L o c a l _ J u m p'\r
---\r
---                                  Spec\r
---\r
---  File 'non_local_jump.ads'                                          By MAR\r
---\r
---  Non-local jumps for preempted tasks.\r
---\r
---  IMPORTANT: it must be compiled without any optimization!!\r
---\r
---  {MARTE_COPYRIGHT}\r
---\r
-------------------------------------------------------------------------------\r
---  {<MAR}\r
---\r
---  02-08-07:version operativa.\r
---\r
---  {MAR>} -------------------------------------------------------------------\r
-pragma Task_Dispatching_Policy (FIFO_Within_Priorities);\r
-with Text_IO; use Text_IO;\r
-with Ada.Unchecked_Conversion;\r
-with System;\r
-with Marte.Integer_Types; use Marte.Integer_Types;\r
-with Marte.HAL.Processor_Registers;\r
-with Non_Local_Jump;\r
-with System.Machine_Code; use System.Machine_Code;\r
-with Execution_Load;\r
-\r
-procedure Non_Local_Jump_Test is\r
-\r
-   --pragma Linker_Options("eat_20.o");\r
-\r
-   --procedure Eat_20;\r
-   --pragma Import (C, Eat_20, "eat_20");\r
-\r
-   pragma Priority (10);\r
-\r
-   --  package PR renames Processor_Registers;\r
-   package PR renames Non_Local_Jump;\r
-\r
-   Cont : Integer := 0;\r
-   pragma Volatile (Cont);\r
-\r
-   TCB : System.Address := System.Null_Address;\r
-   pragma Volatile (TCB);\r
-\r
-   function Pthread_Self return System.Address;\r
-   pragma Import (C, Pthread_Self, "pthread_self");\r
-\r
-   Jmp_Buff : aliased PR.Jmp_Context;\r
-   pragma Volatile (Jmp_Buff);\r
-\r
-   procedure Por_Fastidiar2 (C : Integer) is\r
-   begin\r
-      loop\r
-\r
-         Put_Line (Integer'Image (C));\r
-         Execution_Load.Eat (20.0);\r
-         --for I in 1 .. 20_000_000 loop\r
-         --   null;\r
-         --end loop;\r
-      end loop;\r
-   end Por_Fastidiar2;\r
-\r
-   procedure Por_Fastidiar1 (C : Integer) is\r
-   begin\r
-      Por_Fastidiar2 (C);\r
-   end Por_Fastidiar1;\r
-\r
-   --  tarea q se cambia su dirección de retorno\r
-   task Saltarina is\r
-      pragma Priority (5);\r
-   end Saltarina;\r
-\r
-   task body Saltarina is\r
-   begin\r
-      Put_Line ("hola2");\r
-      TCB := Pthread_Self;\r
-      loop\r
-         PR.Save_Context(Jmp_Buff'Access);\r
-         --  Asm ("int $3", No_Output_Operands, No_Input_Operands, "", True);\r
-         if PR.After_Jump (Jmp_Buff'Access) = 1 then\r
-            Put_Line ("---After Jump---");\r
-         else\r
-            Put_Line ("---Not After Jump 1---");\r
-            Por_Fastidiar1 (Cont);\r
-            Put_Line ("---Not After Jump 2---");\r
-         end if;\r
-         Cont := Cont + 1;\r
-         Put_Line(" Cont:" & Integer'Image (Cont));\r
-      end loop;\r
-\r
-   exception\r
-      when E:others =>\r
-         Put_Line ("Exception in Saltarina");\r
-   end Saltarina;\r
-\r
-begin\r
-   loop\r
-      delay 2.0;\r
-      exit when Cont >= 5;\r
-\r
-      Put_Line ("Antes de cambiar retorno 3");\r
-      PR.Restore_Context (TCB, Jmp_Buff'Access);\r
-      Put_Line ("Desp de cambiar retorno 3");\r
-      --delay 1000000.0;\r
-   end loop;\r
-   Put_Line (Integer'Image (Jmp_Buff'Size/8));\r
-\r
-end Non_Local_Jump_Test;\r