Updated PCI IDs to latest snapshot.
[tangerine.git] / arch / x86_64-pc / exec / enable.c
blob8d1098518a77ab50b77deb5bf5062990d8ae0d16
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: i386unix version of Enable()
6 Lang: english
7 */
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 <proto/kernel.h>
17 #include "exec_intern.h"
19 #include "x86_64.h"
21 #undef Exec
22 #ifdef UseExecstubs
23 # define Exec _Exec
24 #endif
26 AROS_LH0(void, Enable,
27 struct ExecBase *, SysBase, 21, Exec)
29 #undef Exec
30 AROS_LIBFUNC_INIT
32 void *KernelBase = TLS_GET(KernelBase);
34 AROS_ATOMIC_DEC(SysBase->IDNestCnt);
36 if(SysBase->IDNestCnt < 0)
38 if (KernelBase)
39 KrnSti();
41 /* There's no dff09c like thing in x86 native which would allow
42 us to set delayed (mark it as pending but it gets triggered
43 only once interrupts are enabled again) software interrupt,
44 so we check it manually here in Enable() == same stuff as
45 in Permit(). */
47 if ((SysBase->TDNestCnt < 0) && (SysBase->AttnResched & ARF_AttnSwitch))
49 if (IN_USER_MODE) KrnSchedule();
52 if (SysBase->SysFlags & SFF_SoftInt)
54 if (IN_USER_MODE)
56 /* sys_Cause */
57 KrnCause();
62 AROS_LIBFUNC_EXIT