Kernel: Add helper for checking whether segment is from userspace

This commit is contained in:
Bananymous 2023-12-06 12:57:13 +02:00
parent 531211e09d
commit 336daa2cc5
1 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,11 @@
namespace Kernel::GDT
{
static constexpr inline bool is_user_segment(uint8_t segment)
{
return (segment & 3) == 3;
}
void initialize();
void set_tss_stack(uintptr_t);