]>
Commit | Line | Data |
---|---|---|
1eee94d3 GM |
1 | /* RTcodummy.c provides dummy access to thread primitives. |
2 | ||
a945c346 | 3 | Copyright (C) 2019-2024 Free Software Foundation, Inc. |
1eee94d3 GM |
4 | Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>. |
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 | #ifdef __cplusplus | |
28 | extern "C" { | |
29 | #endif | |
30 | ||
31 | ||
32 | void | |
33 | RTco_wait (__attribute__ ((unused)) int sid) | |
34 | { | |
35 | } | |
36 | ||
37 | ||
38 | void | |
39 | RTco_signal (__attribute__ ((unused)) int sid) | |
40 | { | |
41 | } | |
42 | ||
43 | ||
44 | int | |
45 | RTco_init (void) | |
46 | { | |
47 | return 0; | |
48 | } | |
49 | ||
50 | ||
51 | int | |
52 | RTco_initSemaphore (__attribute__ ((unused)) int value) | |
53 | { | |
54 | return 0; | |
55 | } | |
56 | ||
57 | ||
58 | /* signalThread signal the semaphore associated with thread tid. */ | |
59 | ||
60 | void | |
61 | RTco_signalThread (__attribute__ ((unused)) int tid) | |
62 | { | |
63 | } | |
64 | ||
65 | ||
66 | /* waitThread wait on the semaphore associated with thread tid. */ | |
67 | ||
68 | void | |
69 | RTco_waitThread (__attribute__ ((unused)) int tid) | |
70 | { | |
71 | } | |
72 | ||
73 | ||
74 | int | |
75 | RTco_currentThread (void) | |
76 | { | |
77 | return 0; | |
78 | } | |
79 | ||
80 | ||
81 | int | |
82 | RTco_initThread (__attribute__ ((unused)) void (*proc)(void), | |
83 | __attribute__ ((unused)) unsigned int stackSize, | |
84 | __attribute__ ((unused)) unsigned int interruptLevel) | |
85 | { | |
86 | return 0; | |
87 | } | |
88 | ||
89 | ||
90 | void | |
91 | RTco_transfer (__attribute__ ((unused)) int *p1, __attribute__ ((unused)) int p2) | |
92 | { | |
93 | } | |
94 | ||
95 | ||
96 | int | |
97 | RTco_select (__attribute__ ((unused)) int p1, | |
98 | __attribute__ ((unused)) void *p2, | |
99 | __attribute__ ((unused)) void *p3, | |
100 | __attribute__ ((unused)) void *p4, | |
101 | __attribute__ ((unused)) void *p5) | |
102 | { | |
103 | return 0; | |
104 | } | |
105 | ||
106 | ||
107 | unsigned int | |
108 | RTco_currentInterruptLevel (void) | |
109 | { | |
110 | return 0; | |
111 | } | |
112 | ||
113 | ||
114 | /* turninterrupts returns the old interrupt level and assigns the interrupt level | |
115 | to newLevel. */ | |
116 | ||
117 | unsigned int | |
118 | RTco_turnInterrupts (unsigned int newLevel) | |
119 | { | |
120 | return 0; | |
121 | } | |
122 | ||
123 | void | |
124 | _M2_RTco_init (void) | |
125 | { | |
126 | } | |
127 | ||
128 | void | |
129 | _M2_RTco_finish (void) | |
130 | { | |
131 | } | |
132 | ||
133 | ||
134 | #ifdef __cplusplus | |
135 | } | |
136 | #endif |