This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] PATCH: Change Linux to GNU/Linux
- To: gcc-patches at gcc dot gnu dot org
- Subject: [Ada] PATCH: Change Linux to GNU/Linux
- From: Geert Bosch <bosch at gnat dot com>
- Date: Thu, 4 Oct 2001 14:00:05 -0400 (EDT)
I checked in the patch below. These are comment changes and
a few identifier renamings.
-Geert
2001-10-04 Geert Bosch <bosch@gnat.com>
* 3lsoccon.ads: Added file, missed with initial check ins.
* 4lintnam.ads: Fix header format.
Change Linux to GNU/Linux.
* 5iosinte.adb: Change Linux to GNU/Linux.
* 5iosinte.ads: Change Linux to GNU/Linux.
* 5itaprop.adb: Change Linux to GNU/Linux.
* 5itaspri.ads: Change Linux to GNU/Linux.
Update copyright notice.
* 5lintman.adb: Change Linux to GNU/Linux.
* 5lml-tgt.adb: Change Linux to GNU/Linux.
* 5losinte.ads: Change Linux to GNU/Linux.
* 5lsystem.ads: Change Linux to GNU/Linux.
* 5qosinte.adb: Change Linux to GNU/Linux.
* 5qosinte.ads: Change Linux to GNU/Linux.
* 5qparame.ads: Change Linux to GNU/Linux.
* 5qtaprop.adb: Change Linux to GNU/Linux.
* 5qtaspri.ads: Change Linux to GNU/Linux.
Add 2001 to copyright notice.
* 5vintman.ads: Change Linux to GNU/Linux.
Fix header format. Add 2001 to copyright notice.
* g-soccon.ads: Change Linux to GNU/Linux.
* g-trasym.ads: Change Linux to GNU/Linux.
Add 2001 to copyright notice.
* memtrack.adb: Change Linux to GNU/Linux.
* s-intman.ads: Change Linux to GNU/Linux.
Add 2001 to copyright notice. Fix header format.
* s-stache.adb: Change Linux to GNU/Linux.
* adaint.c: Change Linux to GNU/Linux.
* cio.c: Change Linux to GNU/Linux.
* cstreams.c: Change Linux to GNU/Linux.
* init.c: Change Linux to GNU/Linux.
* gmem.c: Change Linux to GNU/Linux.
* tracebak.c: Change Linux to GNU/Linux.
diff -c -r1.1 -r1.2
*** 3lsoccon.ads 2001/02/16 15:02:30 1.1
--- 3lsoccon.ads 2001/10/04 02:06:06 1.2
***************
*** 32,38 ****
-- --
------------------------------------------------------------------------------
! -- This is the version for Linux
package GNAT.Sockets.Constants is
--- 32,38 ----
-- --
------------------------------------------------------------------------------
! -- This is the version for GNU/Linux
package GNAT.Sockets.Constants is
diff -c -r1.5 -r1.6
*** 4lintnam.ads 2001/06/27 14:17:24 1.5
--- 4lintnam.ads 2001/10/04 02:07:29 1.6
***************
*** 6,12 ****
-- --
-- S p e c --
-- --
! -- $Revision$ --
-- --
-- Copyright (C) 1991-2001 Free Software Foundation, Inc. --
-- --
--- 6,12 ----
-- --
-- S p e c --
-- --
! -- $Revision$
-- --
-- Copyright (C) 1991-2001 Free Software Foundation, Inc. --
-- --
***************
*** 34,40 ****
-- --
------------------------------------------------------------------------------
! -- This is a Linux version of this package.
--
-- The following signals are reserved by the run time (FSU threads):
--
--- 34,40 ----
-- --
------------------------------------------------------------------------------
! -- This is a GNU/Linux version of this package.
--
-- The following signals are reserved by the run time (FSU threads):
--
diff -c -r1.12 -r1.13
*** 5iosinte.adb 2001/04/02 10:32:49 1.12
--- 5iosinte.adb 2001/10/04 02:09:33 1.13
***************
*** 34,41 ****
-- --
------------------------------------------------------------------------------
! -- This is a LinuxThreads, Solaris pthread and HP-UX pthread version of this
! -- package.
pragma Polling (Off);
-- Turn off polling, we do not want ATC polling to take place during
--- 34,41 ----
-- --
------------------------------------------------------------------------------
! -- This is a GNU/LinuxThreads, Solaris pthread and HP-UX pthread version
! -- of this package.
pragma Polling (Off);
-- Turn off polling, we do not want ATC polling to take place during
diff -c -r1.27 -r1.28
*** 5iosinte.ads 2001/06/26 22:49:17 1.27
--- 5iosinte.ads 2001/10/04 02:10:53 1.28
***************
*** 34,40 ****
-- --
------------------------------------------------------------------------------
! -- This is a Linux (LinuxThreads) version of this package.
-- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System.
--- 34,40 ----
-- --
------------------------------------------------------------------------------
! -- This is a GNU/Linux (GNU/LinuxThreads) version of this package.
-- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System.
***************
*** 115,125 ****
SIGPROF : constant := 27; -- profiling timer expired
SIGXCPU : constant := 24; -- CPU time limit exceeded
SIGXFSZ : constant := 25; -- filesize limit exceeded
! SIGUNUSED : constant := 31; -- unused signal (Linux)
! SIGSTKFLT : constant := 16; -- coprocessor stack fault (Linux)
! SIGLTHRRES : constant := 32; -- LinuxThreads restart signal
! SIGLTHRCAN : constant := 33; -- LinuxThreads cancel signal
! SIGLTHRDBG : constant := 34; -- LinuxThreads debugger signal
SIGADAABORT : constant := SIGABRT;
-- Change this if you want to use another signal for task abort.
--- 115,125 ----
SIGPROF : constant := 27; -- profiling timer expired
SIGXCPU : constant := 24; -- CPU time limit exceeded
SIGXFSZ : constant := 25; -- filesize limit exceeded
! SIGUNUSED : constant := 31; -- unused signal (GNU/Linux)
! SIGSTKFLT : constant := 16; -- coprocessor stack fault (Linux)
! SIGLTHRRES : constant := 32; -- GNU/LinuxThreads restart signal
! SIGLTHRCAN : constant := 33; -- GNU/LinuxThreads cancel signal
! SIGLTHRDBG : constant := 34; -- GNU/LinuxThreads debugger signal
SIGADAABORT : constant := SIGABRT;
-- Change this if you want to use another signal for task abort.
***************
*** 146,157 ****
-- POSIX simply won't allow it.
SIGLTHRRES, SIGLTHRCAN, SIGLTHRDBG);
! -- These three signals are used by LinuxThreads starting from
-- glibc 2.1 (future 2.2).
Reserved : constant Signal_Set :=
-- I am not sure why the following two signals are reserved.
! -- I guess they are not supported by this version of Linux.
(SIGVTALRM, SIGUNUSED);
type sigset_t is private;
--- 146,157 ----
-- POSIX simply won't allow it.
SIGLTHRRES, SIGLTHRCAN, SIGLTHRDBG);
! -- These three signals are used by GNU/LinuxThreads starting from
-- glibc 2.1 (future 2.2).
Reserved : constant Signal_Set :=
-- I am not sure why the following two signals are reserved.
! -- I guess they are not supported by this version of GNU/Linux.
(SIGVTALRM, SIGUNUSED);
type sigset_t is private;
diff -c -r1.43 -r1.44
*** 5itaprop.adb 2001/07/16 13:29:58 1.43
--- 5itaprop.adb 2001/10/04 02:12:15 1.44
***************
*** 34,40 ****
-- --
------------------------------------------------------------------------------
! -- This is a Linux (LinuxThreads) version of this package
-- This package contains all the GNULL primitives that interface directly
-- with the underlying OS.
--- 34,40 ----
-- --
------------------------------------------------------------------------------
! -- This is a GNU/Linux (GNU/LinuxThreads) version of this package
-- This package contains all the GNULL primitives that interface directly
-- with the underlying OS.
***************
*** 105,111 ****
------------------
Max_Stack_Size : constant := 2000 * 1024;
! -- LinuxThreads does not return an error value when requesting
-- a task stack size which is too large, so we have to check this
-- ourselves.
--- 105,111 ----
------------------
Max_Stack_Size : constant := 2000 * 1024;
! -- GNU/LinuxThreads does not return an error value when requesting
-- a task stack size which is too large, so we have to check this
-- ourselves.
***************
*** 699,705 ****
end if;
end if;
! -- Priorities are in range 1 .. 99 on Linux, so map 0 .. 31 to 1 .. 32
Param.sched_priority := Interfaces.C.int (Prio) + 1;
if Time_Slice_Val > 0 then
--- 699,707 ----
end if;
end if;
! -- Priorities are in range 1 .. 99 on GNU/Linux, so we map
! -- map 0 .. 31 to 1 .. 32
!
Param.sched_priority := Interfaces.C.int (Prio) + 1;
if Time_Slice_Val > 0 then
diff -c -r1.5 -r1.6
*** 5itaspri.ads 2000/07/06 12:12:40 1.5
--- 5itaspri.ads 2001/10/04 02:13:21 1.6
***************
*** 8,14 ****
-- --
-- $Revision$
-- --
! -- Copyright (C) 1991-2000 Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
--- 8,14 ----
-- --
-- $Revision$
-- --
! -- Copyright (C) 1991-2001 Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
***************
*** 34,40 ****
-- --
------------------------------------------------------------------------------
! -- This is the Linux (LinuxThreads) version of this package.
-- This package provides low-level support for most tasking features.
--- 34,40 ----
-- --
------------------------------------------------------------------------------
! -- This is the GNU/Linux (GNU/LinuxThreads) version of this package.
-- This package provides low-level support for most tasking features.
diff -c -r1.18 -r1.19
*** 5lintman.adb 2001/07/16 01:26:56 1.18
--- 5lintman.adb 2001/10/04 02:13:58 1.19
***************
*** 34,40 ****
-- --
------------------------------------------------------------------------------
! -- This is the Linux version of this package
-- This file performs the system-dependent translation between machine
-- exceptions and the Ada exceptions, if any, that should be raised when they
--- 34,40 ----
-- --
------------------------------------------------------------------------------
! -- This is the GNU/Linux version of this package
-- This file performs the system-dependent translation between machine
-- exceptions and the Ada exceptions, if any, that should be raised when they
diff -c -r1.2 -r1.3
*** 5lml-tgt.adb 2001/09/09 00:48:20 1.2
--- 5lml-tgt.adb 2001/10/04 02:15:47 1.3
***************
*** 3,9 ****
-- GNAT COMPILER COMPONENTS --
-- --
-- M L I B . T G T --
! -- (Linux Version) --
-- --
-- B o d y --
-- --
--- 3,9 ----
-- GNAT COMPILER COMPONENTS --
-- --
-- M L I B . T G T --
! -- (GNU/Linux Version) --
-- --
-- B o d y --
-- --
***************
*** 30,36 ****
-- This package provides a set of target dependent routines to build
-- static, dynamic and shared libraries.
! -- This is the Linux version of the body.
with Ada.Characters.Handling; use Ada.Characters.Handling;
with GNAT.Directory_Operations; use GNAT.Directory_Operations;
--- 30,36 ----
-- This package provides a set of target dependent routines to build
-- static, dynamic and shared libraries.
! -- This is the GNU/Linux version of the body.
with Ada.Characters.Handling; use Ada.Characters.Handling;
with GNAT.Directory_Operations; use GNAT.Directory_Operations;
diff -c -r1.27 -r1.28
*** 5losinte.ads 2001/06/26 22:49:19 1.27
--- 5losinte.ads 2001/10/04 02:16:50 1.28
***************
*** 34,40 ****
-- --
------------------------------------------------------------------------------
! -- This is a Linux (FSU THREADS) version of this package.
-- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System.
--- 34,40 ----
-- --
------------------------------------------------------------------------------
! -- This is a GNU/Linux (FSU THREADS) version of this package.
-- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System.
***************
*** 114,121 ****
SIGPROF : constant := 27; -- profiling timer expired
SIGXCPU : constant := 24; -- CPU time limit exceeded
SIGXFSZ : constant := 25; -- filesize limit exceeded
! SIGUNUSED : constant := 31; -- unused signal (Linux)
! SIGSTKFLT : constant := 16; -- coprocessor stack fault (Linux)
SIGADAABORT : constant := SIGABRT;
-- Change this if you want to use another signal for task abort.
--- 114,121 ----
SIGPROF : constant := 27; -- profiling timer expired
SIGXCPU : constant := 24; -- CPU time limit exceeded
SIGXFSZ : constant := 25; -- filesize limit exceeded
! SIGUNUSED : constant := 31; -- unused signal (GNU/Linux)
! SIGSTKFLT : constant := 16; -- coprocessor stack fault (GNU/Linux)
SIGADAABORT : constant := SIGABRT;
-- Change this if you want to use another signal for task abort.
diff -c -r1.4 -r1.5
*** 5lsystem.ads 2001/08/16 15:49:24 1.4
--- 5lsystem.ads 2001/10/04 02:17:59 1.5
***************
*** 5,11 ****
-- S Y S T E M --
-- --
-- S p e c --
! -- (Linux/x86 Version)
-- --
-- $Revision$
-- --
--- 5,11 ----
-- S Y S T E M --
-- --
-- S p e c --
! -- (GNU/Linux/x86 Version) --
-- --
-- $Revision$
-- --
diff -c -r1.4 -r1.5
*** 5qosinte.adb 2000/04/13 20:51:27 1.4
--- 5qosinte.adb 2001/10/04 02:19:31 1.5
***************
*** 8,14 ****
-- --
-- $Revision$
-- --
! -- Copyright (C) 1991-2000 Florida State University --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
--- 8,14 ----
-- --
-- $Revision$
-- --
! -- Copyright (C) 1991-2001 Florida State University --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
***************
*** 34,40 ****
-- --
------------------------------------------------------------------------------
! -- RT Linux version.
-- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System.
--- 34,40 ----
-- --
------------------------------------------------------------------------------
! -- RT GNU/Linux version.
-- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System.
diff -c -r1.8 -r1.9
*** 5qosinte.ads 2001/06/26 22:49:25 1.8
--- 5qosinte.ads 2001/10/04 02:23:20 1.9
***************
*** 34,40 ****
-- --
------------------------------------------------------------------------------
! -- RT Linux version.
-- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System.
--- 34,40 ----
-- --
------------------------------------------------------------------------------
! -- RT GNU/Linux version.
-- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System.
***************
*** 52,58 ****
subtype int is Interfaces.C.int;
subtype unsigned_long is Interfaces.C.unsigned_long;
! -- RT Linux kernel threads should not use the
-- OS signal interfaces.
Max_Interrupt : constant := 2;
--- 52,58 ----
subtype int is Interfaces.C.int;
subtype unsigned_long is Interfaces.C.unsigned_long;
! -- RT GNU/Linux kernel threads should not use the
-- OS signal interfaces.
Max_Interrupt : constant := 2;
***************
*** 69,76 ****
RT_TIME_END : constant := 16#7fffFfffFfffFfff#;
type RTIME is range -2 ** 63 .. 2 ** 63 - 1;
! -- the introduction of type RTIME is due to the fact that RT-Linux
! -- uses this type to represent time. In RT-Linux, it's a long long
-- integer that takes 64 bits for storage
-------------------------
--- 69,76 ----
RT_TIME_END : constant := 16#7fffFfffFfffFfff#;
type RTIME is range -2 ** 63 .. 2 ** 63 - 1;
! -- the introduction of type RTIME is due to the fact that RT-GNU/Linux
! -- uses this type to represent time. In RT-GNU/Linux, it's a long long
-- integer that takes 64 bits for storage
-------------------------
***************
*** 79,86 ****
RT_LOWEST_PRIORITY : constant System.Any_Priority :=
System.Any_Priority'First;
! -- for the lowest priority task in RT_Linux. By the design, this task
! -- is the regular linux kernel.
RT_TASK_MAGIC : constant := 16#754d2774#;
-- a special constant used as a label for a task that has been created
--- 79,86 ----
RT_LOWEST_PRIORITY : constant System.Any_Priority :=
System.Any_Priority'First;
! -- for the lowest priority task in RT-GNU/Linux. By the design, this
! -- task is the regular GNU/Linux kernel.
RT_TASK_MAGIC : constant := 16#754d2774#;
-- a special constant used as a label for a task that has been created
***************
*** 91,98 ****
SFIF : Integer;
pragma Import (C, SFIF, "SFIF");
! -- Interrupt emulation flag used by RT-Linux. If it's 0, the regular
! -- Linux kernel is preempted. Otherwise, the regular Linux kernel is
-- running
GFP_ATOMIC : constant := 16#1#;
--- 91,98 ----
SFIF : Integer;
pragma Import (C, SFIF, "SFIF");
! -- Interrupt emulation flag used by RT-GNU/Linux. If it's 0, the regular
! -- GNU/Linux kernel is preempted. Otherwise, the regular Linux kernel is
-- running
GFP_ATOMIC : constant := 16#1#;
***************
*** 112,118 ****
function (arg : System.Address) return System.Address;
-- ??? need to define a type for references to (IDs of)
! -- RT Linux lock objects, and implement the lock objects.
subtype Thread_Id is System.Address;
--- 112,118 ----
function (arg : System.Address) return System.Address;
-- ??? need to define a type for references to (IDs of)
! -- RT GNU/Linux lock objects, and implement the lock objects.
subtype Thread_Id is System.Address;
***************
*** 120,128 ****
-- Useful imported functions --
-------------------------------
! ---------------------------------
! -- functions from linux kernel --
! ---------------------------------
function Kmalloc (size : Integer; Priority : Integer) return System.Address;
pragma Import (C, Kmalloc, "kmalloc");
--- 120,128 ----
-- Useful imported functions --
-------------------------------
! -------------------------------------
! -- Functions from GNU/Linux kernel --
! -------------------------------------
function Kmalloc (size : Integer; Priority : Integer) return System.Address;
pragma Import (C, Kmalloc, "kmalloc");
diff -c -r1.3 -r1.4
*** 5qparame.ads 2000/07/30 23:04:59 1.3
--- 5qparame.ads 2001/10/04 02:24:55 1.4
***************
*** 8,14 ****
-- --
-- $Revision$
-- --
! -- Copyright (C) 1992-2000 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
--- 8,14 ----
-- --
-- $Revision$
-- --
! -- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
***************
*** 33,39 ****
-- --
------------------------------------------------------------------------------
! -- This is the RT-Linux version.
-- Blank line intentional so that it lines up exactly with default.
-- This package defines some system dependent parameters for GNAT. These
--- 33,39 ----
-- --
------------------------------------------------------------------------------
! -- This is the RT-GNU/Linux version.
-- Blank line intentional so that it lines up exactly with default.
-- This package defines some system dependent parameters for GNAT. These
diff -c -r1.10 -r1.11
*** 5qtaprop.adb 2001/03/30 19:08:00 1.10
--- 5qtaprop.adb 2001/10/04 02:28:24 1.11
***************
*** 34,40 ****
-- --
------------------------------------------------------------------------------
! -- RT Linux version
-- ???? Later, look at what we might want to provide for interrupt
-- management.
--- 34,40 ----
-- --
------------------------------------------------------------------------------
! -- RT GNU/Linux version
-- ???? Later, look at what we might want to provide for interrupt
-- management.
***************
*** 74,84 ****
System.Tasking,
System.Storage_Elements;
! ----------------------------
! -- RT Linux specific Data --
! ----------------------------
! -- Define two important parameters necessary for a Linux kernel module.
-- Any module that is going to be loaded into the kernel space needs these
-- parameters.
--- 74,84 ----
System.Tasking,
System.Storage_Elements;
! --------------------------------
! -- RT GNU/Linux specific Data --
! --------------------------------
! -- Define two important parameters necessary for a GNU/Linux kernel module.
-- Any module that is going to be loaded into the kernel space needs these
-- parameters.
***************
*** 93,100 ****
pragma Export (C, Kernel_Version, "kernel_version");
-- So that insmod can find the version number.
! -- The following procedures have their name specified by the linux module
! -- loader. Note that they simply correspond to adainit/adafinal.
function Init_Module return Integer;
pragma Export (C, Init_Module, "init_module");
--- 93,100 ----
pragma Export (C, Kernel_Version, "kernel_version");
-- So that insmod can find the version number.
! -- The following procedures have their name specified by the GNU/Linux
! -- module loader. Note that they simply correspond to adainit/adafinal.
function Init_Module return Integer;
pragma Export (C, Init_Module, "init_module");
***************
*** 183,189 ****
-- A variable to hold Task_ID for the environment task.
-- Once initialized, this behaves as a constant.
-- In the current implementation, this is the task assigned permanently
! -- as the regular Linux kernel.
All_Tasks_L : aliased RTS_Lock;
-- See comments on locking rules in System.Tasking (spec).
--- 183,189 ----
-- A variable to hold Task_ID for the environment task.
-- Once initialized, this behaves as a constant.
-- In the current implementation, this is the task assigned permanently
! -- as the regular GNU/Linux kernel.
All_Tasks_L : aliased RTS_Lock;
-- See comments on locking rules in System.Tasking (spec).
***************
*** 194,200 ****
-- We start at 100, to reserve some special values for
-- using in error checking.
! Linux_Irq_State : Integer := 0;
type Duration_As_Integer is delta 1.0
range -2.0**(Duration'Size - 1) .. 2.0**(Duration'Size - 1) - 1.0;
--- 194,201 ----
-- We start at 100, to reserve some special values for
-- using in error checking.
! GNU_Linux_Irq_State : Integer := 0;
! -- This needs comments ???
type Duration_As_Integer is delta 1.0
range -2.0**(Duration'Size - 1) .. 2.0**(Duration'Size - 1) - 1.0;
***************
*** 517,537 ****
pragma Debug (Printk
("Rt_Schedule: Top_Task = Environment_Task" & LF));
-- If there are no RT tasks ready, we execute the regular
! -- Linux kernel, and allow the regular Linux interrupt
-- handlers to preempt the current task again.
if not In_Elab_Code then
! SFIF := Linux_Irq_State;
end if;
elsif Current_Task = Environment_Task_ID then
pragma Debug (Printk
("Rt_Schedule: Current_Task = Environment_Task" & LF));
! -- We are going to preempt the regular Linux kernel to
! -- execute an RT task, so don't allow the regular Linux
-- interrupt handlers to preempt the current task any more.
! Linux_Irq_State := SFIF;
SFIF := 0;
end if;
--- 518,538 ----
pragma Debug (Printk
("Rt_Schedule: Top_Task = Environment_Task" & LF));
-- If there are no RT tasks ready, we execute the regular
! -- GNU/Linux kernel, and allow the regular GNU/Linux interrupt
-- handlers to preempt the current task again.
if not In_Elab_Code then
! SFIF := GNU_Linux_Irq_State;
end if;
elsif Current_Task = Environment_Task_ID then
pragma Debug (Printk
("Rt_Schedule: Current_Task = Environment_Task" & LF));
! -- We are going to preempt the regular GNU/Linux kernel to
! -- execute an RT task, so don't allow the regular GNU/Linux
-- interrupt handlers to preempt the current task any more.
! GNU_Linux_Irq_State := SFIF;
SFIF := 0;
end if;
***************
*** 1713,1719 ****
-- initialize the target-dependent data. We do that in this procedure.
-- In the present implementation, Environment_Task is set to be the
! -- regular Linux kernel task.
procedure Initialize (Environment_Task : Task_ID) is
begin
--- 1714,1720 ----
-- initialize the target-dependent data. We do that in this procedure.
-- In the present implementation, Environment_Task is set to be the
! -- regular GNU/Linux kernel task.
procedure Initialize (Environment_Task : Task_ID) is
begin
***************
*** 1743,1749 ****
Idle_Task.Common.LL.Succ := Idle_Task'Address;
Idle_Task.Common.LL.Pred := Idle_Task'Address;
! -- Initialize the regular Linux kernel task.
Environment_Task.Common.LL.Magic := RT_TASK_MAGIC;
Environment_Task.Common.LL.State := RT_TASK_READY;
--- 1744,1750 ----
Idle_Task.Common.LL.Succ := Idle_Task'Address;
Idle_Task.Common.LL.Pred := Idle_Task'Address;
! -- Initialize the regular GNU/Linux kernel task.
Environment_Task.Common.LL.Magic := RT_TASK_MAGIC;
Environment_Task.Common.LL.State := RT_TASK_READY;
***************
*** 1758,1764 ****
Timer_Queue.Common.LL.Pred := Timer_Queue'Address;
Timer_Queue.Common.LL.Resume_Time := Max_Sensible_Delay;
! -- Set the current task to regular Linux kernel task
Current_Task := Environment_Task;
--- 1759,1765 ----
Timer_Queue.Common.LL.Pred := Timer_Queue'Address;
Timer_Queue.Common.LL.Resume_Time := Max_Sensible_Delay;
! -- Set the current task to regular GNU/Linux kernel task
Current_Task := Environment_Task;
diff -c -r1.3 -r1.4
*** 5qtaspri.ads 2000/07/06 12:12:48 1.3
--- 5qtaspri.ads 2001/10/04 02:30:39 1.4
***************
*** 8,14 ****
-- --
-- $Revision$
-- --
! -- Copyright (C) 1991-2000, Florida State University --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
--- 8,14 ----
-- --
-- $Revision$
-- --
! -- Copyright (C) 1991-2001, Florida State University --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
***************
*** 33,40 ****
-- State University (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
- -- RT_Linux version.
pragma Polling (Off);
-- Turn off polling, we do not want ATC polling to take place during
-- tasking operations. It causes infinite loops and other problems.
--- 33,41 ----
-- State University (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
+ -- RT_GNU/Linux version
+
pragma Polling (Off);
-- Turn off polling, we do not want ATC polling to take place during
-- tasking operations. It causes infinite loops and other problems.
***************
*** 65,71 ****
private
! type RT_Linux_Lock is record
Ceiling_Priority : System.Any_Priority;
Pre_Locking_Priority : System.Any_Priority;
-- Used to store the task's active priority before it
--- 66,72 ----
private
! type RT_GNU_Linux_Lock is record
Ceiling_Priority : System.Any_Priority;
Pre_Locking_Priority : System.Any_Priority;
-- Used to store the task's active priority before it
***************
*** 77,84 ****
-- the current package -- a circularity.
end record;
! type Lock is new RT_Linux_Lock;
! type RTS_Lock is new RT_Linux_Lock;
type RTS_Lock_Ptr is access all RTS_Lock;
type Lock_Ptr is access all Lock;
--- 78,85 ----
-- the current package -- a circularity.
end record;
! type Lock is new RT_GNU_Linux_Lock;
! type RTS_Lock is new RT_GNU_Linux_Lock;
type RTS_Lock_Ptr is access all RTS_Lock;
type Lock_Ptr is access all Lock;
diff -c -r1.1 -r1.2
*** 5vintman.ads 2000/07/07 00:03:18 1.1
--- 5vintman.ads 2001/10/04 02:32:03 1.2
***************
*** 6,14 ****
-- --
-- S p e c --
-- --
! -- $Revision$ --
-- --
! -- Copyright (C) 1991-2000 Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
--- 6,14 ----
-- --
-- S p e c --
-- --
! -- $Revision$
-- --
! -- Copyright (C) 1991-2001 Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
***************
*** 119,127 ****
procedure Initialize_Interrupts;
-- On systems where there is no signal inheritance between tasks (e.g
! -- VxWorks, LinuxThreads), this procedure is used to initialize interrupts
! -- handling in each task. Otherwise this function should only be called by
! -- initialize in this package body.
private
--- 119,127 ----
procedure Initialize_Interrupts;
-- On systems where there is no signal inheritance between tasks (e.g
! -- VxWorks, GNU/LinuxThreads), this procedure is used to initialize
! -- interrupts handling in each task. Otherwise this function should
! -- only be called by initialize in this package body.
private
diff -c -r1.7 -r1.8
*** g-soccon.ads 2001/02/16 15:02:31 1.7
--- g-soccon.ads 2001/10/04 02:35:48 1.8
***************
*** 32,38 ****
-- --
------------------------------------------------------------------------------
! -- This is the version for Linux
package GNAT.Sockets.Constants is
--- 32,38 ----
-- --
------------------------------------------------------------------------------
! -- This is the version for GNU/Linux
package GNAT.Sockets.Constants is
diff -c -r1.12 -r1.13
*** g-trasym.ads 2000/11/27 14:56:52 1.12
--- g-trasym.ads 2001/10/04 02:36:53 1.13
***************
*** 8,14 ****
-- --
-- $Revision$
-- --
! -- Copyright (C) 1999-2000 Ada Core Technologies, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
--- 8,14 ----
-- --
-- $Revision$
-- --
! -- Copyright (C) 1999-2001 Ada Core Technologies, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
***************
*** 35,41 ****
-- Run-time symbolic traceback support
-- Note: this is only available on selected targets. Currently it is
! -- supported on Sparc/Solaris, Linux, Windows NT, HP-UX, IRIX and Tru64.
-- The routines provided in this package assume that your application has
-- been compiled with debugging information turned on, since this information
--- 35,41 ----
-- Run-time symbolic traceback support
-- Note: this is only available on selected targets. Currently it is
! -- supported on Sparc/Solaris, GNU/Linux, Windows NT, HP-UX, IRIX and Tru64.
-- The routines provided in this package assume that your application has
-- been compiled with debugging information turned on, since this information
diff -c -r1.1 -r1.2
*** memtrack.adb 2001/09/03 15:24:39 1.1
--- memtrack.adb 2001/10/04 02:37:31 1.2
***************
*** 62,68 ****
-- NOTE: This capability is currently supported on the following targets:
--
-- Windows
! -- Linux
-- HP-UX
-- Irix
-- Solaris
--- 62,68 ----
-- NOTE: This capability is currently supported on the following targets:
--
-- Windows
! -- GNU/Linux
-- HP-UX
-- Irix
-- Solaris
diff -c -r1.4 -r1.5
*** s-intman.ads 1998/09/14 13:03:37 1.4
--- s-intman.ads 2001/10/04 02:38:57 1.5
***************
*** 6,14 ****
-- --
-- S p e c --
-- --
! -- $Revision$ --
-- --
! -- Copyright (C) 1991-1998 Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
--- 6,14 ----
-- --
-- S p e c --
-- --
! -- $Revision$
-- --
! -- Copyright (C) 1991-2001 Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
***************
*** 117,125 ****
procedure Initialize_Interrupts;
-- On systems where there is no signal inheritance between tasks (e.g
! -- VxWorks, LinuxThreads), this procedure is used to initialize interrupts
! -- handling in each task. Otherwise this function should only be called by
! -- initialize in this package body.
private
type Interrupt_Mask is new System.OS_Interface.sigset_t;
--- 117,125 ----
procedure Initialize_Interrupts;
-- On systems where there is no signal inheritance between tasks (e.g
! -- VxWorks, GNU/LinuxThreads), this procedure is used to initialize
! -- interrupts handling in each task. Otherwise this function should
! -- only be called by initialize in this package body.
private
type Interrupt_Mask is new System.OS_Interface.sigset_t;
diff -c -r1.10 -r1.11
*** s-stache.adb 2001/04/03 20:57:21 1.10
--- s-stache.adb 2001/10/04 02:40:08 1.11
***************
*** 47,53 ****
-- This size is assumed for the environment stack when no size has been
-- set by the runtime, and no GNAT_STACK_LIMIT environment variable was
-- present. The value is chosen to be just under 8 MB whic is the actual
! -- default size on some systems including LinuxThreads, so we will get
-- correct storage errors on those systems without setting environment
-- variables.
--- 47,53 ----
-- This size is assumed for the environment stack when no size has been
-- set by the runtime, and no GNAT_STACK_LIMIT environment variable was
-- present. The value is chosen to be just under 8 MB whic is the actual
! -- default size on some systems including GNU/LinuxThreads, so we will get
-- correct storage errors on those systems without setting environment
-- variables.
diff -c -r1.4 -r1.5
*** adaint.c 2001/09/28 13:24:20 1.4
--- adaint.c 2001/10/04 13:03:59 1.5
***************
*** 2225,2231 ****
&& ! (defined (__alpha__) && defined (__osf__)) \
&& ! defined (__MINGW32__))
/* Dummy function to satisfy g-trasym.o.
! Currently Solaris sparc, HP/UX, IRIX, Linux, Tru64 & Windows provide a
non-dummy version of this procedure in libaddr2line.a */
void
--- 2225,2231 ----
&& ! (defined (__alpha__) && defined (__osf__)) \
&& ! defined (__MINGW32__))
/* Dummy function to satisfy g-trasym.o.
! Currently Solaris sparc, HP/UX, IRIX, GNU/Linux, Tru64 & Windows provide a
non-dummy version of this procedure in libaddr2line.a */
void
diff -c -r1.2 -r1.3
*** cio.c 2001/09/20 12:38:19 1.2
--- cio.c 2001/10/04 13:04:00 1.3
***************
*** 77,83 ****
#else
! /* Don't use macros on linux since they cause incompatible changes between
glibc 2.0 and 2.1 */
#ifdef linux
#undef putchar
--- 77,83 ----
#else
! /* Don't use macros on GNU/Linux since they cause incompatible changes between
glibc 2.0 and 2.1 */
#ifdef linux
#undef putchar
diff -c -r1.1 -r1.2
*** cstreams.c 2001/09/08 13:44:33 1.1
--- cstreams.c 2001/10/04 13:04:00 1.2
***************
*** 63,69 ****
#ifdef linux
! /* Don't use macros on linux since they cause incompatible changes between
glibc 2.0 and 2.1 */
#ifdef stderr
--- 63,69 ----
#ifdef linux
! /* Don't use macros on GNU/Linux since they cause incompatible changes between
glibc 2.0 and 2.1 */
#ifdef stderr
***************
*** 199,205 ****
#elif defined (sgi)
/* Use realpath function which resolves links and references to .. and ..
! on those Unix systems that support it. Note that linux provides it but
cannot handle more than 5 symbolic links in a full name, so we use the
getcwd approach instead. */
realpath (nam, buffer);
--- 199,205 ----
#elif defined (sgi)
/* Use realpath function which resolves links and references to .. and ..
! on those Unix systems that support it. Note that GNU/Linux provides it but
cannot handle more than 5 symbolic links in a full name, so we use the
getcwd approach instead. */
realpath (nam, buffer);
diff -c -r1.2 -r1.3
*** init.c 2001/10/02 11:03:00 1.2
--- init.c 2001/10/04 13:04:00 1.3
***************
*** 525,531 ****
/*************************************/
! /* __gnat_initialize (Linux version) */
/*************************************/
#elif defined (linux) && defined (i386) && !defined (__RT__)
--- 525,531 ----
/*************************************/
! /* __gnat_initialize (GNU/Linux version) */
/*************************************/
#elif defined (linux) && defined (i386) && !defined (__RT__)
***************
*** 533,539 ****
#include <signal.h>
#include <asm/sigcontext.h>
! /* Linux with GNU libc does not define NULL in included header files */
#if !defined (NULL)
#define NULL ((void *) 0)
--- 533,540 ----
#include <signal.h>
#include <asm/sigcontext.h>
! /* GNU/Linux, which uses glibc, does not define NULL in included
! header files */
#if !defined (NULL)
#define NULL ((void *) 0)
***************
*** 561,570 ****
struct sigcontext *info
= (struct sigcontext *) (((char *) &sig) + sizeof (int));
! /* Linux does not document how to get the machine state in a signal handler,
! but in fact the necessary data is in a sigcontext_struct value that is
! on the stack immediately above the signal number parameter, and the
! above messing accesses this value on the stack. */
struct Machine_State *mstate;
--- 562,572 ----
struct sigcontext *info
= (struct sigcontext *) (((char *) &sig) + sizeof (int));
!
! /* The Linux kernel does not document how to get the machine state in a
! signal handler, but in fact the necessary data is in a sigcontext_struct
! value that is on the stack immediately above the signal number
! parameter, and the above messing accesses this value on the stack. */
struct Machine_State *mstate;
diff -c -r1.1 -r1.2
*** gmem.c 2001/09/08 13:44:35 1.1
--- gmem.c 2001/10/04 13:04:00 1.2
***************
*** 43,49 ****
DEC Unix
SGI Irix
! Linux x86
Solaris (sparc and x86) (*)
Windows 98/95/NT (x86)
--- 43,49 ----
DEC Unix
SGI Irix
! GNU/Linux x86
Solaris (sparc and x86) (*)
Windows 98/95/NT (x86)
diff -c -r1.1 -r1.2
*** tracebak.c 2001/09/08 13:44:38 1.1
--- tracebak.c 2001/10/04 13:04:00 1.2
***************
*** 39,45 ****
PowerPC/AiX
PowerPC/VxWorks
Sparc/Solaris
! i386/Linux
i386/Solaris
i386/NT
i386/OS2
--- 39,45 ----
PowerPC/AiX
PowerPC/VxWorks
Sparc/Solaris
! i386/GNU/Linux
i386/Solaris
i386/NT
i386/OS2