Bona Fide OS Developer
View unanswered posts | View active topics It is currently Fri Sep 21, 2018 1:10 am



Post new topic Reply to topic  [ 3 posts ] 
 Unix Style Inerrupts 
Author Message

Joined: Tue Jul 06, 2010 11:43 am
Posts: 5
Location: New York, New York USA
Post 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.
Image


Tue Jul 06, 2010 11:50 am
Profile YIM WWW
Site Admin

Joined: Fri Jul 24, 2009 10:02 pm
Posts: 247
Location: Las Vegas, NV, US
Post 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
Profile

Joined: Tue Jul 06, 2010 11:43 am
Posts: 5
Location: New York, New York USA
Post 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.
Image


Mon Mar 07, 2011 7:15 pm
Profile YIM WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: Google [Bot] and 2 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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin and tweaked by the BF Team.