1
0
mirror of https://github.com/UzixLS/KernelEx.git synced 2025-07-19 07:21:20 +03:00

import KernelEx-4.5.1

This commit is contained in:
UzixLS
2018-11-03 16:23:39 +03:00
parent 7571e3c60d
commit 2948e23961
77 changed files with 2603 additions and 883 deletions

View File

@ -296,6 +296,32 @@ typedef struct _FILEMAPPING { // Size = 0x28 (from Kernel32)
#pragma pack(pop)
#if defined(__GNUC__)
static inline
PDB98* get_pdb(void)
{
PDB98* pdb;
__asm__(".byte 0x64\n\tmovl (0x30),%0" : "=r" (pdb));
return pdb;
}
static inline
TIB98* get_tib(void)
{
TIB98* tib;
__asm__(".byte 0x64\n\tmovl (0x18),%0" : "=r" (tib));
return tib;
}
static inline
TDB98* get_tdb(void)
{
return (TDB98*) ((unsigned long) get_tib()) - 8;
}
#else
#pragma warning (disable:4035) // turn off no return code warning
static inline
@ -319,4 +345,6 @@ TDB98* get_tdb(void)
#pragma warning (default:4035) // turn on no return code warning
#endif /* defined(__GNUC__) */
#endif /* __KSTRUCTS_H */