aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc
diff options
context:
space:
mode:
authorMarvin Borner2021-04-02 16:17:50 +0200
committerMarvin Borner2021-04-02 16:17:50 +0200
commitb62b9d1f33a4911feb9f318ece0c1565f27abf8d (patch)
treeaecea9f7b5bf651b584911cf90c61258b9564556 /kernel/inc
parentd055495f3dbb62f74809d31a84621d6e86d61d0a (diff)
Replaced target macros
Diffstat (limited to 'kernel/inc')
-rw-r--r--kernel/inc/proc.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h
index c9dadaa..8a172c9 100644
--- a/kernel/inc/proc.h
+++ b/kernel/inc/proc.h
@@ -19,6 +19,8 @@
#define GDT_USER_CODE_OFFSET 0x1b // User code segment offset in GDT (with ring3 mask)
#define GDT_USER_DATA_OFFSET 0x23 // User data segment offset in GDT (with ring3 mask)
+#define RING(regs) ((regs->cs) & 3)
+
#define PROC_MAX_BLOCK_IDS 16
#define PROC_BLOCK_MAGIC 0x00528491
@@ -60,7 +62,11 @@ struct proc {
struct stack *messages;
struct list *memory;
- u32 ticks;
+ struct {
+ u32 user;
+ u32 kernel;
+ } ticks;
+
struct {
u8 val;
u8 cnt;