Implemented threading for x86_64.
* Thread creation and switching is working fine, however threads do not yet get interrupted because I've not implemented hardware interrupt handling yet (I'll do that next). * I've made some changes to struct iframe: I've removed the e/r prefixes from the member names for both 32/64, so now they're just named ip, ax, bp, etc. This makes it easier to write code that works with both 32/64 without having to deal with different iframe member names.
This commit is contained in:
@@ -15,25 +15,25 @@ struct iframe {
|
||||
uint32 fs;
|
||||
uint32 es;
|
||||
uint32 ds;
|
||||
uint32 edi;
|
||||
uint32 esi;
|
||||
uint32 ebp;
|
||||
uint32 esp;
|
||||
uint32 ebx;
|
||||
uint32 edx;
|
||||
uint32 ecx;
|
||||
uint32 eax;
|
||||
uint32 di;
|
||||
uint32 si;
|
||||
uint32 bp;
|
||||
uint32 sp;
|
||||
uint32 bx;
|
||||
uint32 dx;
|
||||
uint32 cx;
|
||||
uint32 ax;
|
||||
uint32 orig_eax;
|
||||
uint32 orig_edx;
|
||||
uint32 vector;
|
||||
uint32 error_code;
|
||||
uint32 eip;
|
||||
uint32 ip;
|
||||
uint32 cs;
|
||||
uint32 flags;
|
||||
|
||||
// user_esp and user_ss are only present when the iframe is a userland
|
||||
// user_sp and user_ss are only present when the iframe is a userland
|
||||
// iframe (IFRAME_IS_USER()). A kernel iframe is shorter.
|
||||
uint32 user_esp;
|
||||
uint32 user_sp;
|
||||
uint32 user_ss;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user