From: Jeff D. <jd...@ka...> - 2000-03-03 19:33:17
|
> A traditional kernel makes a context switch when a system call (or a > fault) occurs, But it is still in the context of the process making the system call or fault. The closest equivalent I could find was having the thread actually execute its own system calls. > Now that I'm thinking of it, I guess the main reason for it might be > the need to mmap(...) correctly the process memory. That's one reason. The real big reason is that system calls sleep. And the tracing thread can't. So the process ought to be the one sleeping, so it ought to be doing its system calls. The other is that for SMP to work as it does in the other ports, a process task structure has to be at the bottom of the process kernel stack, which means that each process needs a different kernel stack, so they might as well be running on them. This could obviously be done differently by redefining the current() macro, but it was convenient to do things like the other ports. Jeff |