From 486425ed00acec134f8799bdde64bfd093c5fb55 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 26 Dec 2024 21:19:14 +0100 Subject: IMPL: A lot of new changes, see details. Signed-off-by: Amlal El Mahrouss --- dev/Boot/BootKit/Thread.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 dev/Boot/BootKit/Thread.h (limited to 'dev/Boot/BootKit/Thread.h') diff --git a/dev/Boot/BootKit/Thread.h b/dev/Boot/BootKit/Thread.h new file mode 100644 index 00000000..42991d17 --- /dev/null +++ b/dev/Boot/BootKit/Thread.h @@ -0,0 +1,44 @@ +/* ------------------------------------------- + + Copyright (C) 2024, Theater Quality Inc, all rights reserved. + +------------------------------------------- */ + +#pragma once + +#include +#include +#include + +namespace Boot +{ + using namespace Kernel; + + class BThread; + + /// @brief Program loader class + /// @package nl.zeta.boot.api + class BThread final + { + public: + explicit BThread() = delete; + ~BThread() = default; + + explicit BThread(Kernel::VoidPtr blob); + + BThread& operator=(const BThread&) = default; + BThread(const BThread&) = default; + + Int32 Start(HEL::BootInfoHeader* handover, BOOL is_own_stack); + void SetName(const char* name); + const char* GetName(); + bool IsValid(); + + private: + Char fBlobName[255] = {"BootThread"}; + VoidPtr fStartAddress{nullptr}; + VoidPtr fBlob{nullptr}; + UInt8* fStack{nullptr}; + HEL::BootInfoHeader* fHandover{nullptr}; + }; +} // namespace Boot -- cgit v1.2.3