File : s-taspri-raven-vxworks.ads
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
4 -- --
5 -- S Y S T E M . T A S K _ P R I M I T I V E S --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 2001-2014, Free Software Foundation, Inc. --
10 -- --
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- --
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- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- --
19 -- --
20 -- --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNARL was developed by the GNARL team at Florida State University. --
28 -- Extensive contributions were provided by Ada Core Technologies, Inc. --
29 -- --
30 ------------------------------------------------------------------------------
31
32 -- This is the Ravenscar VxWorks version of this package
33
34 with System.OS_Interface;
35
36 package System.Task_Primitives is
37 pragma Preelaborate;
38
39 type Task_Body_Access is access procedure;
40 -- Pointer to the task body's entry point (or possibly a wrapper
41 -- declared local to the GNARL).
42
43 type Private_Data is limited private;
44 -- Any information that the GNULLI needs maintained on a per-task
45 -- basis. A component of this type is guaranteed to be included
46 -- in the Ada_Task_Control_Block.
47
48 subtype Task_Address is System.Address;
49 -- Type used for task addresses
50
51 private
52
53 type Private_Data is limited record
54 Thread : aliased System.OS_Interface.t_id := 0;
55 pragma Atomic (Thread);
56 -- Thread field may be updated by two different threads of control.
57 -- (See, Enter_Task and Create_Task in s-taprop.adb).
58 -- They put the same value (thr_self value). We do not want to
59 -- use lock on those operations and the only thing we have to
60 -- make sure is that they are updated in atomic fashion.
61
62 CV : aliased System.OS_Interface.SEM_ID;
63 end record;
64
65 end System.Task_Primitives;