BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / c738dbb1e7e7a46a98436326234826eef71083e2 / include / nucleus / cpu.h

// Related

Nucleus

Barry CPU specific segment c738dbb (3 years, 2 months ago)
diff --git a/include/nucleus/cpu.h b/include/nucleus/cpu.h
index b1e4cae..f4d7175 100644
--- a/include/nucleus/cpu.h
+++ b/include/nucleus/cpu.h
@@ -2,9 +2,16 @@
 #define _NUCLEUS_CPU_H
 
 #include <stdint.h>
+#include <nucleus/types.h>
 
 typedef unsigned int cpu_t;
 
+/* Structure for CPU specific data */
+struct CPUData {
+	cpu_t id;
+	Task *task;
+};
+
 /* Structure for an Interrupt Frame */
 struct InterruptFrame {
 	uint32_t ds;
@@ -16,6 +23,8 @@ struct InterruptFrame {
 typedef void (*exc_handler_t)(struct InterruptFrame *);
 typedef void (*int_handler_t)(struct InterruptFrame *);
 
+extern struct CPUData __seg_gs *cpu;
+
 extern int apic;
 
 extern uintptr_t lapicPtr, ioapicPtr;
@@ -29,4 +38,7 @@ extern cpu_t lapicNums[];
 void register_exception(int num, exc_handler_t addr);
 void register_interrupt(int num, int_handler_t addr);
 
+void set_fs_base(uintptr_t base);
+void set_gs_base(uintptr_t base);
+
 #endif