mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 07:19:20 +00:00
Update files
This commit is contained in:
@ -6,6 +6,8 @@
|
||||
#include <interrupts.hpp>
|
||||
#include <vector.hpp>
|
||||
#include <memory.hpp>
|
||||
#include <hashmap.hpp>
|
||||
#include <ipc.hpp>
|
||||
|
||||
namespace Tasking
|
||||
{
|
||||
@ -99,6 +101,11 @@ namespace Tasking
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetPriority(int priority)
|
||||
{
|
||||
Info.Priority = priority;
|
||||
}
|
||||
};
|
||||
|
||||
struct PCB
|
||||
@ -113,6 +120,7 @@ namespace Tasking
|
||||
Vector<TCB *> Threads;
|
||||
Vector<PCB *> Children;
|
||||
Memory::PageTable *PageTable;
|
||||
HashMap<InterProcessCommunication::IPCPort, uint64_t> *IPCHandles;
|
||||
};
|
||||
|
||||
enum TokenTrustLevel
|
||||
|
@ -3,12 +3,41 @@
|
||||
|
||||
#include <types.h>
|
||||
|
||||
struct Time
|
||||
namespace Time
|
||||
{
|
||||
uint64_t Year, Month, Day, Hour, Minute, Second;
|
||||
uint64_t Counter;
|
||||
};
|
||||
struct Clock
|
||||
{
|
||||
uint64_t Year, Month, Day, Hour, Minute, Second;
|
||||
uint64_t Counter;
|
||||
};
|
||||
|
||||
Time ReadClock();
|
||||
Clock ReadClock();
|
||||
|
||||
class time
|
||||
{
|
||||
private:
|
||||
struct HPET
|
||||
{
|
||||
uint64_t GeneralCapabilities;
|
||||
uint64_t Reserved0;
|
||||
uint64_t GeneralConfiguration;
|
||||
uint64_t Reserved1;
|
||||
uint64_t GeneralIntStatus;
|
||||
uint64_t Reserved2;
|
||||
uint64_t Reserved3[24];
|
||||
uint64_t MainCounterValue;
|
||||
uint64_t Reserved4;
|
||||
};
|
||||
|
||||
void *acpi;
|
||||
void *hpet;
|
||||
uint32_t clk = 0;
|
||||
|
||||
public:
|
||||
void Sleep(uint64_t Milliseconds);
|
||||
time(void *acpi);
|
||||
~time();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // !__FENNIX_KERNEL_TIME_H__
|
||||
|
@ -54,6 +54,53 @@ typedef __builtin_va_list va_list;
|
||||
#define VPOKE(type, address) (*((volatile type *)(address)))
|
||||
#define POKE(type, address) (*((type *)(address)))
|
||||
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#ifdef __STDC__
|
||||
#ifdef __STDC_VERSION__
|
||||
#if (__STDC_VERSION__ >= 201710L)
|
||||
#define C_LANGUAGE_STANDARD 2018
|
||||
#elif (__STDC_VERSION__ >= 201112L)
|
||||
#define C_LANGUAGE_STANDARD 2011
|
||||
#elif (__STDC_VERSION__ >= 199901L)
|
||||
#define C_LANGUAGE_STANDARD 1999
|
||||
#elif (__STDC_VERSION__ >= 199409L)
|
||||
#define C_LANGUAGE_STANDARD 1995
|
||||
#endif
|
||||
#else
|
||||
#define C_LANGUAGE_STANDARD 1990
|
||||
#endif
|
||||
#else
|
||||
#define C_LANGUAGE_STANDARD 1972
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifdef __STDC__
|
||||
#ifdef __cplusplus
|
||||
#if (__cplusplus >= 202100L)
|
||||
#define CPP_LANGUAGE_STANDARD 2023
|
||||
#elif (__cplusplus >= 202002L)
|
||||
#define CPP_LANGUAGE_STANDARD 2020
|
||||
#elif (__cplusplus >= 201703L)
|
||||
#define CPP_LANGUAGE_STANDARD 2017
|
||||
#elif (__cplusplus >= 201402L)
|
||||
#define CPP_LANGUAGE_STANDARD 2014
|
||||
#elif (__cplusplus >= 201103L)
|
||||
#define CPP_LANGUAGE_STANDARD 2011
|
||||
#elif (__cplusplus >= 199711L)
|
||||
#define CPP_LANGUAGE_STANDARD 1998
|
||||
#endif
|
||||
#else
|
||||
#define CPP_LANGUAGE_STANDARD __cplusplus
|
||||
#endif
|
||||
#else
|
||||
#define CPP_LANGUAGE_STANDARD __cplusplus
|
||||
#endif
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
typedef __INT8_TYPE__ int8_t;
|
||||
typedef __INT16_TYPE__ int16_t;
|
||||
typedef __INT32_TYPE__ int32_t;
|
||||
|
Reference in New Issue
Block a user