remove defunct variable from event struct
authorAndrew Cagney <cagney@redhat.com>
Mon, 17 Mar 1997 16:26:35 +0000 (16:26 +0000)
committerAndrew Cagney <cagney@redhat.com>
Mon, 17 Mar 1997 16:26:35 +0000 (16:26 +0000)
sim/common/ChangeLog
sim/common/sim-events.h [new file with mode: 0644]

index 0937b30..8acffa4 100644 (file)
@@ -1,3 +1,7 @@
+Mon Mar 17 15:38:27 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
+       
+       * sim-events.h: Remove defunct reference to callback struct.
+
 Mon Mar 17 15:10:07 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
 
        * configure: Re-generate.
diff --git a/sim/common/sim-events.h b/sim/common/sim-events.h
new file mode 100644 (file)
index 0000000..eb52690
--- /dev/null
@@ -0,0 +1,106 @@
+/*  This file is part of the program psim.
+
+    Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+    */
+
+
+#ifndef _SIM_EVENTS_H_
+#define _SIM_EVENTS_H_
+
+
+typedef void event_handler(void *data);
+
+typedef struct _event_entry event_entry;
+struct _event_entry {
+  void *data;
+  event_handler *handler;
+  signed64 time_of_event;  
+  event_entry *next;
+};
+
+typedef struct _event_queue event_queue;
+struct _event_queue {
+  int processing;
+  event_entry *queue;
+  event_entry *volatile held;
+  event_entry *volatile *volatile held_end;
+  signed64 time_of_event;
+  signed64 time_from_event;
+  int trace;
+};
+
+typedef struct event_entry *event_entry_tag;
+
+
+/* Initialization */
+
+INLINE_SIM_EVENTS\
+(void) event_queue_init
+(engine *system);
+
+
+/* Tracing level */
+
+INLINE_SIM_EVENTS\
+(void) event_queue_trace
+(engine *system,
+ int level);
+
+
+/* (de)Schedule things to happen in the future. */
+
+INLINE_SIM_EVENTS\
+(event_entry_tag) event_queue_schedule
+(engine *system,
+ signed64 delta_time,
+ event_handler *handler,
+ void *data);
+
+INLINE_SIM_EVENTS\
+(event_entry_tag) event_queue_schedule_after_signal
+(engine *system,
+ signed64 delta_time,
+ event_handler *handler,
+ void *data);
+
+INLINE_SIM_EVENTS\
+(void) event_queue_deschedule
+(engine *system,
+ event_entry_tag event_to_remove);
+
+
+/* progress time.  Broken into two parts so that if something is
+   pending, the caller has a chance to save any cached state */
+
+INLINE_SIM_EVENTS\
+(int) event_queue_tick
+(engine *system);
+
+INLINE_SIM_EVENTS\
+(void) event_queue_process
+(engine *system);
+
+
+/* local concept of time */
+
+INLINE_SIM_EVENTS\
+(signed64) event_queue_time
+(engine *system);
+
+
+#endif