1 /* GNU CHILL compiler regression test file
2 Copyright (C) 1992, 1993 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20 /* As a special exception, if you link this library with other files,
21 some of which are compiled with GCC, to produce an executable,
22 this library does not by itself cause the resulting executable
23 to be covered by the GNU General Public License.
24 This exception does not however invalidate any other reasons why
25 the executable file might be covered by the GNU General Public License. */
42 typedef void (*EntryPoint
) ();
50 unsigned char /*TaskingEnum*/ type
;
53 /* how an INSTANCE is implemented */
60 /* interface to underlaying os */
71 extern INSTANCE
__whoami ();
72 extern void *__xmalloc_ ();
74 #define THIS __whoami()
75 /* for easier changing to something different,
76 i.e. allocate_memory */
77 #define MALLOC(ADDR,SIZE) ADDR = __xmalloc_(SIZE)
78 #define FREE(ADDR) free (ADDR)
80 /* definitions for EVENTS */
81 typedef struct EVENTQUEUE
83 struct EVENTQUEUE
*forward
; /* next in the list */
84 struct EVENTQUEUE
**listhead
; /* pointer to EVENT location */
85 int priority
; /* prio for DELAY or DELAY CASE */
86 INSTANCE
this; /* specify the instance is delayed */
87 struct EVENTQUEUE
*startlist
; /* start of the list */
88 struct EVENTQUEUE
*chain
; /* list of all events in an DELAY CASE */
89 int is_continued
; /* indicates a continue action on that event */
90 INSTANCE who_continued
; /* indicates who continued */
96 unsigned long maxqueuelength
;
99 /* definitions for BUFFERS */
102 typedef struct BUFFER_WAIT_QUEUE
104 struct BUFFER_WAIT_QUEUE
*forward
;
105 struct BUFFERQUEUE
**bufferaddr
;
107 struct BUFFER_WAIT_QUEUE
*startlist
;
108 struct BUFFER_WAIT_QUEUE
*chain
;
110 INSTANCE who_sent
; /* instance which have
112 unsigned long datalen
;
116 typedef struct BUFFER_SEND_QUEUE
118 struct BUFFER_SEND_QUEUE
*forward
;
122 unsigned long datalen
;
126 typedef struct BUFFERQUEUE
128 Buffer_Wait_Queue
*waitqueue
;
129 unsigned long waitqueuelength
;
130 Buffer_Send_Queue
*sendqueue
;
131 unsigned long sendqueuelength
;
137 unsigned long maxqueuelength
;
140 /* descriptor for data */
147 /* time format runtime delivers */
151 unsigned long nanosecs
;
154 extern void __rtstime (RtsTime
*t
);
155 extern int __delay_this (Delay_Reason reason
, RtsTime
*t
, char *file
, int lineno
);
156 extern void __continue_that (INSTANCE ins
, int prio
, char *file
, int lineno
);
158 #endif /* __rts_h_ */