Commit b3520ca0 by Arnaud Charlet

[multiple changes]

2009-04-24  Tristan Gingold  <gingold@adacore.com>

	* s-osinte-darwin.adb, s-osinte-darwin.ads: lwp_self now returns the
	mach thread id.

2009-04-24  Emmanuel Briot  <briot@adacore.com>

	* prj-env.adb, prj-env.ads (Body_Path_Name_Of, Spec_Path_Name_Of,
	Path_Name_Of_Library_Unit_Body): rEmove unused subprograms.
	(For_All_Imported_Projects): new procedure
	(For_All_Source_Dirs, For_All_Object_Dirs): Rewritten based on the
	above rather than duplicating code.

From-SVN: r146692
parent 5d07d0cf
2009-04-24 Tristan Gingold <gingold@adacore.com>
* s-osinte-darwin.adb, s-osinte-darwin.ads: lwp_self now returns the
mach thread id.
2009-04-24 Emmanuel Briot <briot@adacore.com>
* prj-env.adb, prj-env.ads (Body_Path_Name_Of, Spec_Path_Name_Of,
Path_Name_Of_Library_Unit_Body): rEmove unused subprograms.
(For_All_Imported_Projects): new procedure
(For_All_Source_Dirs, For_All_Object_Dirs): Rewritten based on the
above rather than duplicating code.
2009-04-24 Emmanuel Briot <briot@adacore.com> 2009-04-24 Emmanuel Briot <briot@adacore.com>
* prj-proc.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb * prj-proc.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb
......
...@@ -118,12 +118,6 @@ package Prj.Env is ...@@ -118,12 +118,6 @@ package Prj.Env is
procedure Delete_All_Path_Files (In_Tree : Project_Tree_Ref); procedure Delete_All_Path_Files (In_Tree : Project_Tree_Ref);
-- Delete all temporary path files that have been created by Set_Ada_Paths -- Delete all temporary path files that have been created by Set_Ada_Paths
function Path_Name_Of_Library_Unit_Body
(Name : String;
Project : Project_Id;
In_Tree : Project_Tree_Ref) return String;
-- Returns the path of a library unit
function File_Name_Of_Library_Unit_Body function File_Name_Of_Library_Unit_Body
(Name : String; (Name : String;
Project : Project_Id; Project : Project_Id;
...@@ -167,6 +161,8 @@ package Prj.Env is ...@@ -167,6 +161,8 @@ package Prj.Env is
In_Tree : Project_Tree_Ref); In_Tree : Project_Tree_Ref);
-- Iterate through all the source directories of a project, including those -- Iterate through all the source directories of a project, including those
-- of imported or modified projects. -- of imported or modified projects.
-- Only returns those directories that potentially contain Ada sources (ie
-- ignore projects that have no Ada sources
generic generic
with procedure Action (Path : String); with procedure Action (Path : String);
...@@ -176,4 +172,11 @@ package Prj.Env is ...@@ -176,4 +172,11 @@ package Prj.Env is
-- Iterate through all the object directories of a project, including -- Iterate through all the object directories of a project, including
-- those of imported or modified projects. -- those of imported or modified projects.
generic
with procedure Action (Project : Project_Id);
procedure For_All_Imported_Projects
(Project : Project_Id;
In_Tree : Project_Tree_Ref);
-- Execute Action for Project and all imported or extended projects
end Prj.Env; end Prj.Env;
...@@ -149,6 +149,18 @@ package body System.OS_Interface is ...@@ -149,6 +149,18 @@ package body System.OS_Interface is
return 0; return 0;
end sched_yield; end sched_yield;
--------------
-- lwp_self --
--------------
function lwp_self return Address is
function pthread_mach_thread_np (thread : pthread_t) return Address;
pragma Import (C, pthread_mach_thread_np, "pthread_mach_thread_np");
begin
return pthread_mach_thread_np (pthread_self);
end lwp_self;
------------------ ------------------
-- pthread_init -- -- pthread_init --
------------------ ------------------
......
...@@ -236,10 +236,8 @@ package System.OS_Interface is ...@@ -236,10 +236,8 @@ package System.OS_Interface is
--------- ---------
function lwp_self return System.Address; function lwp_self return System.Address;
pragma Import (C, lwp_self, "pthread_self"); -- Return the mach thread bound to the current thread. The value is not
-- lwp_self does not exist on this thread library, revert to pthread_self -- used by the run-time library but made available to debuggers.
-- which is the closest approximation (with getpid). This function is
-- needed to share 7staprop.adb across POSIX-like targets.
------------- -------------
-- Threads -- -- Threads --
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment