2008-04-08 08:43:49 +02:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
-- --
|
|
|
|
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
|
|
|
|
-- --
|
|
|
|
-- S Y S T E M . V X W O R K S . E X T --
|
|
|
|
-- --
|
|
|
|
-- S p e c --
|
|
|
|
-- --
|
2015-01-07 11:01:36 +01:00
|
|
|
-- Copyright (C) 2008-2014, Free Software Foundation, Inc. --
|
2008-04-08 08:43:49 +02:00
|
|
|
-- --
|
2009-04-09 17:00:19 +02:00
|
|
|
-- GNARL is free software; you can redistribute it and/or modify it under --
|
2008-04-08 08:43:49 +02:00
|
|
|
-- terms of the GNU General Public License as published by the Free Soft- --
|
2009-04-09 17:00:19 +02:00
|
|
|
-- ware Foundation; either version 3, or (at your option) any later ver- --
|
|
|
|
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
|
2008-04-08 08:43:49 +02:00
|
|
|
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
|
2009-04-09 17:00:19 +02:00
|
|
|
-- or FITNESS FOR A PARTICULAR PURPOSE. --
|
|
|
|
-- --
|
|
|
|
-- As a special exception under Section 7 of GPL version 3, you are granted --
|
|
|
|
-- additional permissions described in the GCC Runtime Library Exception, --
|
|
|
|
-- version 3.1, as published by the Free Software Foundation. --
|
|
|
|
-- --
|
|
|
|
-- You should have received a copy of the GNU General Public License and --
|
|
|
|
-- a copy of the GCC Runtime Library Exception along with this program; --
|
|
|
|
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
|
|
|
|
-- <http://www.gnu.org/licenses/>. --
|
2008-04-08 08:43:49 +02:00
|
|
|
-- --
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
-- This package provides vxworks specific support functions needed
|
|
|
|
-- by System.OS_Interface.
|
|
|
|
|
2009-11-30 17:21:19 +01:00
|
|
|
-- This is the VxWorks 5 and VxWorks MILS version of this package
|
2008-04-08 08:43:49 +02:00
|
|
|
|
|
|
|
with Interfaces.C;
|
|
|
|
|
|
|
|
package System.VxWorks.Ext is
|
|
|
|
pragma Preelaborate;
|
|
|
|
|
2009-06-20 12:18:00 +02:00
|
|
|
subtype SEM_ID is Long_Integer;
|
2009-06-19 13:06:38 +02:00
|
|
|
-- typedef struct semaphore *SEM_ID;
|
|
|
|
|
[multiple changes]
2010-06-22 Robert Dewar <dewar@adacore.com>
* ali-util.ads: Minor comment update.
* g-socthi-mingw.adb: Minor reformatting.
2010-06-22 Ed Falis <falis@adacore.com>
* s-osinte-vxworks.ads: take sigset_t definition from System.VxWorks.Ext
* s-vxwext.ads, s-vxwext-kernel.ads, s-vxwext-rtp.ads: Define sigset_t
for specific versions of VxWorks.
2010-06-22 Emmanuel Briot <briot@adacore.com>
* gnat_rm.texi, gnat_ugn.texi, projects.texi: Remove all project files
related sections from user's guide and reference manual, since they
have now been merged together into a separate document (projects.texi).
This removes a lot of duplication where attributes where described
in several places.
The grammar for the project files is now in each of the sections
(packages,expressions,...) instead of being duplicates in two other
sections (one in the user's guide that contained the full grammar,
and various sections in the rm that contained extracts of the same
grammar).
Added the full list of all supported attributes, since existing lists
were incomplete
Rename "associative array" into "indexed attribute"
Remove sections that were duplicates ("External References in
Project Files" and "External Values", and "Project Extensions"
for instance). The list of valid packages in project files is now in
a single place.
2010-06-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Add_Internal_Interface_Entities): If
Find_Primitive_Covering_Interface does not find the operation, it may
be because of a name conflict between the inherited operation and a
local non-overloadable name. In that case look for the operation among
the primitive operations of the type. This search must succeed
regardless of visibility.
From-SVN: r161150
2010-06-22 11:02:09 +02:00
|
|
|
type sigset_t is mod 2 ** Interfaces.C.long'Size;
|
|
|
|
|
2008-04-08 08:43:49 +02:00
|
|
|
type t_id is new Long_Integer;
|
[multiple changes]
2010-06-22 Robert Dewar <dewar@adacore.com>
* ali-util.ads: Minor comment update.
* g-socthi-mingw.adb: Minor reformatting.
2010-06-22 Ed Falis <falis@adacore.com>
* s-osinte-vxworks.ads: take sigset_t definition from System.VxWorks.Ext
* s-vxwext.ads, s-vxwext-kernel.ads, s-vxwext-rtp.ads: Define sigset_t
for specific versions of VxWorks.
2010-06-22 Emmanuel Briot <briot@adacore.com>
* gnat_rm.texi, gnat_ugn.texi, projects.texi: Remove all project files
related sections from user's guide and reference manual, since they
have now been merged together into a separate document (projects.texi).
This removes a lot of duplication where attributes where described
in several places.
The grammar for the project files is now in each of the sections
(packages,expressions,...) instead of being duplicates in two other
sections (one in the user's guide that contained the full grammar,
and various sections in the rm that contained extracts of the same
grammar).
Added the full list of all supported attributes, since existing lists
were incomplete
Rename "associative array" into "indexed attribute"
Remove sections that were duplicates ("External References in
Project Files" and "External Values", and "Project Extensions"
for instance). The list of valid packages in project files is now in
a single place.
2010-06-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Add_Internal_Interface_Entities): If
Find_Primitive_Covering_Interface does not find the operation, it may
be because of a name conflict between the inherited operation and a
local non-overloadable name. In that case look for the operation among
the primitive operations of the type. This search must succeed
regardless of visibility.
From-SVN: r161150
2010-06-22 11:02:09 +02:00
|
|
|
|
2008-04-08 08:43:49 +02:00
|
|
|
subtype int is Interfaces.C.int;
|
[multiple changes]
2011-08-30 Jose Ruiz <ruiz@adacore.com>
* s-taskin.ads (Common_ATCB): Add field domain which contains the
dispatching domain to which the task belongs.
* s-taskin.adb (Initialize): Create the default system dispatching
domain and make the environment task part of it.
* s-mudido.ads: Add this new spec for standard Ada 2012 package
Ada.Multiprocessors.Dispatching_Domains.
* s-mudido.adb: Add this new body for targets not supporting
dispatching domains.
* s-mudido-affinity.adb: Add this new body for targets supporting
dispatching domains setting the affinity to a CPU set.
* bindgen.adb (Dispatching_Domain_Used, Check_Dispatching_Domains_Used,
Gen_Adainit): When package System.Multiprocessors.Dispatching_Domains
is used we call the procedure to signal that when we are about to call
the main subprogram no new dispatching domain can be created.
(Check_File_In_Partition): Factor out the common functionality used by
Check_System_Restrictions_Used and Check_Dispatching_Domains_Used.
* s-tassta.adb (Create_Task): Tasks inherit the dispatching domain of
their activators.
* s-taprop.ads (Set_Task_Affinity): Add this new procedure to set task
affinities.
* s-taprop-dummy.adb, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
s-taprop-posix.adb, s-taprop-tru64.adb, s-taprop-vms.adb
(Set_Task_Affinity): Dummy null body for these targets not supporting
task affinities.
s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-solaris.adb,
s-taprop-vxworks.adb (Create_Task, Enter_Task, Initialize): Handle
dispatching domains and set the affinity of the environment task.
(Set_Task_Affinity): Procedure that uses the underlying CPU set
functionality to handle dispatching domains, pragma CPU and Task_Info.
s-winext.ads (SetThreadAffinityMask): Import this function needed to
set CPU masks.
* s-osinte-solaris.ads (psetit_t, pset_create, pset_assign, pset_bind):
Import the functionality to handle CPU set affinities.
* affinity.c: New file.
* s-osinte-vxworks.ads, s-vxwext.ads, s-vxwext-kernel.ads,
s-vxwext-rtp.ads (taskMaskAffinitySet): Add this new spec for setting
affinity masks.
* s-vxwext.adb, s-vxwext-kernel.adb, s-vxwext-rtp.adb
(taskMaskAffinitySet): Body returning an error indicating that task
affinities are not supported.
Makefile.rtl: Indicate that s-mudido is part of libgnarl.
* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for VxWorks SMP,
Solaris, Windows, and {x86,PowerPC, ia64,x86_64} Linux): Use the
s-mudido-affinity.adb body which supports task affinities.
2011-08-30 Thomas quinot <quinot@adacore.com>
* sem_ch13.adb: Minor reformatting.
2011-08-30 Vincent Celier <celier@adacore.com>
* vms_conv.adb (Process_Argument): When the qualifier
/UNCHECKED_SHARED_LIB_IMPORTS is for GNAT COMPILE, do not put the
corresponding switch --unchecked-shared-lib-imports after -cargs, as it
is for gnatmake, not for the compiler.
2011-08-30 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Quantified_Expression): Analyze iterator
specification and condition only in Semantics_Only mode. Otherwise the
analysis is done after expression has been rewritten as loop.
* sem_ch5.adb (Analyze_Iterator_Specification): Always generate a
temporary for the iterator name (the domain of iteration) because it
may need finalization actions and these must be generated outside of
the loop.
* sem_res.adb (Resolve_Quantified_Expression): Resolve only in
Semantic_Only mode.
* exp_ch4.adb (Expand_Quantified_Expression): Analyze and resolve once
rewritten as loop.
* exp_ch5.adb (Expand_Iterator_Loop): Code clean-up, now that the
iterator is always an expression.
2011-08-30 Robert Dewar <dewar@adacore.com>
* par-ch4.adb (P_Unparen_Cond_Case_Quant_Expression): New function
(P_Expression_If_OK): New spec checks parens
(P_Expression_Or_Range_Attribute_If_OK): New spec checks parens
* par.adb (P_Expression_If_OK): New spec checks parens
(P_Expression_Or_Range_Attribute_If_OK): New spec checks parens
From-SVN: r178321
2011-08-30 16:56:45 +02:00
|
|
|
subtype unsigned is Interfaces.C.unsigned;
|
2008-04-08 08:43:49 +02:00
|
|
|
|
2009-04-15 14:43:58 +02:00
|
|
|
type Interrupt_Handler is access procedure (parameter : System.Address);
|
|
|
|
pragma Convention (C, Interrupt_Handler);
|
2008-04-08 08:43:49 +02:00
|
|
|
|
2009-04-15 14:43:58 +02:00
|
|
|
type Interrupt_Vector is new System.Address;
|
2008-04-08 08:43:49 +02:00
|
|
|
|
|
|
|
function Int_Lock return int;
|
|
|
|
pragma Import (C, Int_Lock, "intLock");
|
|
|
|
|
2015-01-07 11:01:36 +01:00
|
|
|
function Int_Unlock (Old : int) return int;
|
2008-04-08 08:43:49 +02:00
|
|
|
pragma Import (C, Int_Unlock, "intUnlock");
|
|
|
|
|
2009-04-15 14:43:58 +02:00
|
|
|
function Interrupt_Connect
|
|
|
|
(Vector : Interrupt_Vector;
|
|
|
|
Handler : Interrupt_Handler;
|
|
|
|
Parameter : System.Address := System.Null_Address) return int;
|
|
|
|
pragma Import (C, Interrupt_Connect, "intConnect");
|
|
|
|
|
2010-10-05 11:37:44 +02:00
|
|
|
function Interrupt_Context return int;
|
|
|
|
pragma Import (C, Interrupt_Context, "intContext");
|
|
|
|
|
2009-04-15 14:43:58 +02:00
|
|
|
function Interrupt_Number_To_Vector
|
|
|
|
(intNum : int) return Interrupt_Vector;
|
|
|
|
pragma Import (C, Interrupt_Number_To_Vector, "__gnat_inum_to_ivec");
|
|
|
|
|
2009-06-19 13:06:38 +02:00
|
|
|
function semDelete (Sem : SEM_ID) return int;
|
|
|
|
pragma Import (C, semDelete, "semDelete");
|
|
|
|
|
2009-04-15 14:43:58 +02:00
|
|
|
function Task_Cont (tid : t_id) return int;
|
|
|
|
pragma Import (C, Task_Cont, "taskResume");
|
|
|
|
|
|
|
|
function Task_Stop (tid : t_id) return int;
|
|
|
|
pragma Import (C, Task_Stop, "taskSuspend");
|
|
|
|
|
2008-04-08 08:43:49 +02:00
|
|
|
function kill (pid : t_id; sig : int) return int;
|
|
|
|
pragma Import (C, kill, "kill");
|
|
|
|
|
|
|
|
function getpid return t_id;
|
|
|
|
pragma Import (C, getpid, "taskIdSelf");
|
|
|
|
|
2009-04-15 14:43:58 +02:00
|
|
|
function Set_Time_Slice (ticks : int) return int;
|
|
|
|
pragma Import (C, Set_Time_Slice, "kernelTimeSlice");
|
|
|
|
|
[multiple changes]
2009-06-24 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Check): A project declared abstract is legal if no
attribute Source_Dirs, Source_Files, Source_List_File or Languages is
declared.
2009-06-24 Robert Dewar <dewar@adacore.com>
* clean.adb, gnatcmd.adb, make.adb, mlib-prj.adb,
prj-env.adb: Minor reformatting
2009-06-24 Ed Falis <falis@adacore.com>
* s-taprop-vxworks.adb, s-osinte-vxworks.ads, s-vxwext.ads,
s-vxwext-kernel.adb, s-vxwext-kernel.ads, s-vxwext-rtp.adb,
s-tasinf-vxworks.ads, gcc-interface/Makefile.in: Add processor affinity
support for VxWorks SMP.
* gcc-interface/Make-lang.in: Update dependencies
From-SVN: r148902
2009-06-24 11:41:39 +02:00
|
|
|
--------------------------------
|
|
|
|
-- Processor Affinity for SMP --
|
|
|
|
--------------------------------
|
|
|
|
|
|
|
|
function taskCpuAffinitySet (tid : t_id; CPU : int) return int;
|
|
|
|
pragma Convention (C, taskCpuAffinitySet);
|
|
|
|
-- For SMP run-times set the CPU affinity.
|
|
|
|
-- For uniprocessor systems return ERROR status.
|
|
|
|
|
[multiple changes]
2011-08-30 Jose Ruiz <ruiz@adacore.com>
* s-taskin.ads (Common_ATCB): Add field domain which contains the
dispatching domain to which the task belongs.
* s-taskin.adb (Initialize): Create the default system dispatching
domain and make the environment task part of it.
* s-mudido.ads: Add this new spec for standard Ada 2012 package
Ada.Multiprocessors.Dispatching_Domains.
* s-mudido.adb: Add this new body for targets not supporting
dispatching domains.
* s-mudido-affinity.adb: Add this new body for targets supporting
dispatching domains setting the affinity to a CPU set.
* bindgen.adb (Dispatching_Domain_Used, Check_Dispatching_Domains_Used,
Gen_Adainit): When package System.Multiprocessors.Dispatching_Domains
is used we call the procedure to signal that when we are about to call
the main subprogram no new dispatching domain can be created.
(Check_File_In_Partition): Factor out the common functionality used by
Check_System_Restrictions_Used and Check_Dispatching_Domains_Used.
* s-tassta.adb (Create_Task): Tasks inherit the dispatching domain of
their activators.
* s-taprop.ads (Set_Task_Affinity): Add this new procedure to set task
affinities.
* s-taprop-dummy.adb, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
s-taprop-posix.adb, s-taprop-tru64.adb, s-taprop-vms.adb
(Set_Task_Affinity): Dummy null body for these targets not supporting
task affinities.
s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-solaris.adb,
s-taprop-vxworks.adb (Create_Task, Enter_Task, Initialize): Handle
dispatching domains and set the affinity of the environment task.
(Set_Task_Affinity): Procedure that uses the underlying CPU set
functionality to handle dispatching domains, pragma CPU and Task_Info.
s-winext.ads (SetThreadAffinityMask): Import this function needed to
set CPU masks.
* s-osinte-solaris.ads (psetit_t, pset_create, pset_assign, pset_bind):
Import the functionality to handle CPU set affinities.
* affinity.c: New file.
* s-osinte-vxworks.ads, s-vxwext.ads, s-vxwext-kernel.ads,
s-vxwext-rtp.ads (taskMaskAffinitySet): Add this new spec for setting
affinity masks.
* s-vxwext.adb, s-vxwext-kernel.adb, s-vxwext-rtp.adb
(taskMaskAffinitySet): Body returning an error indicating that task
affinities are not supported.
Makefile.rtl: Indicate that s-mudido is part of libgnarl.
* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for VxWorks SMP,
Solaris, Windows, and {x86,PowerPC, ia64,x86_64} Linux): Use the
s-mudido-affinity.adb body which supports task affinities.
2011-08-30 Thomas quinot <quinot@adacore.com>
* sem_ch13.adb: Minor reformatting.
2011-08-30 Vincent Celier <celier@adacore.com>
* vms_conv.adb (Process_Argument): When the qualifier
/UNCHECKED_SHARED_LIB_IMPORTS is for GNAT COMPILE, do not put the
corresponding switch --unchecked-shared-lib-imports after -cargs, as it
is for gnatmake, not for the compiler.
2011-08-30 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Quantified_Expression): Analyze iterator
specification and condition only in Semantics_Only mode. Otherwise the
analysis is done after expression has been rewritten as loop.
* sem_ch5.adb (Analyze_Iterator_Specification): Always generate a
temporary for the iterator name (the domain of iteration) because it
may need finalization actions and these must be generated outside of
the loop.
* sem_res.adb (Resolve_Quantified_Expression): Resolve only in
Semantic_Only mode.
* exp_ch4.adb (Expand_Quantified_Expression): Analyze and resolve once
rewritten as loop.
* exp_ch5.adb (Expand_Iterator_Loop): Code clean-up, now that the
iterator is always an expression.
2011-08-30 Robert Dewar <dewar@adacore.com>
* par-ch4.adb (P_Unparen_Cond_Case_Quant_Expression): New function
(P_Expression_If_OK): New spec checks parens
(P_Expression_Or_Range_Attribute_If_OK): New spec checks parens
* par.adb (P_Expression_If_OK): New spec checks parens
(P_Expression_Or_Range_Attribute_If_OK): New spec checks parens
From-SVN: r178321
2011-08-30 16:56:45 +02:00
|
|
|
function taskMaskAffinitySet (tid : t_id; CPU_Set : unsigned) return int;
|
|
|
|
pragma Convention (C, taskMaskAffinitySet);
|
|
|
|
-- For SMP run-times set the CPU mask affinity.
|
|
|
|
-- For uniprocessor systems return ERROR status.
|
|
|
|
|
2008-04-08 08:43:49 +02:00
|
|
|
end System.VxWorks.Ext;
|