diff options
Diffstat (limited to 'amiga/schedule.c')
-rwxr-xr-x | amiga/schedule.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/amiga/schedule.c b/amiga/schedule.c index eae5ae31a..d49db1bc4 100755 --- a/amiga/schedule.c +++ b/amiga/schedule.c @@ -432,16 +432,6 @@ static int32 ami_scheduler_process(STRPTR args, int32 length, APTR execbase) while(running) { signal = Wait(signalmask); - if(signal & timersig) { - while((timermsg = (struct TimerRequest *)GetMsg(timermsgport))) { - /* 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(nsmsgport); - } - } - if(signal & schedulesig) { while((asmsg = (struct ami_schedule_message *)GetMsg(schedulermsgport))) { if(asmsg->msg.mn_Node.ln_Type == NT_REPLYMSG) { @@ -465,6 +455,17 @@ static int32 ami_scheduler_process(STRPTR args, int32 length, APTR execbase) } } } + + if(signal & timersig) { + while((timermsg = (struct TimerRequest *)GetMsg(timermsgport))) { + /* 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(nsmsgport); /* \todo check timer event doesn't relate to + * something that's been deleted already */ + } + } } ami_schedule_free(timermsgport); |