1 /* This file is part of the program psim.
3 Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, see <http://www.gnu.org/licenses/>.
24 /* typedef struct _event_queue event_queue; */
25 /* typedef struct _event_entry_tag *event_entry_tag; */
27 typedef void event_handler(void *data
);
30 (event_queue
*) event_queue_create
34 (void) event_queue_init
38 /* (de)Schedule things to happen in the future. */
41 (event_entry_tag
) event_queue_schedule
44 event_handler
*handler
,
48 (event_entry_tag
) event_queue_schedule_after_signal
51 event_handler
*handler
,
55 (void) event_queue_deschedule
57 event_entry_tag event_to_remove
);
60 /* progress time. In to parts so that if something is pending, the
61 caller has a chance to save any cached state */
64 (int) event_queue_tick
68 (void) event_queue_process
69 (event_queue
*events
);
72 /* local concept of time */
75 (int64_t) event_queue_time
78 #endif /* _EVENTS_H_ */