git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hot fix: remove outdated objcpy
[lunaix-os.git]
/
lunaix-os
/
arch
/
i386
/
includes
/
sys
/
interrupts.h
diff --git
a/lunaix-os/arch/i386/includes/sys/interrupts.h
b/lunaix-os/arch/i386/includes/sys/interrupts.h
index 003a2cd96bcda75b10933814b0a64ad40fe4227c..540da4c219a6be7b8b4562b706b9e514a6f0f7df 100644
(file)
--- a/
lunaix-os/arch/i386/includes/sys/interrupts.h
+++ b/
lunaix-os/arch/i386/includes/sys/interrupts.h
@@
-4,7
+4,8
@@
#include "vectors.h"
#ifndef __ASM__
#include "vectors.h"
#ifndef __ASM__
-#include <hal/cpu.h>
+#include <lunaix/compiler.h>
+#include <sys/cpu.h>
struct exec_param;
struct exec_param;
@@
-21,9
+22,9
@@
struct regcontext
u32_t es;
u32_t fs;
u32_t gs;
u32_t es;
u32_t fs;
u32_t gs;
-}
__attribute__((packed))
;
+}
compact
;
-
typedef struc
t
+
struct pcontex
t
{
unsigned int depth;
struct regcontext registers;
{
unsigned int depth;
struct regcontext registers;
@@
-32,11
+33,11
@@
typedef struct
u32_t esp;
volatile struct exec_param* execp;
};
u32_t esp;
volatile struct exec_param* execp;
};
-}
__attribute__((packed)) isr_param
;
+}
compact
;
struct exec_param
{
struct exec_param
{
-
isr_param
* saved_prev_ctx;
+
struct pcontext
* saved_prev_ctx;
u32_t vector;
u32_t err_code;
u32_t eip;
u32_t vector;
u32_t err_code;
u32_t eip;
@@
-44,12
+45,10
@@
struct exec_param
u32_t eflags;
u32_t esp;
u32_t ss;
u32_t eflags;
u32_t esp;
u32_t ss;
-}
__attribute__((packed))
;
+}
compact
;
-#define ISR_PARAM_SIZE sizeof(isr_param)
-
-void
-exception_init();
+#define saved_fp(isrm) ((isrm)->registers.ebp)
+#define kernel_context(isrm) (!(((isrm)->execp->cs) & 0b11))
#endif
#endif