Daily bump.
[official-gcc.git] / gcc / m2 / mc-boot / GRTint.h
blobdaf64ecaae62050aa0c43646777d4ad2bee7e28d
1 /* do not edit automatically generated by mc from RTint. */
2 /* RTint.def provides users of the COROUTINES library with the.
4 Copyright (C) 2009-2025 Free Software Foundation, Inc.
5 Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
7 This file is part of GNU Modula-2.
9 GNU Modula-2 is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
12 any later version.
14 GNU Modula-2 is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 Under Section 7 of GPL version 3, you are granted additional
20 permissions described in the GCC Runtime Library Exception, version
21 3.1, as published by the Free Software Foundation.
23 You should have received a copy of the GNU General Public License and
24 a copy of the GCC Runtime Library Exception along with this program;
25 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
26 <http://www.gnu.org/licenses/>. */
29 #if !defined (_RTint_H)
30 # define _RTint_H
32 #include "config.h"
33 #include "system.h"
34 # ifdef __cplusplus
35 extern "C" {
36 # endif
37 #include <stdbool.h>
38 # if !defined (PROC_D)
39 # define PROC_D
40 typedef void (*PROC_t) (void);
41 typedef struct { PROC_t proc; } PROC;
42 # endif
44 # include "GSYSTEM.h"
46 # if defined (_RTint_C)
47 # define EXTERN
48 # else
49 # define EXTERN extern
50 # endif
52 typedef struct RTint_DispatchVector_p RTint_DispatchVector;
54 typedef void (*RTint_DispatchVector_t) (unsigned int, unsigned int, void *);
55 struct RTint_DispatchVector_p { RTint_DispatchVector_t proc; };
59 InitInputVector - returns an interrupt vector which is associated
60 with the file descriptor, fd.
63 EXTERN unsigned int RTint_InitInputVector (int fd, unsigned int pri);
66 InitOutputVector - returns an interrupt vector which is associated
67 with the file descriptor, fd.
70 EXTERN unsigned int RTint_InitOutputVector (int fd, unsigned int pri);
73 InitTimeVector - returns an interrupt vector associated with
74 the relative time.
77 EXTERN unsigned int RTint_InitTimeVector (unsigned int micro, unsigned int secs, unsigned int pri);
80 ReArmTimeVector - reprimes the vector, vec, to deliver an interrupt
81 at the new relative time.
84 EXTERN void RTint_ReArmTimeVector (unsigned int vec, unsigned int micro, unsigned int secs);
87 GetTimeVector - assigns, micro, and, secs, with the remaining
88 time before this interrupt will expire.
89 This value is only updated when a Listen
90 occurs.
93 EXTERN void RTint_GetTimeVector (unsigned int vec, unsigned int *micro, unsigned int *secs);
96 AttachVector - adds the pointer, p, to be associated with the interrupt
97 vector. It returns the previous value attached to this
98 vector.
101 EXTERN void * RTint_AttachVector (unsigned int vec, void * ptr);
104 IncludeVector - includes, vec, into the dispatcher list of
105 possible interrupt causes.
108 EXTERN void RTint_IncludeVector (unsigned int vec);
111 ExcludeVector - excludes, vec, from the dispatcher list of
112 possible interrupt causes.
115 EXTERN void RTint_ExcludeVector (unsigned int vec);
118 Listen - will either block indefinitely (until an interrupt)
119 or alteratively will test to see whether any interrupts
120 are pending.
121 If a pending interrupt was found then, call, is called
122 and then this procedure returns.
123 It only listens for interrupts > pri.
126 EXTERN void RTint_Listen (bool untilInterrupt, RTint_DispatchVector call, unsigned int pri);
129 Init - allows the user to force the initialize order.
132 EXTERN void RTint_Init (void);
133 # ifdef __cplusplus
135 # endif
137 # undef EXTERN
138 #endif