From 24c195910506e99b7d9152524aeaef042da1dedf Mon Sep 17 00:00:00 2001 From: Chris Young Date: Tue, 9 Aug 2016 00:53:46 +0100 Subject: We don't need ReplyMsg here. TimerRequests are removed from the message queue by WaitIO() which is ultimately called when the event is taken off the heap. The event on the top of the heap is _not necessarily_ the one which signalled us, though, and we should probably be handling this better. --- frontends/amiga/schedule.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontends/amiga/schedule.c b/frontends/amiga/schedule.c index 6b8ee8b6e..f6145a19f 100755 --- a/frontends/amiga/schedule.c +++ b/frontends/amiga/schedule.c @@ -90,6 +90,10 @@ static nserror ami_schedule_add_timer_event(struct nscallback *nscb, int t) nscb->tv.Seconds = time_us / 1000000; nscb->tv.Microseconds = time_us % 1000000; + if(nscb->tv.Microseconds >= 1000000) { + LOG("Microseconds invalid value: %ld", nscb->tv.Microseconds); + } + GetSysTime(&tv); AddTime(&nscb->tv,&tv); // now contains time when event occurs @@ -350,10 +354,6 @@ void ami_schedule_handle(struct MsgPort *nsmsgport) struct TimerRequest *timermsg; while((timermsg = (struct TimerRequest *)GetMsg(nsmsgport))) { - /* reply first, as we don't need the message contents and - * it crashes if we reply after schedule_run has executed. - */ - ReplyMsg((struct Message *)timermsg); ami_scheduler_run(); } } -- cgit v1.2.3