Added support for zip files.
[tangerine.git] / arch / all-mingw32 / exec / enable.c
blob65738cf0dbb1fa591ff6efe4be88ca3e646d3484
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: i386unix version of Enable()
6 Lang: english
7 */
8 #define DEBUG 0
10 #include <exec/tasks.h>
11 #include <exec/execbase.h>
12 #include <aros/libcall.h>
13 #include <aros/atomic.h>
14 #include <aros/debug.h>
15 //#include <asm/segments.h>
16 #include <proto/exec.h>
17 #include <proto/kernel.h>
18 #include "exec_intern.h"
20 #undef Exec
21 #ifdef UseExecstubs
22 # define Exec _Exec
23 #endif
25 AROS_LH0(void, Enable,
26 struct ExecBase *, SysBase, 21, Exec)
28 #undef Exec
29 AROS_LIBFUNC_INIT
31 AROS_ATOMIC_DEC(SysBase->IDNestCnt);
32 D(bug("[Exec] Enable(), new IDNestCnt is %d\n", SysBase->IDNestCnt));
34 if(SysBase->IDNestCnt < 0)
36 D(bug("[Enable] Enabling interrupts\n"));
37 if (KernelBase)
38 KrnSti();
39 D(else bug("[Enable] KernelBase is NULL\n"));
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 (!KrnIsSuper()) KrnSchedule();
52 if (SysBase->SysFlags & SFF_SoftInt)
54 if (!KrnIsSuper())
56 /* sys_Cause */
57 KrnCause();
62 AROS_LIBFUNC_EXIT