Author: tkreuzer
Date: Tue Apr 28 21:27:16 2015
New Revision: 67472
URL:
http://svn.reactos.org/svn/reactos?rev=67472&view=rev
Log:
[KERNEL32/NDK]
Move definition of FIBER to NDK
Modified:
trunk/reactos/dll/win32/kernel32/client/fiber.c
trunk/reactos/include/asm/genincdata.c
trunk/reactos/include/ndk/ketypes.h
Modified: trunk/reactos/dll/win32/kernel32/client/fiber.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/fiber.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/fiber.c [iso-8859-1] Tue Apr 28 21:27:16 2015
@@ -3,7 +3,7 @@
* PROJECT: ReactOS System Libraries
* FILE: lib/kernel32/thread/fiber.c
* PURPOSE: Fiber Implementation
- * PROGRAMMERS:
+ * PROGRAMMERS:
* Alex Ionescu (alex(a)relsoft.net)
* KJK::Hyperion <noog(a)libero.it>
*/
@@ -12,19 +12,16 @@
#define NDEBUG
#include <debug.h>
-typedef struct _FIBER /* Field offsets: */
-{ /* 32 bit 64 bit */
- /* this must be the first field */
- PVOID Parameter; /* 0x00 0x00 */
- PEXCEPTION_REGISTRATION_RECORD ExceptionList; /* 0x04 0x08 */
- PVOID StackBase; /* 0x08 0x10 */
- PVOID StackLimit; /* 0x0C 0x18 */
- PVOID DeallocationStack; /* 0x10 0x20 */
- CONTEXT Context; /* 0x14 0x28 */
- ULONG GuaranteedStackBytes; /* 0x2E0 */
- PVOID FlsData; /* 0x2E4 */
- PACTIVATION_CONTEXT_STACK ActivationContextStack; /* 0x2E8 */
-} FIBER, *PFIBER;
+#ifdef _M_IX86
+C_ASSERT(FIELD_OFFSET(FIBER, ExceptionList) == 0x04);
+C_ASSERT(FIELD_OFFSET(FIBER, StackBase) == 0x08);
+C_ASSERT(FIELD_OFFSET(FIBER, StackLimit) == 0x0C);
+C_ASSERT(FIELD_OFFSET(FIBER, DeallocationStack) == 0x10);
+C_ASSERT(FIELD_OFFSET(FIBER, Context) == 0x14);
+C_ASSERT(FIELD_OFFSET(FIBER, GuaranteedStackBytes) == 0x2E0);
+C_ASSERT(FIELD_OFFSET(FIBER, FlsData) == 0x2E4);
+C_ASSERT(FIELD_OFFSET(FIBER, ActivationContextStack) == 0x2E8);
+#endif // _M_IX86
/* PRIVATE FUNCTIONS **********************************************************/
@@ -76,7 +73,7 @@
*/
LPVOID
WINAPI
-ConvertThreadToFiberEx(LPVOID lpParameter,
+ConvertThreadToFiberEx(LPVOID lpParameter,
DWORD dwFlags)
{
PTEB Teb;
Modified: trunk/reactos/include/asm/genincdata.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/asm/genincdata.c?r…
==============================================================================
--- trunk/reactos/include/asm/genincdata.c [iso-8859-1] (original)
+++ trunk/reactos/include/asm/genincdata.c [iso-8859-1] Tue Apr 28 21:27:16 2015
@@ -26,21 +26,6 @@
P4Home = 4 * sizeof(PVOID),
};
#endif
-
-// FIXME: where to put this?
-typedef struct _FIBER /* Field offsets: */
-{ /* 32 bit 64 bit */
- /* this must be the first field */
- PVOID Parameter; /* 0x00 0x00 */
- PEXCEPTION_REGISTRATION_RECORD ExceptionList; /* 0x04 0x08 */
- PVOID StackBase; /* 0x08 0x10 */
- PVOID StackLimit; /* 0x0C 0x18 */
- PVOID DeallocationStack; /* 0x10 0x20 */
- CONTEXT Context; /* 0x14 0x28 */
- ULONG GuaranteedStackBytes; /* 0x2E0 */
- PVOID FlsData; /* 0x2E4 */
- PVOID /* PACTIVATION_CONTEXT_STACK */ ActivationContextStack; /* 0x2E8 */
-} FIBER, *PFIBER;
typedef struct
{
@@ -75,10 +60,8 @@
ASMGENDATA Table[] =
{
-#if defined (_M_IX86) || defined (_M_AMD64)
/* PORTABLE CONSTANTS ********************************************************/
#include "ksx.template.h"
-#endif
/* ARCHITECTURE SPECIFIC CONTSTANTS ******************************************/
#ifdef _M_IX86
Modified: trunk/reactos/include/ndk/ketypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/ketypes.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/ketypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/ketypes.h [iso-8859-1] Tue Apr 28 21:27:16 2015
@@ -167,6 +167,20 @@
//
#define KI_EXCEPTION_INTERNAL 0x10000000
#define KI_EXCEPTION_ACCESS_VIOLATION (KI_EXCEPTION_INTERNAL | 0x04)
+
+typedef struct _FIBER /* Field offsets: */
+{ /* 32 bit 64 bit */
+ /* this must be the first field */
+ PVOID Parameter; /* 0x00 0x00 */
+ struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList; /* 0x04 0x08 */
+ PVOID StackBase; /* 0x08 0x10 */
+ PVOID StackLimit; /* 0x0C 0x18 */
+ PVOID DeallocationStack; /* 0x10 0x20 */
+ CONTEXT Context; /* 0x14 0x28 */
+ ULONG GuaranteedStackBytes; /* 0x2E0 */
+ PVOID FlsData; /* 0x2E4 */
+ struct _ACTIVATION_CONTEXT_STACK *ActivationContextStack;/* 0x2E8 */
+} FIBER, *PFIBER;
#ifndef NTOS_MODE_USER
//