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, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* As a special exception, if you link this library with other files,
22 some of which are compiled with GCC, to produce an executable,
23 this library does not by itself cause the resulting executable
24 to be covered by the GNU General Public License.
25 This exception does not however invalidate any other reasons why
26 the executable file might be covered by the GNU General Public License. */
43 typedef void (*EntryPoint
) ();
51 unsigned char /*TaskingEnum*/ type
;
54 /* how an INSTANCE is implemented */
61 /* interface to underlaying os */
72 extern INSTANCE
__whoami ();
73 extern void *__xmalloc_ ();
75 #define THIS __whoami()
76 /* for easier changing to something different,
77 i.e. allocate_memory */
78 #define MALLOC(ADDR,SIZE) ADDR = __xmalloc_(SIZE)
79 #define FREE(ADDR) free (ADDR)
81 /* definitions for EVENTS */
82 typedef struct EVENTQUEUE
84 struct EVENTQUEUE
*forward
; /* next in the list */
85 struct EVENTQUEUE
**listhead
; /* pointer to EVENT location */
86 int priority
; /* prio for DELAY or DELAY CASE */
87 INSTANCE
this; /* specify the instance is delayed */
88 struct EVENTQUEUE
*startlist
; /* start of the list */
89 struct EVENTQUEUE
*chain
; /* list of all events in an DELAY CASE */
90 int is_continued
; /* indicates a continue action on that event */
91 INSTANCE who_continued
; /* indicates who continued */
97 unsigned long maxqueuelength
;
100 /* definitions for BUFFERS */
103 typedef struct BUFFER_WAIT_QUEUE
105 struct BUFFER_WAIT_QUEUE
*forward
;
106 struct BUFFERQUEUE
**bufferaddr
;
108 struct BUFFER_WAIT_QUEUE
*startlist
;
109 struct BUFFER_WAIT_QUEUE
*chain
;
111 INSTANCE who_sent
; /* instance which have
113 unsigned long datalen
;
117 typedef struct BUFFER_SEND_QUEUE
119 struct BUFFER_SEND_QUEUE
*forward
;
123 unsigned long datalen
;
127 typedef struct BUFFERQUEUE
129 Buffer_Wait_Queue
*waitqueue
;
130 unsigned long waitqueuelength
;
131 Buffer_Send_Queue
*sendqueue
;
132 unsigned long sendqueuelength
;
138 unsigned long maxqueuelength
;
141 /* descriptor for data */
148 /* time format runtime delivers */
152 unsigned long nanosecs
;
155 extern void __rtstime (RtsTime
*t
);
156 extern int __delay_this (Delay_Reason reason
, RtsTime
*t
, char *file
, int lineno
);
157 extern void __continue_that (INSTANCE ins
, int prio
, char *file
, int lineno
);
159 #endif /* __rts_h_ */