mirror of
https://github.com/reactos/reactos.git
synced 2025-06-01 23:48:12 +00:00
[KERNEL32/NDK]
Move definition of FIBER to NDK svn path=/trunk/; revision=67472
This commit is contained in:
parent
6a0d45da07
commit
58de1d8ba9
3 changed files with 26 additions and 32 deletions
|
@ -3,7 +3,7 @@
|
||||||
* PROJECT: ReactOS System Libraries
|
* PROJECT: ReactOS System Libraries
|
||||||
* FILE: lib/kernel32/thread/fiber.c
|
* FILE: lib/kernel32/thread/fiber.c
|
||||||
* PURPOSE: Fiber Implementation
|
* PURPOSE: Fiber Implementation
|
||||||
* PROGRAMMERS:
|
* PROGRAMMERS:
|
||||||
* Alex Ionescu (alex@relsoft.net)
|
* Alex Ionescu (alex@relsoft.net)
|
||||||
* KJK::Hyperion <noog@libero.it>
|
* KJK::Hyperion <noog@libero.it>
|
||||||
*/
|
*/
|
||||||
|
@ -12,19 +12,16 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
typedef struct _FIBER /* Field offsets: */
|
#ifdef _M_IX86
|
||||||
{ /* 32 bit 64 bit */
|
C_ASSERT(FIELD_OFFSET(FIBER, ExceptionList) == 0x04);
|
||||||
/* this must be the first field */
|
C_ASSERT(FIELD_OFFSET(FIBER, StackBase) == 0x08);
|
||||||
PVOID Parameter; /* 0x00 0x00 */
|
C_ASSERT(FIELD_OFFSET(FIBER, StackLimit) == 0x0C);
|
||||||
PEXCEPTION_REGISTRATION_RECORD ExceptionList; /* 0x04 0x08 */
|
C_ASSERT(FIELD_OFFSET(FIBER, DeallocationStack) == 0x10);
|
||||||
PVOID StackBase; /* 0x08 0x10 */
|
C_ASSERT(FIELD_OFFSET(FIBER, Context) == 0x14);
|
||||||
PVOID StackLimit; /* 0x0C 0x18 */
|
C_ASSERT(FIELD_OFFSET(FIBER, GuaranteedStackBytes) == 0x2E0);
|
||||||
PVOID DeallocationStack; /* 0x10 0x20 */
|
C_ASSERT(FIELD_OFFSET(FIBER, FlsData) == 0x2E4);
|
||||||
CONTEXT Context; /* 0x14 0x28 */
|
C_ASSERT(FIELD_OFFSET(FIBER, ActivationContextStack) == 0x2E8);
|
||||||
ULONG GuaranteedStackBytes; /* 0x2E0 */
|
#endif // _M_IX86
|
||||||
PVOID FlsData; /* 0x2E4 */
|
|
||||||
PACTIVATION_CONTEXT_STACK ActivationContextStack; /* 0x2E8 */
|
|
||||||
} FIBER, *PFIBER;
|
|
||||||
|
|
||||||
/* PRIVATE FUNCTIONS **********************************************************/
|
/* PRIVATE FUNCTIONS **********************************************************/
|
||||||
|
|
||||||
|
@ -76,7 +73,7 @@ ConvertFiberToThread(VOID)
|
||||||
*/
|
*/
|
||||||
LPVOID
|
LPVOID
|
||||||
WINAPI
|
WINAPI
|
||||||
ConvertThreadToFiberEx(LPVOID lpParameter,
|
ConvertThreadToFiberEx(LPVOID lpParameter,
|
||||||
DWORD dwFlags)
|
DWORD dwFlags)
|
||||||
{
|
{
|
||||||
PTEB Teb;
|
PTEB Teb;
|
||||||
|
|
|
@ -27,21 +27,6 @@ enum
|
||||||
};
|
};
|
||||||
#endif
|
#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
|
typedef struct
|
||||||
{
|
{
|
||||||
char Type;
|
char Type;
|
||||||
|
@ -75,10 +60,8 @@ __attribute__ ((section(".asmdef")))
|
||||||
|
|
||||||
ASMGENDATA Table[] =
|
ASMGENDATA Table[] =
|
||||||
{
|
{
|
||||||
#if defined (_M_IX86) || defined (_M_AMD64)
|
|
||||||
/* PORTABLE CONSTANTS ********************************************************/
|
/* PORTABLE CONSTANTS ********************************************************/
|
||||||
#include "ksx.template.h"
|
#include "ksx.template.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ARCHITECTURE SPECIFIC CONTSTANTS ******************************************/
|
/* ARCHITECTURE SPECIFIC CONTSTANTS ******************************************/
|
||||||
#ifdef _M_IX86
|
#ifdef _M_IX86
|
||||||
|
|
|
@ -168,6 +168,20 @@ Author:
|
||||||
#define KI_EXCEPTION_INTERNAL 0x10000000
|
#define KI_EXCEPTION_INTERNAL 0x10000000
|
||||||
#define KI_EXCEPTION_ACCESS_VIOLATION (KI_EXCEPTION_INTERNAL | 0x04)
|
#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
|
#ifndef NTOS_MODE_USER
|
||||||
//
|
//
|
||||||
// Number of dispatch codes supported by KINTERRUPT
|
// Number of dispatch codes supported by KINTERRUPT
|
||||||
|
|
Loading…
Reference in a new issue