APIs

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
hAr|

APIs

Post by hAr| »

What is idea with gates (I know something litle). What's heapened with CS, DS, SS registers?
Anton

RE:APIs

Post by Anton »

Nothing happend to them. A gate is just a safe way to make a call. Say you need to call a fucntion in the kernel(level 0) from level 3. If no  gates existed, then how could you sitch to level 0(level 3 does not have privilage to do that)? And how can you garanty that the calling program's stack is big enougth(or you can have a stack overflow hack), and that the call is made at the right entry place? Thats why you need gates: they switch the stack, runlevel, and start execution at a point deffined by the gate, so CS, SS are changed accourdingly.
Anton.
Post Reply