|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Author |
Message |
Primis
Joined: Tue Jul 06, 2010 11:43 am Posts: 5 Location: New York, New York USA
|
Unix Style Inerrupts
I was reading a tutorial about interrupt that use the registers as the passing arguments, and I am aware of the inefficiencies that may come from this (take a look at the linux print function). So I was wondering if it is possible to have unix style interrupts where the arguments were passed to the stack. I was thinking about it, but I'm not sure how it would be done, considering that you can mess up the stack because the callback memory location is stored there. Any help would be nice.
_________________ There are 10 types of people in the world, Those who get binary, And those who don't.
|
Tue Jul 06, 2010 11:50 am |
|
|
brenden
Site Admin
Joined: Fri Jul 24, 2009 10:02 pm Posts: 247 Location: Las Vegas, NV, US
|
Re: Unix Style Inerrupts
I've not done it myself, bu t in theory it is similar to a context switch as done with threads.
You would save the state of the CPU and its registers and especially the stack pointer. Then you would point the stack to your interrupt code's stack and reload the CPU state that was saved before and continue where you left off. Does that make sense?
PS - what's up with your signature banner?
|
Mon Mar 07, 2011 5:34 am |
|
|
Primis
Joined: Tue Jul 06, 2010 11:43 am Posts: 5 Location: New York, New York USA
|
Re: Unix Style Inerrupts
Wow, Really fast on that reply. As for reading them, I found out its just a matter of using the stack pointer appropriately. On the other side of things my signature is two parts: part one is a binary joke (you see, 10 in binary is 2) and the other part is a meter of how many people have given me an internet, its like a props meter, feel free to give me one. Its free, easy, and doesn't require any type of registration.
_________________ There are 10 types of people in the world, Those who get binary, And those who don't.
|
Mon Mar 07, 2011 7:15 pm |
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 3 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|