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 acee6af98d
commit bb831bcdaa
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);