Author: dgorbachev
Date: Sun Dec 7 17:40:23 2008
New Revision: 37921
URL:
http://svn.reactos.org/svn/reactos?rev=37921&view=rev
Log:
Put inline functions into header files.
Modified:
trunk/reactos/base/services/eventlog/eventlog.h
trunk/reactos/base/services/eventlog/file.c
trunk/reactos/base/services/eventlog/logport.c
trunk/reactos/hal/halx86/include/apic.h
trunk/reactos/hal/halx86/mp/apic.c
Modified: trunk/reactos/base/services/eventlog/eventlog.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/eve…
==============================================================================
--- trunk/reactos/base/services/eventlog/eventlog.h [iso-8859-1] (original)
+++ trunk/reactos/base/services/eventlog/eventlog.h [iso-8859-1] Sun Dec 7 17:40:23 2008
@@ -162,9 +162,9 @@
DWORD dwDataSize,
LPVOID lpRawData);
-__inline void LogfFreeRecord(LPVOID Rec);
+/* eventlog.c */
+extern HANDLE MyHeap;
-/* eventlog.c */
VOID PRINT_HEADER(PFILE_HEADER header);
VOID PRINT_RECORD(PEVENTLOGRECORD pRec);
@@ -185,4 +185,9 @@
/* rpc.c */
DWORD WINAPI RpcThreadRoutine(LPVOID lpParameter);
+static __inline void LogfFreeRecord(LPVOID Rec)
+{
+ HeapFree(MyHeap, 0, Rec);
+}
+
#endif /* __EVENTLOG_H__ */
Modified: trunk/reactos/base/services/eventlog/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/fil…
==============================================================================
--- trunk/reactos/base/services/eventlog/file.c [iso-8859-1] (original)
+++ trunk/reactos/base/services/eventlog/file.c [iso-8859-1] Sun Dec 7 17:40:23 2008
@@ -14,7 +14,6 @@
static LIST_ENTRY LogFileListHead;
static CRITICAL_SECTION LogFileListCs;
-extern HANDLE MyHeap;
/* FUNCTIONS ****************************************************************/
@@ -898,8 +897,3 @@
*lpRecSize = dwRecSize;
return Buffer;
}
-
-__inline void LogfFreeRecord(LPVOID Rec)
-{
- HeapFree(MyHeap, 0, Rec);
-}
Modified: trunk/reactos/base/services/eventlog/logport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/log…
==============================================================================
--- trunk/reactos/base/services/eventlog/logport.c [iso-8859-1] (original)
+++ trunk/reactos/base/services/eventlog/logport.c [iso-8859-1] Sun Dec 7 17:40:23 2008
@@ -15,7 +15,6 @@
HANDLE ConnectPortHandle = NULL;
HANDLE MessagePortHandle = NULL;
-extern HANDLE MyHeap;
extern BOOL onLiveCD;
/* FUNCTIONS ****************************************************************/
Modified: trunk/reactos/hal/halx86/include/apic.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/include/apic.h?…
==============================================================================
--- trunk/reactos/hal/halx86/include/apic.h [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/include/apic.h [iso-8859-1] Sun Dec 7 17:40:23 2008
@@ -93,10 +93,10 @@
#define APIC_LVT_VECTOR (0xFF << 0) /* Vector */
#define APIC_LVT_DS (0x1 << 12) /* Delivery Status */
-#define APIC_LVT_REMOTE_IRR (0x1 << 14) /* Remote IRR */
-#define APIC_LVT_LEVEL_TRIGGER (0x1 << 15) /* Lvel Triggered */
-#define APIC_LVT_MASKED (0x1 << 16) /* Mask */
-#define APIC_LVT_PERIODIC (0x1 << 17) /* Timer Mode */
+#define APIC_LVT_REMOTE_IRR (0x1 << 14) /* Remote IRR */
+#define APIC_LVT_LEVEL_TRIGGER (0x1 << 15) /* Lvel Triggered */
+#define APIC_LVT_MASKED (0x1 << 16) /* Mask */
+#define APIC_LVT_PERIODIC (0x1 << 17) /* Timer Mode */
#define APIC_LVT3_DM (0x7 << 8)
#define APIC_LVT3_IIPP (0x1 << 13)
@@ -117,10 +117,10 @@
#define APIC_LVT_VECTOR (0xFF << 0) /* Vector */
#define APIC_LVT_DS (0x1 << 12) /* Delivery Status */
-#define APIC_LVT_REMOTE_IRR (0x1 << 14) /* Remote IRR */
-#define APIC_LVT_LEVEL_TRIGGER (0x1 << 15) /* Lvel Triggered */
-#define APIC_LVT_MASKED (0x1 << 16) /* Mask */
-#define APIC_LVT_PERIODIC (0x1 << 17) /* Timer Mode */
+#define APIC_LVT_REMOTE_IRR (0x1 << 14) /* Remote IRR */
+#define APIC_LVT_LEVEL_TRIGGER (0x1 << 15) /* Lvel Triggered */
+#define APIC_LVT_MASKED (0x1 << 16) /* Mask */
+#define APIC_LVT_PERIODIC (0x1 << 17) /* Timer Mode */
#define APIC_LVT3_DM (0x7 << 8)
#define APIC_LVT3_IIPP (0x1 << 13)
@@ -185,30 +185,92 @@
} CPU_INFO, *PCPU_INFO;
extern ULONG CPUCount; /* Total number of CPUs */
-extern ULONG BootCPU; /* Bootstrap processor */
+extern ULONG BootCPU; /* Bootstrap processor */
extern ULONG OnlineCPUs; /* Bitmask of online CPUs */
extern CPU_INFO CPUMap[MAX_CPU]; /* Map of all CPUs in the system */
+extern PULONG APICBase; /* Virtual address of local APIC */
+extern ULONG lastregr[MAX_CPU]; /* For debugging */
+extern ULONG lastvalr[MAX_CPU];
+extern ULONG lastregw[MAX_CPU];
+extern ULONG lastvalw[MAX_CPU];
/* Prototypes */
-
-__inline VOID APICWrite(ULONG Offset, ULONG Value);
-__inline ULONG APICRead(ULONG Offset);
VOID APICSendIPI(ULONG Target, ULONG Mode);
VOID APICSetup(VOID);
VOID HaliInitBSP(VOID);
VOID APICSyncArbIDs(VOID);
-__inline VOID APICSendEOI(VOID);
VOID APICCalibrateTimer(ULONG CPU);
VOID HaliStartApplicationProcessor(ULONG Cpu, ULONG Stack);
+static __inline ULONG _APICRead(ULONG Offset)
+{
+ PULONG p;
+
+ p = (PULONG)((ULONG)APICBase + Offset);
+ return *p;
+}
+
+#if 0
+static __inline VOID APICWrite(ULONG Offset,
+ ULONG Value)
+{
+ PULONG p;
+
+ p = (PULONG)((ULONG)APICBase + Offset);
+
+ *p = Value;
+}
+#else
+static __inline VOID APICWrite(ULONG Offset,
+ ULONG Value)
+{
+ PULONG p;
+ ULONG CPU = (_APICRead(APIC_ID) & APIC_ID_MASK) >> 24;
+
+ lastregw[CPU] = Offset;
+ lastvalw[CPU] = Value;
+
+ p = (PULONG)((ULONG)APICBase + Offset);
+
+ *p = Value;
+}
+#endif
+
+#if 0
+static __inline ULONG APICRead(ULONG Offset)
+{
+ PULONG p;
+
+ p = (PULONG)((ULONG)APICBase + Offset);
+ return *p;
+}
+#else
+static __inline ULONG APICRead(ULONG Offset)
+{
+ PULONG p;
+ ULONG CPU = (_APICRead(APIC_ID) & APIC_ID_MASK) >> 24;
+
+ lastregr[CPU] = Offset;
+ lastvalr[CPU] = 0;
+
+ p = (PULONG)((ULONG)APICBase + Offset);
+
+ lastvalr[CPU] = *p;
+ return lastvalr[CPU];
+}
+#endif
+
static __inline ULONG ThisCPU(VOID)
{
return (APICRead(APIC_ID) & APIC_ID_MASK) >> 24;
}
-
-#endif
-
+static __inline VOID APICSendEOI(VOID)
+{
+ // Send the EOI
+ APICWrite(APIC_EOI, 0);
+}
+
+#endif /* __INTERNAL_HAL_APIC_H */
/* EOF */
-
Modified: trunk/reactos/hal/halx86/mp/apic.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/mp/apic.c?rev=3…
==============================================================================
--- trunk/reactos/hal/halx86/mp/apic.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/mp/apic.c [iso-8859-1] Sun Dec 7 17:40:23 2008
@@ -223,72 +223,6 @@
APICWrite(APIC_SIVR, tmp);
}
-
-__inline ULONG _APICRead(ULONG Offset)
-{
- PULONG p;
-
- p = (PULONG)((ULONG)APICBase + Offset);
- return *p;
-}
-
-#if 0
-__inline VOID APICWrite(ULONG Offset,
- ULONG Value)
-{
- PULONG p;
-
- p = (PULONG)((ULONG)APICBase + Offset);
-
- *p = Value;
-}
-#else
-__inline VOID APICWrite(ULONG Offset,
- ULONG Value)
-{
- PULONG p;
- ULONG CPU = (_APICRead(APIC_ID) & APIC_ID_MASK) >> 24;
-
- lastregw[CPU] = Offset;
- lastvalw[CPU] = Value;
-
- p = (PULONG)((ULONG)APICBase + Offset);
-
- *p = Value;
-}
-#endif
-
-
-#if 0
-__inline ULONG APICRead(ULONG Offset)
-{
- PULONG p;
-
- p = (PULONG)((ULONG)APICBase + Offset);
- return *p;
-}
-#else
-__inline ULONG APICRead(ULONG Offset)
-{
- PULONG p;
- ULONG CPU = (_APICRead(APIC_ID) & APIC_ID_MASK) >> 24;
-
- lastregr[CPU] = Offset;
- lastvalr[CPU] = 0;
-
- p = (PULONG)((ULONG)APICBase + Offset);
-
- lastvalr[CPU] = *p;
- return lastvalr[CPU];
-}
-#endif
-
-__inline VOID APICSendEOI(VOID)
-{
- // Send the EOI
- APICWrite(APIC_EOI, 0);
-}
-
static VOID APICDumpBit(ULONG base)
{
ULONG v, i, j;
@@ -317,7 +251,6 @@
ULONG v, ver, maxlvt;
ULONG r1, r2, w1, w2;
ULONG CPU = ThisCPU();;
-
r1 = lastregr[CPU];