diff options
author | Alexis211 <alexis211@gmail.com> | 2009-09-02 12:36:52 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-09-02 12:36:52 +0200 |
commit | aa5aa4482314078c52f86226a1753511d3f4a4cb (patch) | |
tree | 63663f87a5375a957829d85f6d11d268cbdd1f4b /Source/Kernel/TaskManager/Thread.class.h | |
parent | 8c9f3cc95987f2aee2771d96a0956241b6f96cb3 (diff) | |
download | Melon-aa5aa4482314078c52f86226a1753511d3f4a4cb.tar.gz Melon-aa5aa4482314078c52f86226a1753511d3f4a4cb.zip |
Maybee some changes
Diffstat (limited to 'Source/Kernel/TaskManager/Thread.class.h')
-rw-r--r-- | Source/Kernel/TaskManager/Thread.class.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Kernel/TaskManager/Thread.class.h b/Source/Kernel/TaskManager/Thread.class.h index 62557db..63e5272 100644 --- a/Source/Kernel/TaskManager/Thread.class.h +++ b/Source/Kernel/TaskManager/Thread.class.h @@ -23,6 +23,7 @@ class Thread { u8int m_irq; //An IRQ number } waitfor; + bool m_isRunningAnInterrupt; bool m_isKernel; //Says if stack is in kernel pagedir, and if thread should run in ring 0 u32int m_kernelStackFrame; //Used for allocating and freeing a frame used as a stack @@ -33,7 +34,6 @@ class Thread { Thread(Process* process, u32int (*entry_point)()); ~Thread(); void finish(u32int errcode); //Called by run() when thread returns, and by exception handler. Can also be called by the thread itself - void run(u32int (*entry_point)()); void setState(u32int esp, u32int ebp, u32int eip); u32int getEsp(); @@ -41,6 +41,9 @@ class Thread { u32int getEip(); Process* getProcess(); + inline void enterInterrupt() { m_isRunningAnInterrupt = true; } + inline void exitInterrupt() { m_isRunningAnInterrupt = false; } + void sleep(u32int msecs); void waitIRQ(u8int irq); bool runnable(); //Called by scheduler |