Indentation fix, cleanup.
[AROS.git] / rom / exec / exec_platform.h
blob122270f3d55f1761981a8021928f6e3b7ccb834b
1 /*
2 * This file can be overriden in arch/all-$(ARCH)/exec.
3 */
4 #ifndef __EXEC_PLATFORM_H
5 #define __EXEC_PLATFORM_H
7 struct Exec_PlatformData
9 /* No platform-specific data by default */
11 #ifdef AROS_NO_ATOMIC_OPERATIONS
12 #define IDNESTCOUNT_INC SysBase->IDNestCnt++
13 #define IDNESTCOUNT_DEC SysBase->IDNestCnt--
14 #define TDNESTCOUNT_INC SysBase->TDNestCnt++
15 #define TDNESTCOUNT_DEC SysBase->TDNestCnt--
16 #define FLAG_SCHEDQUANTUM_CLEAR SysBase->SysFlags &= ~SFF_QuantumOver
17 #define FLAG_SCHEDQUANTUM_SET SysBase->SysFlags |= SFF_QuantumOver
18 #define FLAG_SCHEDSWITCH_CLEAR SysBase->AttnResched &= ~ARF_AttnSwitch
19 #define FLAG_SCHEDSWITCH_SET SysBase->AttnResched |= ARF_AttnSwitch
20 #define FLAG_SCHEDDISPATCH_CLEAR SysBase->AttnResched &= ~ARF_AttnDispatch
21 #define FLAG_SCHEDDISPATCH_SET SysBase->AttnResched |= ARF_AttnDispatch
22 #else
23 #define IDNESTCOUNT_INC AROS_ATOMIC_INC(SysBase->IDNestCnt)
24 #define IDNESTCOUNT_DEC AROS_ATOMIC_DEC(SysBase->IDNestCnt)
25 #define TDNESTCOUNT_INC AROS_ATOMIC_INC(SysBase->TDNestCnt)
26 #define TDNESTCOUNT_DEC AROS_ATOMIC_DEC(SysBase->TDNestCnt)
27 #define FLAG_SCHEDQUANTUM_CLEAR AROS_ATOMIC_AND(SysBase->SysFlags, ~SFF_QuantumOver)
28 #define FLAG_SCHEDQUANTUM_SET AROS_ATOMIC_OR(SysBase->SysFlags, SFF_QuantumOver)
29 #define FLAG_SCHEDSWITCH_CLEAR AROS_ATOMIC_AND(SysBase->AttnResched, ~ARF_AttnSwitch)
30 #define FLAG_SCHEDSWITCH_SET AROS_ATOMIC_OR(SysBase->AttnResched, ARF_AttnSwitch)
31 #define FLAG_SCHEDDISPATCH_CLEAR AROS_ATOMIC_AND(SysBase->AttnResched, ~ARF_AttnDispatch)
32 #define FLAG_SCHEDDISPATCH_SET AROS_ATOMIC_OR(SysBase->AttnResched, ARF_AttnDispatch)
33 #endif
34 #define IDNESTCOUNT_GET (SysBase->IDNestCnt)
35 #define IDNESTCOUNT_SET(val) (SysBase->IDNestCnt=(val))
36 #define TDNESTCOUNT_GET (SysBase->TDNestCnt)
37 #define TDNESTCOUNT_SET(val) (SysBase->TDNestCnt=(val))
38 #define FLAG_SCHEDQUANTUM_ISSET (SysBase->SysFlags & SFF_QuantumOver)
39 #define FLAG_SCHEDSWITCH_ISSET (SysBase->AttnResched & ARF_AttnSwitch)
40 #define FLAG_SCHEDDISPATCH_ISSET (SysBase->AttnResched & ARF_AttnDispatch)
42 #define GET_THIS_TASK (SysBase->ThisTask)
43 #define SET_THIS_TASK(x) (SysBase->ThisTask=(x))
45 #endif /* __EXEC_PLATFORM_H */