Mercurial > hg > CbC > CbC_gcc
comparison gcc/ada/libgnarl/g-thread.adb @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
4 -- -- | 4 -- -- |
5 -- G N A T . T H R E A D S -- | 5 -- G N A T . T H R E A D S -- |
6 -- -- | 6 -- -- |
7 -- B o d y -- | 7 -- B o d y -- |
8 -- -- | 8 -- -- |
9 -- Copyright (C) 1998-2017, AdaCore -- | 9 -- Copyright (C) 1998-2018, AdaCore -- |
10 -- -- | 10 -- -- |
11 -- GNAT is free software; you can redistribute it and/or modify it under -- | 11 -- GNAT is free software; you can redistribute it and/or modify it under -- |
12 -- terms of the GNU General Public License as published by the Free Soft- -- | 12 -- terms of the GNU General Public License as published by the Free Soft- -- |
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- | 13 -- ware Foundation; either version 3, or (at your option) any later ver- -- |
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- | 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
31 | 31 |
32 with Ada.Task_Identification; use Ada.Task_Identification; | 32 with Ada.Task_Identification; use Ada.Task_Identification; |
33 with System.Task_Primitives.Operations; | 33 with System.Task_Primitives.Operations; |
34 with System.Tasking; | 34 with System.Tasking; |
35 with System.Tasking.Stages; use System.Tasking.Stages; | 35 with System.Tasking.Stages; use System.Tasking.Stages; |
36 with System.Tasking.Utilities; | |
36 with System.OS_Interface; use System.OS_Interface; | 37 with System.OS_Interface; use System.OS_Interface; |
37 with System.Soft_Links; use System.Soft_Links; | 38 with System.Soft_Links; use System.Soft_Links; |
38 with Ada.Unchecked_Conversion; | 39 with Ada.Unchecked_Conversion; |
39 | 40 |
40 package body GNAT.Threads is | 41 package body GNAT.Threads is |
170 Thr : constant Thread_Id_Ptr := To_Thread (Thread); | 171 Thr : constant Thread_Id_Ptr := To_Thread (Thread); |
171 begin | 172 begin |
172 Thr.all := Task_Primitives.Operations.Get_Thread_Id (To_Id (Id)); | 173 Thr.all := Task_Primitives.Operations.Get_Thread_Id (To_Id (Id)); |
173 end Get_Thread; | 174 end Get_Thread; |
174 | 175 |
176 ---------------------- | |
177 -- Make_Independent -- | |
178 ---------------------- | |
179 | |
180 function Make_Independent return Boolean is | |
181 begin | |
182 return System.Tasking.Utilities.Make_Independent; | |
183 end Make_Independent; | |
184 | |
175 ---------------- | 185 ---------------- |
176 -- To_Task_Id -- | 186 -- To_Task_Id -- |
177 ---------------- | 187 ---------------- |
178 | 188 |
179 function To_Task_Id | 189 function To_Task_Id |