summaryrefslogtreecommitdiff
path: root/amiga/schedule.h
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2011-02-16 21:29:39 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2011-02-16 21:29:39 +0000
commit6bced73998312f7ddb68f5d572fef2214ddbe4f4 (patch)
treed1dc490184496792d09025aa13cfb9b3f9d384d1 /amiga/schedule.h
parentbbdb7cd440accc92fd9bfaf8c4821bba2844e3e5 (diff)
downloadnetsurf-6bced73998312f7ddb68f5d572fef2214ddbe4f4.tar.gz
netsurf-6bced73998312f7ddb68f5d572fef2214ddbe4f4.tar.bz2
Modify scheduler to use a binary heap (using libpbl).
Scheduled events are now in event time order, so schedule_run simply takes the top event off the heap and runs it (if we're polling, rather than having received a signal that the next event is due to be run, we check first that we have passed the scheduled time). This should provide performance benefits as we are no longer trawling the entire list of scheduled events (potentially hundreds) every time an event is signalled or the schedule list is polled. svn path=/trunk/netsurf/; revision=11703
Diffstat (limited to 'amiga/schedule.h')
-rwxr-xr-xamiga/schedule.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/amiga/schedule.h b/amiga/schedule.h
index bc983a0a2..7a3b25f1b 100755
--- a/amiga/schedule.h
+++ b/amiga/schedule.h
@@ -18,23 +18,14 @@
#ifndef AMIGA_SCHEDULE_H
#define AMIGA_SCHEDULE_H
-#include <exec/lists.h>
#include <proto/timer.h>
#include "amiga/os3support.h"
-struct MinList *schedule_list;
struct TimeRequest *tioreq;
struct MsgPort *msgport;
-struct nscallback
-{
- struct TimeVal tv;
- void *callback;
- void *p;
- struct TimeRequest *treq;
-};
-
-void ami_remove_timer_event(struct nscallback *nscb);
-BOOL schedule_run(void);
+BOOL ami_schedule_create(void);
+void ami_schedule_free(void);
+void schedule_run(BOOL poll);
#endif