1 #include <aros/kernel.h>
2 #include <exec/execbase.h>
3 #include <proto/exec.h>
5 #include <kernel_base.h>
11 /*****************************************************************************
14 #include <proto/kernel.h>
16 AROS_LH1(intptr_t, KrnGetSystemAttr
,
19 AROS_LHA(uint32_t, id
, D0
),
22 struct KernelBase
*, KernelBase
, 29, Kernel
)
25 Get value of internal system attributes.
26 Currently defined attributes are:
28 KATTR_Architecture [.G] (char *) - Name of architecture the kernel built for.
29 KATTR_VBlankEnable [SG] (unsigned char) - Enable or disable exec VBlank emulation by kernel.resource.
30 This can be needed for timer.device implementations for
31 systems with only one timer available. In this case timer.device
32 should shut off kernel's VBlank emulation before taking over the
33 timer and drive exec VBlank itself.
34 KATTR_TimerIRQ [.G] (int) - Number of high precision periodic timer IRQ to be used by timer.device.
35 Needed if kernel.resource provides a timer which runs at frequency
36 which is multiple of VBlank. Generic timer.device may use this IRQ
37 for improved accuracy. Frequency of this timer is specified in
38 SysBase->ex_EClockFrequency.
41 id - ID of the attribute to get
44 Value of the attribute
47 These attributes (except KATTR_Architecture) are of very limited use for end user software.
48 They are valid only in certain system states. For example KATTR_TimerPeriod goes meaningless
49 if timer.device has taken over the system timer. These attributes are provided for system
50 components themselves, so it's better to stay away from them.
61 ******************************************************************************/
67 case KATTR_Architecture
:
68 return (intptr_t)AROS_ARCHITECTURE
;
70 case KATTR_VBlankEnable
:
71 return KernelBase
->kb_VBlankEnable
;