Debian Codegraph @

gcc/m2/pge-boot/GRTco.cc

raw
1 /* RTco.c provides dummy access to thread primitives.
2
3 Copyright (C) 2019-2025 Free Software Foundation, Inc.
4 Contributed by Gaius Mulley <[email protected]>.
5
6 This file is part of GNU Modula-2.
7
8 GNU Modula-2 is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
12
13 GNU Modula-2 is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 Under Section 7 of GPL version 3, you are granted additional
19 permissions described in the GCC Runtime Library Exception, version
20 3.1, as published by the Free Software Foundation.
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 #if defined(__cplusplus)
28 #define EXTERN extern "C"
29 #else
30 #define EXTERN
31 #endif
32
33 EXTERN
34 void
35 RTco_wait (__attribute__ ((unused)) int sid)
36 {
37 }
38
39
40 EXTERN
41 void
42 RTco_signal (__attribute__ ((unused)) int sid)
43 {
44 }
45
46
47 EXTERN
48 int
49 RTco_init (void)
50 {
51 return 0;
52 }
53
54
55 EXTERN
56 int
57 RTco_initSemaphore (__attribute__ ((unused)) int value)
58 {
59 return 0;
60 }
61
62
63 /* signalThread signal the semaphore associated with thread tid. */
64
65 EXTERN
66 void
67 RTco_signalThread (__attribute__ ((unused)) int tid)
68 {
69 }
70
71
72 /* waitThread wait on the semaphore associated with thread tid. */
73
74 EXTERN
75 void
76 RTco_waitThread (__attribute__ ((unused)) int tid)
77 {
78 }
79
80
81 EXTERN
82 int
83 RTco_currentThread (void)
84 {
85 return 0;
86 }
87
88
89 EXTERN
90 int
91 RTco_initThread (__attribute__ ((unused)) void (*proc)(void),
92 __attribute__ ((unused)) unsigned int stackSize)
93 {
94 return 0;
95 }
96
97
98 EXTERN
99 void
100 RTco_transfer (__attribute__ ((unused)) int *p1, __attribute__ ((unused)) int p2)
101 {
102 }
103
104
105 EXTERN
106 int
107 RTco_select (__attribute__ ((unused)) int p1,
108 __attribute__ ((unused)) void *p2,
109 __attribute__ ((unused)) void *p3,
110 __attribute__ ((unused)) void *p4,
111 __attribute__ ((unused)) void *p5)
112 {
113 return 0;
114 }
115
116
117 EXTERN
118 void
119 _M2_RTco_init (void)
120 {
121 }
122
123 EXTERN
124 void
125 _M2_RTco_finish (void)
126 {
127 }