8sa1-gcc/gcc/ada/s-vxwext-kernel.adb
Arnaud Charlet c37cbdc310 [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

100 lines
3.8 KiB
Ada

------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . V X W O R K S . E X T --
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2011, 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- --
-- 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- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- 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/>. --
-- --
------------------------------------------------------------------------------
-- This package provides vxworks specific support functions needed
-- by System.OS_Interface.
-- This is the VxWorks <= 6.5 kernel version of this package
-- Also works for 6.6 uniprocessor
package body System.VxWorks.Ext is
ERROR : constant := -1;
--------------
-- Int_Lock --
--------------
function intLock return int;
pragma Import (C, intLock, "intLock");
function Int_Lock return int renames intLock;
----------------
-- Int_Unlock --
----------------
function intUnlock return int;
pragma Import (C, intUnlock, "intUnlock");
function Int_Unlock return int renames intUnlock;
---------------
-- semDelete --
---------------
function semDelete (Sem : SEM_ID) return int is
function Os_Sem_Delete (Sem : SEM_ID) return int;
pragma Import (C, Os_Sem_Delete, "semDelete");
begin
return Os_Sem_Delete (Sem);
end semDelete;
------------------------
-- taskCpuAffinitySet --
------------------------
function taskCpuAffinitySet (tid : t_id; CPU : int) return int is
pragma Unreferenced (tid, CPU);
begin
return ERROR;
end taskCpuAffinitySet;
-------------------------
-- taskMaskAffinitySet --
-------------------------
function taskMaskAffinitySet (tid : t_id; CPU_Set : unsigned) return int is
pragma Unreferenced (tid, CPU_Set);
begin
return ERROR;
end taskMaskAffinitySet;
--------------
-- taskStop --
--------------
function Task_Stop (tid : t_id) return int is
function taskStop (tid : t_id) return int;
pragma Import (C, taskStop, "taskStop");
begin
return taskStop (tid);
end Task_Stop;
end System.VxWorks.Ext;