diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-02-09 21:52:28 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-02-09 21:52:28 +0000 |
commit | 4703d643f585b964d2e63ebe88c433cfef99e0d6 (patch) | |
tree | 861e4731335cad3c61957567bb0ad564ac135ea5 /amiga/schedule.c | |
parent | 86c2948eb4d4fa75e28182472094d0812fabb29e (diff) | |
download | netsurf-4703d643f585b964d2e63ebe88c433cfef99e0d6.tar.gz netsurf-4703d643f585b964d2e63ebe88c433cfef99e0d6.tar.bz2 |
Fix some long-standing issues with events not getting captured, make sure the
timer.device version of the scheduler is working and make it the default.
svn path=/trunk/netsurf/; revision=11637
Diffstat (limited to 'amiga/schedule.c')
-rwxr-xr-x | amiga/schedule.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/amiga/schedule.c b/amiga/schedule.c index 32c6df497..7b8565960 100755 --- a/amiga/schedule.c +++ b/amiga/schedule.c @@ -20,6 +20,7 @@ #include "amiga/os3support.h" #include "amiga/object.h" #include "amiga/schedule.h" + #include <proto/exec.h> /** @@ -63,7 +64,7 @@ void schedule(int t, void (*callback)(void *p), void *p) GetSysTime(&tv); AddTime(&nscb->tv,&tv); // now contains time when event occurs -#ifdef AMI_SCHEDULER_USES_TIMER + if(nscb->treq = AllocVec(sizeof(struct TimeRequest),MEMF_PRIVATE | MEMF_CLEAR)) { *nscb->treq = *tioreq; @@ -72,7 +73,7 @@ void schedule(int t, void (*callback)(void *p), void *p) nscb->treq->Time.Microseconds=nscb->tv.Microseconds; // micro SendIO((struct IORequest *)nscb->treq); } -#endif + nscb->callback = callback; nscb->p = p; } @@ -155,16 +156,14 @@ BOOL schedule_run(void) void ami_remove_timer_event(struct nscallback *nscb) { -#ifdef AMI_SCHEDULER_USES_TIMER if(!nscb) return; if(nscb->treq) { - if(CheckIO((struct IORequest *)nscb->treq)==NULL) +// if(CheckIO((struct IORequest *)nscb->treq)==NULL) AbortIO((struct IORequest *)nscb->treq); WaitIO((struct IORequest *)nscb->treq); FreeVec(nscb->treq); } -#endif } |