File : s-vxwext-cert.adb
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
4 -- --
5 -- S Y S T E M . V X W O R K S . E X T --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 2008-2015, 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 ------------------------------------------------------------------------------
28
29 -- This package provides vxworks specific support functions needed
30 -- by System.OS_Interface.
31
32 -- This is the version for VxWorks CERT 6.6 and greater
33
34 package body System.VxWorks.Ext is
35
36 ERROR : constant := -1;
37
38 --------------
39 -- Int_Lock --
40 --------------
41
42 function intLock return int;
43 pragma Import (C, intLock, "intLock");
44
45 function Int_Lock return int renames intLock;
46
47 ----------------
48 -- Int_Unlock --
49 ----------------
50
51 function intUnlock (Old : int) return int;
52 pragma Import (C, intUnlock, "intUnlock");
53
54 function Int_Unlock (Old : int) return int renames intUnlock;
55
56 ---------------
57 -- semDelete --
58 ---------------
59
60 function semDelete (Sem : SEM_ID) return int is
61 pragma Unreferenced (Sem);
62 begin
63 -- Not supported in VxWorks CERT
64
65 return ERROR;
66 end semDelete;
67
68 ------------------------
69 -- taskCpuAffinitySet --
70 ------------------------
71
72 function taskCpuAffinitySet (tid : t_id; CPU : int) return int is
73 pragma Unreferenced (tid, CPU);
74 begin
75 return ERROR;
76 end taskCpuAffinitySet;
77
78 -------------------------
79 -- taskMaskAffinitySet --
80 -------------------------
81
82 function taskMaskAffinitySet (tid : t_id; CPU_Set : unsigned) return int is
83 pragma Unreferenced (tid, CPU_Set);
84 begin
85 return ERROR;
86 end taskMaskAffinitySet;
87
88 --------------
89 -- taskCont --
90 --------------
91
92 function Task_Cont (tid : t_id) return int is
93 function taskResume (tid : t_id) return int;
94 pragma Import (C, taskResume, "taskResume");
95 begin
96 return taskResume (tid);
97 end Task_Cont;
98
99 --------------
100 -- taskStop --
101 --------------
102
103 function Task_Stop (tid : t_id) return int is
104 function taskSuspend (tid : t_id) return int;
105 pragma Import (C, taskSuspend, "taskSuspend");
106 begin
107 return taskSuspend (tid);
108 end Task_Stop;
109
110 end System.VxWorks.Ext;