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. */
35 typedef void (*EntryPoint
) ();
43 unsigned char /*TaskingEnum*/ type
;
46 /* how an INSTANCE is implemented */
53 /* interface to underlaying os */
64 extern INSTANCE
__whoami ();
65 extern void *__xmalloc_ ();
67 #define THIS __whoami()
68 /* for easier changing to something different,
69 i.e. allocate_memory */
70 #define MALLOC(ADDR,SIZE) ADDR = __xmalloc_(SIZE)
71 #define FREE(ADDR) free (ADDR)
73 /* definitions for EVENTS */
74 typedef struct EVENTQUEUE
76 struct EVENTQUEUE
*forward
; /* next in the list */
77 struct EVENTQUEUE
**listhead
; /* pointer to EVENT location */
78 int priority
; /* prio for DELAY or DELAY CASE */
79 INSTANCE
this; /* specify the instance is delayed */
80 struct EVENTQUEUE
*startlist
; /* start of the list */
81 struct EVENTQUEUE
*chain
; /* list of all events in an DELAY CASE */
82 int is_continued
; /* indicates a continue action on that event */
83 INSTANCE who_continued
; /* indicates who continued */
89 unsigned long maxqueuelength
;
92 /* definitions for BUFFERS */
95 typedef struct BUFFER_WAIT_QUEUE
97 struct BUFFER_WAIT_QUEUE
*forward
;
98 struct BUFFERQUEUE
**bufferaddr
;
100 struct BUFFER_WAIT_QUEUE
*startlist
;
101 struct BUFFER_WAIT_QUEUE
*chain
;
103 INSTANCE who_sent
; /* instance which have
105 unsigned long datalen
;
109 typedef struct BUFFER_SEND_QUEUE
111 struct BUFFER_SEND_QUEUE
*forward
;
115 unsigned long datalen
;
119 typedef struct BUFFERQUEUE
121 Buffer_Wait_Queue
*waitqueue
;
122 unsigned long waitqueuelength
;
123 Buffer_Send_Queue
*sendqueue
;
124 unsigned long sendqueuelength
;
130 unsigned long maxqueuelength
;
133 /* descriptor for data */
140 /* time format runtime delivers */
144 unsigned long nanosecs
;
147 extern void __rtstime (RtsTime
*t
);
148 extern int __delay_this (Delay_Reason reason
, RtsTime
*t
, char *file
, int lineno
);
149 extern void __continue_that (INSTANCE ins
, int prio
, char *file
, int lineno
);
151 #endif /* __rts_h_ */