--- a/kernel/eka/include/nkernsmp/x86/nk_plat.h Tue Aug 31 16:34:26 2010 +0300
+++ b/kernel/eka/include/nkernsmp/x86/nk_plat.h Wed Sep 01 12:34:56 2010 +0100
@@ -27,37 +27,23 @@
#define __NK_X86_H__
#include <nk_cpu.h>
-class TSubScheduler;
-class TScheduler;
-struct TX86Tss;
-
// TSubScheduler member data
-struct TSubSchedulerX
- {
- TUint32 iSSXP[9];
- volatile TUint32 iIrqCount; // count of interrupts handled
- TAny* iExcInfo; // pointer to exception info for crash debugger
- volatile TInt iCrashState; // 0=normal, 1=this CPU faulted, 2=this CPU has received an NMI and halted
- TUint32 iAPICID; // Local APIC ID for this CPU (starts at -1)
- volatile TInt iIrqNestCount; // IRQ nest count for this CPU (starts at -1)
- TLinAddr iIrqStackTop; // Top of IRQ stack for this CPU
- TX86Tss* iTss; // Address of TSS for this CPU
- SRatioInv iCpuFreqRI; // Ratio of CPU frequency to maximum possible CPU frequency
- SRatioInv iTimerFreqRI; // Ratio of CPU local timer frequency to maximum possible
-
- volatile TUint64HL iTimestampOffset; // 64 bit value to add to CPU TSC to give NKern::Timestamp()
-
- TUint32 iSSXP2[36];
- TUint64 iSSXP3; // one 64 bit value to guarantee alignment
- };
+#define i_IrqCount iExtras[9] // count of interrupts handled
+#define i_ExcInfo iExtras[10] // pointer to exception info for crash debugger
+#define i_CrashState iExtras[11] // 0=normal, 1=this CPU faulted, 2=this CPU has received an NMI and halted
+#define i_APICID iExtras[12] // Local APIC ID for this CPU (starts at -1)
+#define i_IrqNestCount iExtras[13] // IRQ nest count for this CPU (starts at -1)
+#define i_IrqStackTop iExtras[14] // Top of IRQ stack for this CPU
+#define i_Tss iExtras[15] // Address of TSS for this CPU
+#define i_TimerMultF iExtras[16] // Timer frequency / Max Timer frequency * 2^32
+#define i_TimerMultI iExtras[17] // Max Timer frequency / Timer frequency * 2^24
+#define i_CpuMult iExtras[18] // CPU frequency / Max CPU frequency * 2^32
+#define i_TimestampOffset iExtras[20] // 64 bit value to add to CPU TSC to give NKern::Timestamp()
+#define i_TimestampOffsetL iExtras[20] //
+#define i_TimestampOffsetH iExtras[21] //
// TScheduler member data
-struct TSchedulerX
- {
- TUint64 iTimerMax; // Maximum per-CPU timer frequency (after prescaling)
- TUint32 iSXP[30];
- };
-
+#define i_TimerMax iExtras[16] // Maximum per-CPU timer frequency (after prescaling)
#define CRASH_IPI_VECTOR 0x27
#define RESCHED_IPI_VECTOR 0x28
@@ -82,7 +68,8 @@
{
public:
TInt Create(SNThreadCreateInfo& anInfo, TBool aInitial);
- void Stillborn();
+ inline void Stillborn()
+ {}
void GetUserContext(TX86RegSet& aContext, TUint32& aAvailRegMask);
void SetUserContext(const TX86RegSet& aContext, TUint32& aRegMask);
void GetSystemContext(TX86RegSet& aContext, TUint32& aAvailRegMask);
@@ -200,11 +187,6 @@
#define smp_mb() mb()
-/**
-@internalComponent
-*/
-extern "C" void send_resched_ipis(TUint32 aMask);
-
// End of file
#endif