From 6c2d3280955f86d0970ef312ca4878ecc6ef237d Mon Sep 17 00:00:00 2001
From: h2-addad <hamza2.addad@live.uwe.ac.uk>
Date: Sun, 16 Jul 2023 01:43:20 +0000
Subject: [PATCH] Upload New File

---
 src/userprog/gdt.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 src/userprog/gdt.h

diff --git a/src/userprog/gdt.h b/src/userprog/gdt.h
new file mode 100644
index 0000000..81fe50c
--- /dev/null
+++ b/src/userprog/gdt.h
@@ -0,0 +1,15 @@
+#ifndef USERPROG_GDT_H
+#define USERPROG_GDT_H
+
+#include "threads/loader.h"
+
+/* Segment selectors.
+   More selectors are defined by the loader in loader.h. */
+#define SEL_UCSEG       0x1B    /* User code selector. */
+#define SEL_UDSEG       0x23    /* User data selector. */
+#define SEL_TSS         0x28    /* Task-state segment. */
+#define SEL_CNT         6       /* Number of segments. */
+
+void gdt_init (void);
+
+#endif /* userprog/gdt.h */
-- 
GitLab