2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: i386unix version of Enable()
9 #include <exec/tasks.h>
10 #include <exec/execbase.h>
11 #include <aros/libcall.h>
12 #include <aros/atomic.h>
13 #include <aros/debug.h>
14 #include <asm/segments.h>
15 #include <proto/exec.h>
16 #include "exec_intern.h"
18 void Exec_Permit_Supervisor();
25 AROS_LH0(void, Enable
,
26 struct ExecBase
*, SysBase
, 21, Exec
)
31 AROS_ATOMIC_DEC(SysBase
->IDNestCnt
);
33 if(SysBase
->IDNestCnt
< 0)
35 __asm__
__volatile__ ("sti");
37 /* There's no dff09c like thing in x86 native which would allow
38 us to set delayed (mark it as pending but it gets triggered
39 only once interrupts are enabled again) software interrupt,
40 so we check it manually here in Enable() == same stuff as
43 if ((SysBase
->TDNestCnt
< 0) && (SysBase
->AttnResched
& 0x80))
45 if (IN_USER_MODE
) Supervisor(Exec_Permit_Supervisor
);
48 if (SysBase
->SysFlags
& SFF_SoftInt
)
53 __asm__
__volatile__ ("movl $0,%%eax\n\tint $0x80":::"eax","memory");