summaryrefslogtreecommitdiffhomepage
path: root/Public/Kits/SystemKit/ThreadAPI.hxx
blob: 80742ab9ff2cd6c1c1b93418b4544f910d4811dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 *	========================================================
 *
 *	h-core
 * 	Copyright Mahrouss Logic, all rights reserved.
 *
 * 	========================================================
 */

//
// Created by Amlal on 1/27/24.
//

#ifndef __THREAD_API__
#define __THREAD_API__

#include <NewKit/Defines.hpp>

namespace HCore {
/// @brief Thread Information Block for Local Storage.
/// Located in GS on AMD64, Virtual Address 0x10000 (64x0, 32x0, ARM64)
struct ThreadInformationBlock final {
  const Char Name[255];        // Module Name
  const UIntPtr StartAddress;  // Start Address
  const UIntPtr StartHeap;     // Allocation Heap
  const UIntPtr StartStack;    // Stack Pointer.
  const Int32 ARCH;            // Architecture and/or platform.
};

enum {
  kPC_IA64,
  kPC_AMD64 = kPC_IA64,
  kPC_ARM,
  kMACS_64x0,
  kMACS_32x0,
};
}  // namespace HCore

#endif  // __THREAD_API__